summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWolfgang Rohdewald <wolfgang@rohdewald.de>2016-08-13 10:06:58 (GMT)
committerWolfgang Rohdewald <wolfgang@rohdewald.de>2016-08-24 11:47:04 (GMT)
commit274cd2b84767abfd0a90d6e60c24e25afe3223d0 (patch)
treed2d1bcb7682bc8bdd8914df6c8dc8f5dd5c77238
parentf55ccdc03a35b9ce444f825a34782fe17940fc96 (diff)
Debug.neutral: setLanguage("en_US")
-rwxr-xr-xsrc/kajongg.py5
-rw-r--r--src/kde.py2
-rw-r--r--src/kdestub.py6
3 files changed, 11 insertions, 2 deletions
diff --git a/src/kajongg.py b/src/kajongg.py
index 51da5df..b33260c 100755
--- a/src/kajongg.py
+++ b/src/kajongg.py
@@ -26,7 +26,7 @@ import sys
import logging
from qt import QObject, usingQt4
-from kde import ki18n, KApplication, KCmdLineArgs, KCmdLineOptions
+from kde import ki18n, KApplication, KCmdLineArgs, KCmdLineOptions, KGlobal
from about import About
from common import Options, SingleshotOptions, Internal, Debug, unicodeString
@@ -171,6 +171,9 @@ if __name__ == "__main__":
APP = KApplication()
parseOptions()
+ if Debug.neutral:
+ KGlobal.locale().setLanguage('en_US')
+
if Debug.events:
EVHANDLER = EvHandler()
APP.installEventFilter(EVHANDLER)
diff --git a/src/kde.py b/src/kde.py
index d1e18c6..3b3bc11 100644
--- a/src/kde.py
+++ b/src/kde.py
@@ -38,7 +38,7 @@ try:
raise ImportError
from PyKDE4.kdecore import KUser, KGlobal, KStandardDirs, \
KAboutData, KCmdLineArgs, KConfig, KCmdLineOptions
- from PyKDE4.kdecore import i18n, i18nc, ki18n
+ from PyKDE4.kdecore import i18n, i18nc, ki18n, KGlobal
from PyKDE4.kdeui import KMessageBox, KIcon, KLineEdit, \
KConfigSkeleton, KDialogButtonBox, KAction, KStandardAction, \
KApplication, KToggleFullScreenAction, KXmlGuiWindow, \
diff --git a/src/kdestub.py b/src/kdestub.py
index a1b81ec..941f4dc 100644
--- a/src/kdestub.py
+++ b/src/kdestub.py
@@ -906,6 +906,12 @@ class KLocale(object):
translator = KDETranslator(app)
QCoreApplication.installTranslator(translator)
+ @staticmethod
+ def setLanguage(lang):
+ """stub"""
+ assert lang == 'en_US', 'KLocale.setLanguage currently only supports en_US'
+ QCoreApplication.installTranslator(None)
+
class KConfigGroup(object):