From d9cf55c3a50a2c9d9eac17d49f96aed5b02142e6 Mon Sep 17 00:00:00 2001 From: Andrew Williams Date: Sat, 17 Jan 2009 23:41:29 +0000 Subject: [PATCH] Final i18n process fixes --- .../locale/en_GB/LC_MESSAGES/openboxlogout.mo | Bin 384 -> 1262 bytes openboxlogout/messages.pot | 48 ++++++++++-- openboxlogout/openboxlogout.py | 3 +- openboxlogout/pofiles/openboxlogout_en_GB.po | 73 ++++++++++++++---- tools/mki18n.py | 4 +- 5 files changed, 105 insertions(+), 23 deletions(-) diff --git a/openboxlogout/locale/en_GB/LC_MESSAGES/openboxlogout.mo b/openboxlogout/locale/en_GB/LC_MESSAGES/openboxlogout.mo index 1e0c6881599dfb9e245071ea484b7d9ca323540b..635452ca0d2c5b9cb0076c9941e18a4a980d4c87 100644 GIT binary patch literal 1262 zcmeH_zit#U5XL7Y{Qn<8fdpcZ2vCG85G6E3K@=yDa>@gEcfGe3dv>(;CP7p@1SO(_ zh9V7AsSqzfO94_O-h=Pk+lvAs9VH`=e$sem{MqC0iwmy>wg|rp{{X)Re=sL90C&I} z;1BR7ICn(kI(Q4b2R;Vxf-k^x;CqmDpFsBc2_6II=S5C}r@#g963F-!@HnX8Y48qs z0=(bHAA-zV1=)89QqN0}dftH4^BJU`J&<}X;}Ggu0a>>OQqL=p{oaDq^A5z4oj(2% zq@G>y4EP14p09oU8%UjdAg#L-i0A1H*A+s`QGG~ibko$X&}_Ql&BQKiV<%zL`LV1Re>>?Dm)XXfgq^}glhxSj z3;K+aDXos$xM6*9c+%nfp$^SoMCFX5pDj&WC!U&uX0^$m%hT|i@Tg^Id3Ix?O|#U# zFv>Fs%fhw}!#K1_);%s^*{rb1HWTMHRaPgVXc68psajUM?bv287#v71oi8*GzI0

?7|luz+_8g4`;FIYmY3f~uE!w=8Zcyvv0p Tg+-Yg%fH4U_-QQeqXzi~K>0+H diff --git a/openboxlogout/messages.pot b/openboxlogout/messages.pot index 7ad668d..076fb48 100644 --- a/openboxlogout/messages.pot +++ b/openboxlogout/messages.pot @@ -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 \n" "Language-Team: LANGUAGE \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 "" diff --git a/openboxlogout/openboxlogout.py b/openboxlogout/openboxlogout.py index aa47c36..145758e 100644 --- a/openboxlogout/openboxlogout.py +++ b/openboxlogout/openboxlogout.py @@ -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") diff --git a/openboxlogout/pofiles/openboxlogout_en_GB.po b/openboxlogout/pofiles/openboxlogout_en_GB.po index 9a8979f..bca2f55 100644 --- a/openboxlogout/pofiles/openboxlogout_en_GB.po +++ b/openboxlogout/pofiles/openboxlogout_en_GB.po @@ -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" diff --git a/tools/mki18n.py b/tools/mki18n.py index e1cba7c..7464e36 100755 --- a/tools/mki18n.py +++ b/tools/mki18n.py @@ -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: