Commit 58b6b92e authored by Wolfgang Rohdewald's avatar Wolfgang Rohdewald
Browse files

improve output of --debug=i18n

parent 86d9b94b
......@@ -51,7 +51,7 @@ from qt import *
from mi18n import MLocale, KDETranslator, i18n, i18nc
from common import Internal, isAlive
from common import Internal, isAlive, Debug
from util import popenReadlines
from statesaver import StateSaver
......@@ -205,6 +205,9 @@ class KApplication(QApplication):
translator = KDETranslator(self)
translator.load(qmName)
self.installTranslator(translator)
if Debug.i18n:
Internal.logger.debug('Installed Qt translator from %s', qmName)
def initQtTranslator(self):
"""load translators using Qt .qm files"""
......
......@@ -265,11 +265,17 @@ class MLocale:
if _[0]:
languages.append(_[0])
if Debug.i18n:
Internal.logger.debug('languages: %s', ','.join(languages) if languages else None)
Internal.logger.debug('languages from locale: %s', ','.join(languages) if languages else None)
for resourceDir in cls.localeDirectories():
for sysLanguage in sorted(os.listdir(resourceDir)):
if cls.__isLanguageInstalledForKajongg(sysLanguage):
languages.append(sysLanguage)
if sysLanguage not in languages:
if Debug.i18n:
Internal.logger.debug(
'I am in %s. language %s not installed in %s',
os.getcwd(), sysLanguage, ','.join(cls.localeDirectories()))
if languages:
languages = uniqueList(cls.extendRegionLanguages(languages))
languages = list(
......@@ -307,10 +313,6 @@ class MLocale:
if Debug.i18n:
Internal.logger.debug('language %s installed in %s', lang, _)
return True
if Debug.i18n:
Internal.logger.debug(
'I am in %s. language %s not installed in %s',
os.getcwd(), lang, ','.join(cls.localeDirectories()))
return False
MLocale.initStatic()
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment