From 2de753a946da4d5cccf6ed1a827598bf314c3e12 Mon Sep 17 00:00:00 2001 From: Adi Roiban Date: Tue, 31 Mar 2009 19:04:08 +0300 Subject: [PATCH 1/2] read i18n files from POTFILES and update the pot before each build --- debian/rules | 15 ++++++---- po/POTFILES.python | 3 ++ po/POTFILES.sh | 5 ++++ po/screen-profiles.pot | 62 ++---------------------------------------- 4 files changed, 20 insertions(+), 65 deletions(-) create mode 100644 po/POTFILES.python create mode 100644 po/POTFILES.sh diff --git a/debian/rules b/debian/rules index 824705a8..bc4484cc 100755 --- a/debian/rules +++ b/debian/rules @@ -5,6 +5,7 @@ # export DH_VERBOSE=1 PACKAGE=screen-profiles +TEXTDOMAIN=screen-profiles VER=`head -n 1 debian/changelog | sed 's/^.*(//' | sed 's/).*//' | sed 's/-.*//'` get-orig-source: @@ -12,10 +13,14 @@ get-orig-source: -[ -d ../${PACKAGE} ] && mv ../${PACKAGE} ../${PACKAGE}-${VER} tar -C ../ --exclude .bzr --exclude debian -zcvf ../${PACKAGE}_${VER}.orig.tar.gz ${PACKAGE}-${VER} -get-po: - xgettext -o po/screen-profiles.pot -L Python -d screen-profiles screen-profiles - xgettext -j -o po/screen-profiles.pot -L Shell -d screen-profiles select-screen-profile screen-profiles-export bin/menu - +update-pot: + rm -f po/${TEXTDOMAIN}.pot + grep -v "#" po/POTFILES.sh | while read po ; do \ + xgettext -o po/${TEXTDOMAIN}.pot -L Shell $${po} ; \ + done + grep -v "#" po/POTFILES.python | while read po ; do \ + xgettext -o po/${TEXTDOMAIN}.pot -L Python $${po} ; \ + done prebuild: @@ -27,7 +32,7 @@ clean: dh_clean ./profiles/generate --clean -install: build +install: build update-pot dh_testdir dh_testroot dh_clean -k diff --git a/po/POTFILES.python b/po/POTFILES.python new file mode 100644 index 00000000..e9d8cb3e --- /dev/null +++ b/po/POTFILES.python @@ -0,0 +1,3 @@ +# List of source files containing translatable Python strings. +# Please keep this file sorted alphabetically. +screen-profiles diff --git a/po/POTFILES.sh b/po/POTFILES.sh new file mode 100644 index 00000000..4923c92c --- /dev/null +++ b/po/POTFILES.sh @@ -0,0 +1,5 @@ +# List of source files containing translatable sh strings. +# Please keep this file sorted alphabetically. +bin/menu +select-screen-profile +screen-profiles-export diff --git a/po/screen-profiles.pot b/po/screen-profiles.pot index 319b9c45..918eef76 100644 --- a/po/screen-profiles.pot +++ b/po/screen-profiles.pot @@ -3,12 +3,13 @@ # This file is distributed under the same license as the PACKAGE package. # FIRST AUTHOR , YEAR. # +#: screen-profiles:296 #, fuzzy msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2009-03-31 06:04-0500\n" +"POT-Creation-Date: 2009-03-31 18:58+0300\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -149,62 +150,3 @@ msgstr "" #: screen-profiles:463 msgid "/ between elements | Validates" msgstr "" - -#: select-screen-profile:48 -msgid "Error:" -msgstr "" - -#: select-screen-profile:48 -msgid " file exists, but is not a symlink" -msgstr "" - -#: select-screen-profile:81 -msgid "Select a screen profile: " -msgstr "" - -#: select-screen-profile:100 screen-profiles-export:56 -#: screen-profiles-export:180 -msgid "ERROR: Invalid selection" -msgstr "" - -#: select-screen-profile:107 select-screen-profile:109 -#: screen-profiles-export:61 screen-profiles-export:63 -msgid "Choose" -msgstr "" - -#: select-screen-profile:135 -msgid "" -"If you are using the default set of keybindings, press\\n to " -"activate these changes.\\n\\nOtherwise, exit this screen session and start a " -"new one." -msgstr "" - -#: select-screen-profile:137 -msgid "Run \"screen\" to activate" -msgstr "" - -#: screen-profiles-export:194 -msgid "Select a distro: " -msgstr "" - -#: screen-profiles-export:198 -msgid "Select a color: " -msgstr "" - -#: screen-profiles-export:231 -msgid "Profile" -msgstr "" - -#: screen-profiles-export:232 -msgid "Archive" -msgstr "" - -#: screen-profiles-export:233 -msgid "" -"Extract this archive in your home directory on the target system, and run " -"'screen'." -msgstr "" - -#: bin/menu:24 -msgid "Menu:" -msgstr "" From 64915a1bdd071f7ea9de4a1c4b6aec97d2eff886 Mon Sep 17 00:00:00 2001 From: Adi Roiban Date: Tue, 31 Mar 2009 20:02:36 +0300 Subject: [PATCH 2/2] generate .mo files --- debian/install | 1 + debian/rules | 12 +++- po/es.po | 157 +++++++++++++++++++++++++++++++++++++---- po/fr.po | 157 +++++++++++++++++++++++++++++++++++++---- po/screen-profiles.pot | 2 +- 5 files changed, 301 insertions(+), 28 deletions(-) diff --git a/debian/install b/debian/install index d8fc24b5..5af3cf92 100644 --- a/debian/install +++ b/debian/install @@ -1,4 +1,5 @@ bin/* var/lib/screen-profiles +po/locale/* usr/share/locale profiles/common usr/share/screen-profiles/profiles profiles/plain usr/share/screen-profiles/profiles profiles/ubuntu-black usr/share/screen-profiles/profiles diff --git a/debian/rules b/debian/rules index bc4484cc..9edcd01b 100755 --- a/debian/rules +++ b/debian/rules @@ -13,6 +13,13 @@ get-orig-source: -[ -d ../${PACKAGE} ] && mv ../${PACKAGE} ../${PACKAGE}-${VER} tar -C ../ --exclude .bzr --exclude debian -zcvf ../${PACKAGE}_${VER}.orig.tar.gz ${PACKAGE}-${VER} +install-po: update-pot + for po in po/*.po ; do \ + lang=$${po#po/}; lang=$${lang%.po}; \ + mkdir -p po/locale/$${lang}/LC_MESSAGES/; \ + msgfmt $${po} -o po/locale/$${lang}/LC_MESSAGES/${TEXTDOMAIN}.mo ; \ + done + update-pot: rm -f po/${TEXTDOMAIN}.pot grep -v "#" po/POTFILES.sh | while read po ; do \ @@ -21,6 +28,9 @@ update-pot: grep -v "#" po/POTFILES.python | while read po ; do \ xgettext -o po/${TEXTDOMAIN}.pot -L Python $${po} ; \ done + for po in po/*.po ; do \ + msgmerge $${po} po/${TEXTDOMAIN}.pot -o $${po} ; \ + done prebuild: @@ -32,7 +42,7 @@ clean: dh_clean ./profiles/generate --clean -install: build update-pot +install: build install-po dh_testdir dh_testroot dh_clean -k diff --git a/po/es.po b/po/es.po index 38121d36..07cfa5e8 100644 --- a/po/es.po +++ b/po/es.po @@ -3,12 +3,13 @@ # This file is distributed under the same license as the GNU Screen Profiles package. # Nicolas Valcarcel , 2008. # +#: screen-profiles:296 #, fuzzy msgid "" msgstr "" "Project-Id-Version: 1.0\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2008-12-17 23:42+0100\n" +"POT-Creation-Date: 2009-03-31 20:00+0300\n" "PO-Revision-Date: 2008-12-22 01:01-0500\n" "Last-Translator: Nicolas Valcarcel \n" "Language-Team: LANGUAGE \n" @@ -16,18 +17,148 @@ msgstr "" "Content-Type: text/plain; charset=utf-8\n" "Content-Transfer-Encoding: 8bit\n" -#: select-screen-profile:9 select-screen-profile:16 -msgid "Error:" -msgstr "Error:" +#: screen-profiles:71 +msgid "Remove screen by default at login" +msgstr "" -#: select-screen-profile:9 select-screen-profile:16 -msgid "exists, but is not a symlink" -msgstr "existe, pero no es un symlink" +#: screen-profiles:73 +msgid "Install screen by default at login" +msgstr "" -#: select-screen-profile:30 -msgid "recommended" -msgstr "recomendado" +#: screen-profiles:77 +msgid "Help" +msgstr "" -#: select-screen-profile:41 select-screen-profile:43 -msgid "Choose" -msgstr "Eleccion" +#: screen-profiles:78 +msgid "Change screen profile" +msgstr "" + +#: screen-profiles:79 +msgid "Toggle status notifications" +msgstr "" + +#: screen-profiles:80 +msgid "Change keybinding set" +msgstr "" + +#: screen-profiles:81 +msgid "Change escape sequence" +msgstr "" + +#: screen-profiles:82 +msgid "Create new window(s)" +msgstr "" + +#: screen-profiles:83 +msgid "Manage default windows" +msgstr "" + +#: screen-profiles:85 +msgid "Exit" +msgstr "" + +#: screen-profiles:87 screen-profiles:462 +msgid " Screen Profiles Configuration Menu" +msgstr "" + +#: screen-profiles:98 +msgid "Okay" +msgstr "" + +#: screen-profiles:98 screen-profiles:134 screen-profiles:150 +#: screen-profiles:185 screen-profiles:303 screen-profiles:345 +#: screen-profiles:423 +msgid "Cancel" +msgstr "" + +#: screen-profiles:116 screen-profiles:143 screen-profiles:157 +#: screen-profiles:316 screen-profiles:370 screen-profiles:378 +#: screen-profiles:451 +msgid "Menu" +msgstr "" + +#: screen-profiles:117 +msgid "Screen Profiles Help" +msgstr "" + +#: screen-profiles:134 screen-profiles:150 screen-profiles:185 +#: screen-profiles:303 screen-profiles:345 screen-profiles:423 +msgid "Apply" +msgstr "" + +#: screen-profiles:136 +msgid "Which profile would you like to use?" +msgstr "" + +#: screen-profiles:142 screen-profiles:156 screen-profiles:315 +#: screen-profiles:377 screen-profiles:449 +msgid "Message" +msgstr "" + +#: screen-profiles:151 +msgid "Which set of keybindings would you like to use?" +msgstr "" + +#: screen-profiles:165 +msgid "Title: " +msgstr "" + +#: screen-profiles:167 +msgid "Command: " +msgstr "" + +#: screen-profiles:169 +msgid "Presets: " +msgstr "" + +#: screen-profiles:183 +msgid "Add to default windows" +msgstr "" + +#: screen-profiles:187 +msgid "Create new window(s):" +msgstr "" + +#: screen-profiles:304 +msgid "Toggle status notifications:" +msgstr "" + +#: screen-profiles:337 +msgid "Windows:" +msgstr "" + +#: screen-profiles:347 +msgid "Select window(s) to create by default:" +msgstr "" + +#: screen-profiles:367 +msgid "Screen will be launched automatically next time you login." +msgstr "" + +#: screen-profiles:375 +msgid "Screen will not be used next time you login." +msgstr "" + +#: screen-profiles:422 +msgid "Escape key: ctrl-" +msgstr "" + +#: screen-profiles:425 +msgid "Change escape sequence:" +msgstr "" + +#: screen-profiles:463 +msgid "/ between elements | Validates" +msgstr "" + +#~ msgid "Error:" +#~ msgstr "Error:" + +#~ msgid "exists, but is not a symlink" +#~ msgstr "existe, pero no es un symlink" + +#~ msgid "recommended" +#~ msgstr "recomendado" + +#~ msgid "Choose" +#~ msgstr "Eleccion" diff --git a/po/fr.po b/po/fr.po index a5c9f8ca..db24ffaf 100644 --- a/po/fr.po +++ b/po/fr.po @@ -3,12 +3,13 @@ # This file is distributed under the same license as the GNU Screen Profiles package. # Nicolas Barcet , 2008. # +#: screen-profiles:296 #, fuzzy msgid "" msgstr "" "Project-Id-Version: 1.0\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2008-12-17 23:42+0100\n" +"POT-Creation-Date: 2009-03-31 20:00+0300\n" "PO-Revision-Date: 2008-12-17 23:42+0100\n" "Last-Translator: Nicolas Barcet \n" "Language-Team: LANGUAGE \n" @@ -16,18 +17,148 @@ msgstr "" "Content-Type: text/plain; charset=utf-8\n" "Content-Transfer-Encoding: 8bit\n" -#: select-screen-profile:9 select-screen-profile:16 -msgid "Error:" -msgstr "Erreur :" +#: screen-profiles:71 +msgid "Remove screen by default at login" +msgstr "" -#: select-screen-profile:9 select-screen-profile:16 -msgid "exists, but is not a symlink" -msgstr "existe, mais n'est pas un lien symbolique" +#: screen-profiles:73 +msgid "Install screen by default at login" +msgstr "" -#: select-screen-profile:30 -msgid "recommended" -msgstr "recommandé" +#: screen-profiles:77 +msgid "Help" +msgstr "" -#: select-screen-profile:41 select-screen-profile:43 -msgid "Choose" -msgstr "Choisir" +#: screen-profiles:78 +msgid "Change screen profile" +msgstr "" + +#: screen-profiles:79 +msgid "Toggle status notifications" +msgstr "" + +#: screen-profiles:80 +msgid "Change keybinding set" +msgstr "" + +#: screen-profiles:81 +msgid "Change escape sequence" +msgstr "" + +#: screen-profiles:82 +msgid "Create new window(s)" +msgstr "" + +#: screen-profiles:83 +msgid "Manage default windows" +msgstr "" + +#: screen-profiles:85 +msgid "Exit" +msgstr "" + +#: screen-profiles:87 screen-profiles:462 +msgid " Screen Profiles Configuration Menu" +msgstr "" + +#: screen-profiles:98 +msgid "Okay" +msgstr "" + +#: screen-profiles:98 screen-profiles:134 screen-profiles:150 +#: screen-profiles:185 screen-profiles:303 screen-profiles:345 +#: screen-profiles:423 +msgid "Cancel" +msgstr "" + +#: screen-profiles:116 screen-profiles:143 screen-profiles:157 +#: screen-profiles:316 screen-profiles:370 screen-profiles:378 +#: screen-profiles:451 +msgid "Menu" +msgstr "" + +#: screen-profiles:117 +msgid "Screen Profiles Help" +msgstr "" + +#: screen-profiles:134 screen-profiles:150 screen-profiles:185 +#: screen-profiles:303 screen-profiles:345 screen-profiles:423 +msgid "Apply" +msgstr "" + +#: screen-profiles:136 +msgid "Which profile would you like to use?" +msgstr "" + +#: screen-profiles:142 screen-profiles:156 screen-profiles:315 +#: screen-profiles:377 screen-profiles:449 +msgid "Message" +msgstr "" + +#: screen-profiles:151 +msgid "Which set of keybindings would you like to use?" +msgstr "" + +#: screen-profiles:165 +msgid "Title: " +msgstr "" + +#: screen-profiles:167 +msgid "Command: " +msgstr "" + +#: screen-profiles:169 +msgid "Presets: " +msgstr "" + +#: screen-profiles:183 +msgid "Add to default windows" +msgstr "" + +#: screen-profiles:187 +msgid "Create new window(s):" +msgstr "" + +#: screen-profiles:304 +msgid "Toggle status notifications:" +msgstr "" + +#: screen-profiles:337 +msgid "Windows:" +msgstr "" + +#: screen-profiles:347 +msgid "Select window(s) to create by default:" +msgstr "" + +#: screen-profiles:367 +msgid "Screen will be launched automatically next time you login." +msgstr "" + +#: screen-profiles:375 +msgid "Screen will not be used next time you login." +msgstr "" + +#: screen-profiles:422 +msgid "Escape key: ctrl-" +msgstr "" + +#: screen-profiles:425 +msgid "Change escape sequence:" +msgstr "" + +#: screen-profiles:463 +msgid "/ between elements | Validates" +msgstr "" + +#~ msgid "Error:" +#~ msgstr "Erreur :" + +#~ msgid "exists, but is not a symlink" +#~ msgstr "existe, mais n'est pas un lien symbolique" + +#~ msgid "recommended" +#~ msgstr "recommandé" + +#~ msgid "Choose" +#~ msgstr "Choisir" diff --git a/po/screen-profiles.pot b/po/screen-profiles.pot index 918eef76..b392a3fd 100644 --- a/po/screen-profiles.pot +++ b/po/screen-profiles.pot @@ -9,7 +9,7 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2009-03-31 18:58+0300\n" +"POT-Creation-Date: 2009-03-31 20:00+0300\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n"