Final i18n process fixes

This commit is contained in:
Andrew Williams
2009-01-17 23:41:29 +00:00
parent c2eddc3a6c
commit d9cf55c3a5
5 changed files with 105 additions and 23 deletions

View File

@@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2009-01-17 23:14+0000\n"
"POT-Creation-Date: 2009-01-17 23:39+0000\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
@@ -16,20 +16,20 @@ msgstr ""
"Content-Type: text/plain; charset=CHARSET\n"
"Content-Transfer-Encoding: 8bit\n"
#: openboxlogout.py:208
#: openboxlogout.py:209
#, python-format
msgid "Button %s is not a valid button name, removing"
msgstr ""
#: openboxlogout.py:217
#: openboxlogout.py:218
msgid "Can't Hibernate, disabling button"
msgstr ""
#: openboxlogout.py:221
#: openboxlogout.py:222
msgid "Can't Safe Suspend, disabling button"
msgstr ""
#: openboxlogout.py:213
#: openboxlogout.py:214
msgid "Can't Suspend, disabling button"
msgstr ""
@@ -38,7 +38,7 @@ msgstr ""
msgid "Color %s is not a valid color, defaulting to black"
msgstr ""
#: openboxlogout.py:225
#: openboxlogout.py:226
msgid "No valid buttons found, resetting to defaults"
msgstr ""
@@ -54,3 +54,39 @@ msgstr ""
#, python-format
msgid "Unable to find config file %s"
msgstr ""
#: openboxlogout.py:192
msgid "cancel"
msgstr ""
#: openboxlogout.py:192
msgid "hibernate"
msgstr ""
#: openboxlogout.py:192
msgid "lock"
msgstr ""
#: openboxlogout.py:192
msgid "logout"
msgstr ""
#: openboxlogout.py:192
msgid "restart"
msgstr ""
#: openboxlogout.py:192
msgid "safesuspend"
msgstr ""
#: openboxlogout.py:192
msgid "shutdown"
msgstr ""
#: openboxlogout.py:192
msgid "suspend"
msgstr ""
#: openboxlogout.py:192
msgid "switch"
msgstr ""

View File

@@ -39,7 +39,7 @@ class OpenboxLogout():
# Start logger and gettext/i18n
self.logger = logging.getLogger('OpenboxLogout')
gettext.install('cb-openbox-logout', '%s/locale' % self.determine_path(), unicode=1)
gettext.install('openboxlogout', '%s/locale' % self.determine_path(), unicode=1)
# Start dbus interface
bus = dbus.SystemBus()
@@ -189,6 +189,7 @@ class OpenboxLogout():
# Load and parse button list
validbuttons = ['cancel', 'logout', 'restart', 'shutdown', 'suspend', 'hibernate', 'safesuspend', 'lock', 'switch']
buttonname = [_('cancel'), _('logout'), _('restart'), _('shutdown'), _('suspend'), _('hibernate'), _('safesuspend'), _('lock'), _('switch')]
try:
blist = self.parser.get("looks", "buttons")

View File

@@ -1,29 +1,74 @@
domain "cb-openbox-logout"
#: openboxlogout.py:209
#, python-format
msgid "Button %s is not a valid button name, removing"
msgstr "Button %s is not a valid button name, removing"
#: NAME
msgid "logout"
msgstr "Log Out"
#: openboxlogout.py:218
msgid "Can't Hibernate, disabling button"
msgstr "Can't Hibernate, disabling button"
msgid "shutdown"
msgstr "Shutdown"
#: openboxlogout.py:222
msgid "Can't Safe Suspend, disabling button"
msgstr "Can't Safe Suspend, disabling button"
#: openboxlogout.py:214
msgid "Can't Suspend, disabling button"
msgstr "Can't Suspend, disabling button"
#: openboxlogout.py:187
#, python-format
msgid "Color %s is not a valid color, defaulting to black"
msgstr "Color %s is not a valid color, defaulting to black"
#: openboxlogout.py:226
msgid "No valid buttons found, resetting to defaults"
msgstr "No valid buttons found, resetting to defaults"
#: openboxlogout.py:54
msgid "Openbox Logout"
msgstr "Openbox Logout"
#: openboxlogout.py:142
msgid "Unable to determin the module path, exiting..."
msgstr "Unable to determin the module path, exiting..."
#: openboxlogout.py:154
#, python-format
msgid "Unable to find config file %s"
msgstr "Unable to find config file %s"
#: openboxlogout.py:192
msgid "cancel"
msgstr "Cancel"
msgid "restart"
msgstr "Restart"
msgid "suspend"
msgstr "Suspend"
#: openboxlogout.py:192
msgid "hibernate"
msgstr "Hibernate"
#: openboxlogout.py:192
msgid "lock"
msgstr "Lock"
#: openboxlogout.py:192
msgid "logout"
msgstr "Logout"
#: openboxlogout.py:192
msgid "restart"
msgstr "Restart"
#: openboxlogout.py:192
msgid "safesuspend"
msgstr "Safe Suspend"
msgid "lock"
msgstr "Lock Screen"
#: openboxlogout.py:192
msgid "shutdown"
msgstr "Shutdown"
#: openboxlogout.py:192
msgid "suspend"
msgstr "Suspend"
#: openboxlogout.py:192
msgid "switch"
msgstr "Switch User"

View File

@@ -155,7 +155,7 @@ def makePO(applicationDirectoryPath, applicationDomain=None, verbose=0) :
if langCode == 'en':
pass
else:
langPOfileName = "%s_%s.po" % (applicationName , langCode)
langPOfileName = "./pofiles/%s_%s.po" % (applicationName , langCode)
if os.path.exists(langPOfileName):
cmd = 'msgmerge -s --no-wrap "%s" messages.pot > "%s.new"' % (langPOfileName, langPOfileName)
if verbose: print cmd
@@ -183,7 +183,7 @@ def catPO(applicationDirectoryPath, listOf_extraPo, applicationDomain=None, targ
if langCode == 'en':
pass
else:
langPOfileName = "%s_%s.po" % (applicationName , langCode)
langPOfileName = "./pofiles/%s_%s.po" % (applicationName , langCode)
if os.path.exists(langPOfileName):
fileList = ''
for fileName in listOf_extraPo: