mirror of
https://github.com/wxWidgets/Phoenix.git
synced 2025-12-16 09:40:07 +01:00
Merge pull request #708 from swprojects/i18nwxapp
Small fixes to i18nwxapp
This commit is contained in:
@@ -19,11 +19,11 @@ import wx
|
||||
|
||||
def _displayHook(obj):
|
||||
if obj is not None:
|
||||
print repr(obj)
|
||||
print (repr(obj))
|
||||
|
||||
# add translation macro to builtin similar to what gettext does
|
||||
import __builtin__
|
||||
__builtin__.__dict__['_'] = wx.GetTranslation
|
||||
import builtins
|
||||
builtins.__dict__['_'] = wx.GetTranslation
|
||||
|
||||
import app_const as appC
|
||||
|
||||
|
||||
@@ -48,18 +48,18 @@ tCmd = pyExe + ' ' + pyGettext + ' ' + (gtOptions % (appC.langDomain,
|
||||
appC.langDomain,
|
||||
outFolder,
|
||||
appFolder))
|
||||
print "Generating the .pot file"
|
||||
print "cmd: %s" % tCmd
|
||||
print ("Generating the .pot file")
|
||||
print ("cmd: %s" % tCmd)
|
||||
rCode = subprocess.call(tCmd)
|
||||
print "return code: %s\n\n" % rCode
|
||||
print ("return code: %s\n\n" % rCode)
|
||||
|
||||
for tLang in supportedLang:
|
||||
# build command for msgfmt
|
||||
langDir = os.path.join(appFolder, ('locale\%s\LC_MESSAGES' % tLang))
|
||||
poFile = os.path.join(langDir, appC.langDomain + '.po')
|
||||
tCmd = pyExe + ' ' + pyMsgfmt + ' ' + poFile
|
||||
|
||||
print "Generating the .mo file"
|
||||
print "cmd: %s" % tCmd
|
||||
|
||||
print ("Generating the .mo file")
|
||||
print ("cmd: %s" % tCmd)
|
||||
rCode = subprocess.call(tCmd)
|
||||
print "return code: %s\n\n" % rCode
|
||||
print ("return code: %s\n\n" % rCode)
|
||||
|
||||
Binary file not shown.
@@ -83,7 +83,7 @@ class AppI18N(sc.SizedFrame):
|
||||
defaultDir=os.getcwd(),
|
||||
defaultFile="",
|
||||
wildcard=wildcard,
|
||||
style=wx.OPEN | wx.MULTIPLE | wx.CHANGE_DIR
|
||||
style=wx.FD_OPEN | wx.FD_MULTIPLE | wx.FD_CHANGE_DIR
|
||||
) as dlg:
|
||||
|
||||
# Show the dialog and retrieve the user response. If it is the
|
||||
|
||||
@@ -66,7 +66,7 @@ The ``.pot`` file is then provided to the translators and they use it to
|
||||
generate a ``.po`` file for the language they translate too or they can also use
|
||||
the ``.pot`` file to merge new/changed text strings to an existing ``.po`` file.
|
||||
|
||||
To do the actual translation we recomment `poEdit` [2]_ , it allows you to
|
||||
To do the actual translation we recommend `poEdit` [2]_ , it allows you to
|
||||
create or update a translation catalog (``.po`` file) from the ``.pot`` file.
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user