From c2eddc3a6cf2268c60c660c2e7421b462879bae4 Mon Sep 17 00:00:00 2001 From: Andrew Williams Date: Sat, 17 Jan 2009 23:27:41 +0000 Subject: [PATCH] Reorganising files for auto generation of PO/MO --- .../locale/en/LC_MESSAGES/cb-openbox-logout.mo | Bin 267 -> 0 bytes .../locale/en_GB/LC_MESSAGES/openboxlogout.mo | Bin 0 -> 384 bytes openboxlogout/messages.pot | 2 +- .../pofiles/{en.po => openboxlogout_en_GB.po} | 2 +- tools/mki18n.py | 10 +++++----- 5 files changed, 7 insertions(+), 7 deletions(-) delete mode 100644 openboxlogout/locale/en/LC_MESSAGES/cb-openbox-logout.mo create mode 100644 openboxlogout/locale/en_GB/LC_MESSAGES/openboxlogout.mo rename openboxlogout/pofiles/{en.po => openboxlogout_en_GB.po} (94%) diff --git a/openboxlogout/locale/en/LC_MESSAGES/cb-openbox-logout.mo b/openboxlogout/locale/en/LC_MESSAGES/cb-openbox-logout.mo deleted file mode 100644 index 743828aa6b29bc765e076b0a8c836b8572990b80..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 267 zcmX}jJqp4=5C!1T#6Rq;Exe13ML;koSd%3Y!fx0fY`lhdu(P(aw6(MmYfDQj->@48 zJ{~j7d(P4$VTLe=45n}ZzMWtK=eS>xBe=pCZovB;`2PX?{{p_hV}6kQ|BZXn3;zh} zLjpW$2pYufq7bT(4b{7?G)g#0jjptJWTbV%II^{OrQR#D-nLSev?7|luz+_8g4`;FIYmY3f~uE!w=8Zcyvv0p Tg+-Yg%fH4U_-QQeqXzi~K>0+H literal 0 HcmV?d00001 diff --git a/openboxlogout/messages.pot b/openboxlogout/messages.pot index 1b46f7d..7ad668d 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:05+0000\n" +"POT-Creation-Date: 2009-01-17 23:14+0000\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" diff --git a/openboxlogout/pofiles/en.po b/openboxlogout/pofiles/openboxlogout_en_GB.po similarity index 94% rename from openboxlogout/pofiles/en.po rename to openboxlogout/pofiles/openboxlogout_en_GB.po index 24a60f3..9a8979f 100644 --- a/openboxlogout/pofiles/en.po +++ b/openboxlogout/pofiles/openboxlogout_en_GB.po @@ -26,4 +26,4 @@ msgid "lock" msgstr "Lock Screen" msgid "switch" -msgstr "Switch User +msgstr "Switch User" diff --git a/tools/mki18n.py b/tools/mki18n.py index 0d4cfb7..e1cba7c 100755 --- a/tools/mki18n.py +++ b/tools/mki18n.py @@ -1,4 +1,4 @@ -#! /usr/bin/env python +#!/usr/bin/python # -*- coding: iso-8859-1 -*- # # PYTHON MODULE: MKI18N.PY @@ -232,19 +232,19 @@ def makeMO(applicationDirectoryPath,targetDir='./locale',applicationDomain=None, applicationName = applicationDomain currentDir = os.getcwd() os.chdir(applicationDirectoryPath) - languageDict = getlanguageDict() for langCode in languageDict.keys(): if (langCode == 'en') and (forceEnglish==0): pass - else: - langPOfileName = "%s_%s.po" % (applicationName , langCode) + else: + print langCode + langPOfileName = "./pofiles/%s_%s.po" % (applicationName , langCode) if os.path.exists(langPOfileName): mo_targetDir = "%s/%s/LC_MESSAGES" % (targetDir,langCode) if not os.path.exists(mo_targetDir): mkdir(mo_targetDir) - cmd = 'msgfmt --output-file="%s/%s.mo" "%s_%s.po"' % (mo_targetDir,applicationName,applicationName,langCode) + cmd = 'msgfmt --output-file="%s/%s.mo" "%s"' % (mo_targetDir,applicationName, langPOfileName) if verbose: print cmd os.system(cmd) os.chdir(currentDir)