# HG changeset patch # User Laurent Bessard # Date 1347041465 -7200 # Node ID 17e6293e9191633febf386207bed9ba850860221 # Parent 7228610e2273d664cace7c5c0446466250e7bc56 Adding support for extending internationalization to extensions diff -r 7228610e2273 -r 17e6293e9191 LPCManager.py --- a/LPCManager.py Fri Sep 07 18:32:41 2012 +0200 +++ b/LPCManager.py Fri Sep 07 20:11:05 2012 +0200 @@ -52,11 +52,18 @@ app.SetAppName('beremiz') wx.InitAllImageHandlers() -# Import module for internationalization -import gettext +_base_folder = os.path.split(sys.path[0])[0] +sys.path.append(os.path.join(_base_folder, "beremiz")) + +from util.TranslationCatalogs import AddCatalog, locale +AddCatalog(os.path.join(CWD, "locale")) if __name__ == '__main__': - __builtin__.__dict__['_'] = wx.GetTranslation#unicode_translation + # Import module for internationalization + import gettext + + __builtin__.__dict__['loc'] = locale + __builtin__.__dict__['_'] = wx.GetTranslation _base_path = os.path.split(__file__)[0] import features