mirror of
https://github.com/wxWidgets/Phoenix.git
synced 2026-01-04 19:10:09 +01:00
Build the wx message catalogs as part of build_wx command, add code to add the catalog dir when wx is imported, and re-enable the unittest that verifies message translation.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxPython/Phoenix/trunk@69451 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
4
build.py
4
build.py
@@ -599,6 +599,10 @@ def build_wx(options, args):
|
||||
traceback.print_exc()
|
||||
sys.exit(1)
|
||||
|
||||
os.chdir(os.path.join(wxDir(), 'locale'))
|
||||
print 'Building message catalogs'
|
||||
runcmd('make allmo')
|
||||
|
||||
|
||||
|
||||
def build_py(options, args):
|
||||
|
||||
12
etg/intl.py
12
etg/intl.py
@@ -48,6 +48,18 @@ def run():
|
||||
c.find('GetLCID').ignore()
|
||||
|
||||
|
||||
module.addPyCode("""\
|
||||
#----------------------------------------------------------------------------
|
||||
# Add the directory where the wxWidgets catalogs were installed
|
||||
# to the default catalog path, if they were put in the pacakge dir.
|
||||
import os
|
||||
_localedir = os.path.join(os.path.dirname(__file__), "locale")
|
||||
if os.path.exists(_localedir):
|
||||
Locale.AddCatalogLookupPathPrefix(_localedir)
|
||||
del os
|
||||
#----------------------------------------------------------------------------
|
||||
""")
|
||||
|
||||
#-----------------------------------------------------------------
|
||||
tools.doCommonTweaks(module)
|
||||
tools.addAutoProperties(module)
|
||||
|
||||
@@ -31,7 +31,7 @@ class intl_Tests(wtc.WidgetTestCase):
|
||||
# This tests if we're able to pull translations from the wx message catalogs
|
||||
loc = wx.Locale(wx.LANGUAGE_SPANISH)
|
||||
st = loc.GetString('Next')
|
||||
#self.assertEqual(st, 'Siguiente')
|
||||
self.assertEqual(st, 'Siguiente')
|
||||
|
||||
|
||||
def test_intlConstants(self):
|
||||
|
||||
Reference in New Issue
Block a user