From ebb4e22d02cd87e2b27bd8ace479b93c6871623b Mon Sep 17 00:00:00 2001 From: jmdaweb Date: Sun, 16 Aug 2015 15:42:17 +0200 Subject: [PATCH] Updated Windows dependencies. Now wx buttons and messages should be localized. --- src/widgetUtils/wxUtils.py | 12 ++++++++++++ windows-dependencies | 2 +- 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/src/widgetUtils/wxUtils.py b/src/widgetUtils/wxUtils.py index 28140852..a6247859 100644 --- a/src/widgetUtils/wxUtils.py +++ b/src/widgetUtils/wxUtils.py @@ -1,4 +1,7 @@ import wx +import paths +import languageHandler +import sys toolkit = "wx" @@ -108,6 +111,15 @@ class mainLoopObject(wx.App): def __init__(self): self.app = wx.App() + self.lc = wx.Locale() + lang=languageHandler.getLanguage() + wxLang=self.lc.FindLanguageInfo(lang) + if not wxLang and '_' in lang: + wxLang=self.lc.FindLanguageInfo(lang.split('_')[0]) + if hasattr(sys,'frozen'): + self.lc.AddCatalogLookupPathPrefix(paths.app_path("locales")) + if wxLang: + self.lc.Init(wxLang.Language) def run(self): self.app.MainLoop() diff --git a/windows-dependencies b/windows-dependencies index 0f65f42c..4d106f04 160000 --- a/windows-dependencies +++ b/windows-dependencies @@ -1 +1 @@ -Subproject commit 0f65f42c9f752396b0567e597d96c0ab8a5a53f8 +Subproject commit 4d106f04f7e6d2f9e160aca54ce107efb46ee099