forked from openlp/openlp
fixed another translation bug
This commit is contained in:
parent
40648ab807
commit
70ae7d119d
@ -240,8 +240,10 @@ def main():
|
||||
+ "/qt4_plugins")
|
||||
# i18n Set Language
|
||||
language = LanguageManager.get_language()
|
||||
appTranslator = LanguageManager.get_translator(language)
|
||||
appTranslator, default_string_translator = \
|
||||
LanguageManager.get_translator(language)
|
||||
app.installTranslator(appTranslator)
|
||||
app.installTranslator(default_string_translator)
|
||||
if not options.no_error_form:
|
||||
sys.excepthook = app.hookException
|
||||
sys.exit(app.run())
|
||||
@ -250,4 +252,4 @@ if __name__ == u'__main__':
|
||||
"""
|
||||
Instantiate and run the application.
|
||||
"""
|
||||
main()
|
||||
main()
|
||||
|
@ -55,8 +55,11 @@ class LanguageManager(object):
|
||||
language = QtCore.QLocale.system().name()
|
||||
lang_path = AppLocation.get_directory(AppLocation.LanguageDir)
|
||||
app_translator = QtCore.QTranslator()
|
||||
if app_translator.load(language, lang_path):
|
||||
return app_translator
|
||||
if not app_translator.load(language, lang_path):
|
||||
return
|
||||
default_string_translator = QtCore.QTranslator()
|
||||
if default_string_translator.load(u'qt_%s' % language, lang_path):
|
||||
return app_translator, default_string_translator
|
||||
|
||||
@staticmethod
|
||||
def find_qm_files():
|
||||
|
Loading…
Reference in New Issue
Block a user