add internatialization support to startup messages during checking software updates
authorAndrey Skvortsov <andrej.skvortzov@gmail.com>
Tue, 29 Nov 2016 11:41:09 +0300
changeset 1582 dee51e22a9aa
parent 1581 2295fdc5c271
child 1583 d91356480df9
add internatialization support to startup messages during checking software updates
Beremiz.py
--- a/Beremiz.py	Mon Nov 28 16:47:01 2016 +0300
+++ b/Beremiz.py	Tue Nov 29 11:41:09 2016 +0300
@@ -109,9 +109,13 @@
 
     # popup splash
     splash = ShowSplashScreen()
+
+    # load internatialization files
+    from util.misc import InstallLocalRessources
+    InstallLocalRessources(beremiz_dir)
     
     if updateinfo_url is not None:
-        updateinfo = "Fetching %s" % updateinfo_url
+        updateinfo = _("Fetching %s") % updateinfo_url
         # warn for possible updates
         def updateinfoproc():
             global updateinfo
@@ -119,7 +123,7 @@
                 import urllib2
                 updateinfo = urllib2.urlopen(updateinfo_url,None).read()
             except :
-                updateinfo = "update info unavailable."
+                updateinfo = _("update info unavailable.")
 
         from threading import Thread
         splash.SetText(text=updateinfo)
@@ -130,9 +134,6 @@
         splash.SetText(text=updateinfo)
         wx.Yield()
 
-    from util.misc import InstallLocalRessources
-    InstallLocalRessources(beremiz_dir)
-
     # Load extensions
     for extfilename in extensions:
         from util.TranslationCatalogs import AddCatalog