From ed6a5a3691b38e7d53c8b76d5c194f09d04253c7 Mon Sep 17 00:00:00 2001 From: Ted Chen Date: Wed, 7 Feb 2018 11:22:16 +0800 Subject: [PATCH 1/2] ENH: Enable i18n support as default and add lang+region qm file support --- Base/QTCore/qSlicerCoreApplication.cxx | 1 - CMakeLists.txt | 4 +++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/Base/QTCore/qSlicerCoreApplication.cxx b/Base/QTCore/qSlicerCoreApplication.cxx index b729f8d19ea..fc82a052402 100644 --- a/Base/QTCore/qSlicerCoreApplication.cxx +++ b/Base/QTCore/qSlicerCoreApplication.cxx @@ -1592,7 +1592,6 @@ void qSlicerCoreApplication::loadTranslations(const QString& dir) QString localeFilter = QString( QString("*") + app->settings()->value("language").toString()); - localeFilter.resize(3); localeFilter += QString(".qm"); QDir directory(dir); diff --git a/CMakeLists.txt b/CMakeLists.txt index 1013b34313e..366a747e877 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -217,7 +217,7 @@ mark_as_superbuild(Slicer_BUILD_DICOM_SUPPORT) option(Slicer_BUILD_DIFFUSION_SUPPORT "Build Slicer with diffusion (DWI, DTI) support" ON) mark_as_superbuild(Slicer_BUILD_DIFFUSION_SUPPORT) -option(Slicer_BUILD_I18N_SUPPORT "Build Slicer with Internationalization support" OFF) +option(Slicer_BUILD_I18N_SUPPORT "Build Slicer with Internationalization support" ON) option(Slicer_BUILD_QTLOADABLEMODULES "Build Slicer QT Loadable Modules" ON) mark_as_advanced(Slicer_BUILD_QTLOADABLEMODULES) @@ -408,6 +408,8 @@ include(SlicerFunctionAddPythonQtResources) if(Slicer_BUILD_I18N_SUPPORT) set(Slicer_LANGUAGES "fr" + "zh_tw" + "zh_cn" ) set_property(GLOBAL PROPERTY Slicer_LANGUAGES ${Slicer_LANGUAGES}) endif() From 65c8201566571e8550066aeff190f5c2c6ec663d Mon Sep 17 00:00:00 2001 From: Ted Chen Date: Fri, 23 Feb 2018 11:28:03 +0800 Subject: [PATCH 2/2] ENH: set default value of Slicer_BUILD_I18N_SUPPORT to off --- CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 366a747e877..c5650312260 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -217,7 +217,7 @@ mark_as_superbuild(Slicer_BUILD_DICOM_SUPPORT) option(Slicer_BUILD_DIFFUSION_SUPPORT "Build Slicer with diffusion (DWI, DTI) support" ON) mark_as_superbuild(Slicer_BUILD_DIFFUSION_SUPPORT) -option(Slicer_BUILD_I18N_SUPPORT "Build Slicer with Internationalization support" ON) +option(Slicer_BUILD_I18N_SUPPORT "Build Slicer with Internationalization support" OFF) option(Slicer_BUILD_QTLOADABLEMODULES "Build Slicer QT Loadable Modules" ON) mark_as_advanced(Slicer_BUILD_QTLOADABLEMODULES)