# HG changeset patch
# User Andrey Skvortsov <andrej.skvortzov@gmail.com>
# Date 1538128454 -10800
# Node ID 645eb1bce0a5ddd0e31074e97c4614057c16104b
# Parent  3a755d690398e6393740e64b15d1c63ddce99883
Suppress message box in case current locale is unsupported or missing in wx

Beremiz can still be translated into it using own locales
available in './locale'.

diff -r 3a755d690398 -r 645eb1bce0a5 Beremiz_service.py
--- a/Beremiz_service.py	Thu Sep 27 19:07:57 2018 +0300
+++ b/Beremiz_service.py	Fri Sep 28 12:54:14 2018 +0300
@@ -163,7 +163,9 @@
     # Define locale for wx
     loc = __builtin__.__dict__.get('loc', None)
     if loc is None:
+        wx.LogGui.EnableLogging(False)
         loc = wx.Locale(langid)
+        wx.LogGui.EnableLogging(True)
         __builtin__.__dict__['loc'] = loc
         # Define location for searching translation files
     loc.AddCatalogLookupPathPrefix(localedir)
diff -r 3a755d690398 -r 645eb1bce0a5 util/TranslationCatalogs.py
--- a/util/TranslationCatalogs.py	Thu Sep 27 19:07:57 2018 +0300
+++ b/util/TranslationCatalogs.py	Fri Sep 28 12:54:14 2018 +0300
@@ -55,7 +55,9 @@
             global locale
             if locale is None:
                 # Define locale for wx
+                wx.LogGui.EnableLogging(False)
                 locale = wx.Locale(wx.LANGUAGE_DEFAULT)
+                wx.LogGui.EnableLogging(True)
 
             locale.AddCatalogLookupPathPrefix(locale_dir)
             locale.AddCatalog(domain)