[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-kimageshop
Subject:    [krita] /: Fix setting the language from the environment
From:       Boudewijn Rempt <boud () valdyas ! org>
Date:       2016-04-10 11:38:22
Message-ID: E1apDh8-0006fN-UF () scm ! kde ! org
[Download RAW message or body]

Git commit 36509994b0961e614add8f09db6459ddb8bca670 by Boudewijn Rempt.
Committed on 10/04/2016 at 11:38.
Pushed by rempt into branch 'master'.

Fix setting the language from the environment

We must absolutely NOT use i18n calls when initializing strings
statically. Use ki18n instead. Calling for translations before the
application is started is not supported and breaks initializing
the language.

CCMAIL:kimageshop@kde.org

M  +1    -0    3rdparty/CMakeLists.txt
M  +1    -1    libs/image/kis_keyframe_channel.cpp
M  +9    -9    libs/image/kis_layer_properties_icons.cpp
M  +1    -0    libs/widgetutils/xmlgui/kswitchlanguagedialog_p.cpp

http://commits.kde.org/krita/36509994b0961e614add8f09db6459ddb8bca670

diff --git a/3rdparty/CMakeLists.txt b/3rdparty/CMakeLists.txt
index 90990ad..02917c0 100644
--- a/3rdparty/CMakeLists.txt
+++ b/3rdparty/CMakeLists.txt
@@ -53,6 +53,7 @@ if (MSVC)
 endif()
 
 if (MSYS)
+	set(PATCH_COMMAND patch)
         set(GLOBAL_PROFILE ${GLOBAL_PROFILE} \
                -DCMAKE_TOOLCHAIN_FILE=/data/mxe/mxe/usr/i686-w64-mingw32/share/cmake/mxe-conf.cmake \
                
                            -DCMAKE_FIND_PREFIX_PATH=${CMAKE_PREFIX_PATH}
                            -DCMAKE_SYSTEM_INCLUDE_PATH=${CMAKE_PREFIX_PATH}/include
diff --git a/libs/image/kis_keyframe_channel.cpp \
b/libs/image/kis_keyframe_channel.cpp index a947228..099e99a 100644
--- a/libs/image/kis_keyframe_channel.cpp
+++ b/libs/image/kis_keyframe_channel.cpp
@@ -26,7 +26,7 @@
 
 #include <QMap>
 
-const KoID KisKeyframeChannel::Content = KoID("content", i18n("Content"));
+const KoID KisKeyframeChannel::Content = KoID("content", ki18n("Content"));
 
 struct KisKeyframeChannel::Private
 {
diff --git a/libs/image/kis_layer_properties_icons.cpp \
b/libs/image/kis_layer_properties_icons.cpp index 09101ea..73e0f05 100644
--- a/libs/image/kis_layer_properties_icons.cpp
+++ b/libs/image/kis_layer_properties_icons.cpp
@@ -26,15 +26,15 @@ Q_GLOBAL_STATIC(KisLayerPropertiesIcons, s_instance)
 #include <kis_icon_utils.h>
 
 
-const KoID KisLayerPropertiesIcons::locked("locked", i18n("Locked"));
-const KoID KisLayerPropertiesIcons::visible("visible", i18n("Visible"));
-const KoID KisLayerPropertiesIcons::layerStyle("layer-style", i18n("Layer Style"));
-const KoID KisLayerPropertiesIcons::inheritAlpha("inherit-alpha", i18n("Inherit \
                Alpha"));
-const KoID KisLayerPropertiesIcons::alphaLocked("alpha-locked", i18n("Alpha \
                Locked"));
-const KoID KisLayerPropertiesIcons::onionSkins("onion-skins", i18n("Onion Skins"));
-const KoID KisLayerPropertiesIcons::passThrough("pass-through", i18n("Pass \
                Through"));
-const KoID KisLayerPropertiesIcons::selectionActive("selection-active", \
                i18n("Active"));
-const KoID KisLayerPropertiesIcons::colorLabelIndex("color-label", i18n("Color \
Label")); +const KoID KisLayerPropertiesIcons::locked("locked", ki18n("Locked"));
+const KoID KisLayerPropertiesIcons::visible("visible", ki18n("Visible"));
+const KoID KisLayerPropertiesIcons::layerStyle("layer-style", ki18n("Layer Style"));
+const KoID KisLayerPropertiesIcons::inheritAlpha("inherit-alpha", ki18n("Inherit \
Alpha")); +const KoID KisLayerPropertiesIcons::alphaLocked("alpha-locked", \
ki18n("Alpha Locked")); +const KoID \
KisLayerPropertiesIcons::onionSkins("onion-skins", ki18n("Onion Skins")); +const KoID \
KisLayerPropertiesIcons::passThrough("pass-through", ki18n("Pass Through")); +const \
KoID KisLayerPropertiesIcons::selectionActive("selection-active", ki18n("Active")); \
+const KoID KisLayerPropertiesIcons::colorLabelIndex("color-label", ki18n("Color \
Label"));  
 
 struct IconsPair {
diff --git a/libs/widgetutils/xmlgui/kswitchlanguagedialog_p.cpp \
b/libs/widgetutils/xmlgui/kswitchlanguagedialog_p.cpp index fa70dc0..ccd5e5e 100644
--- a/libs/widgetutils/xmlgui/kswitchlanguagedialog_p.cpp
+++ b/libs/widgetutils/xmlgui/kswitchlanguagedialog_p.cpp
@@ -86,6 +86,7 @@ static void initializeLanguages()
         }
     }
     qDebug() << ">>>>>>>>>>>>>> LANGUAGE" << qgetenv("LANGUAGE");
+    qDebug() << ">>>>>>>>>>>>>> DATADIRS" << qgetenv("XDG_DATA_DIRS");
 }
 
 Q_COREAPP_STARTUP_FUNCTION(initializeLanguages)
_______________________________________________
Krita mailing list
kimageshop@kde.org
https://mail.kde.org/mailman/listinfo/kimageshop


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic