From 2de753a946da4d5cccf6ed1a827598bf314c3e12 Mon Sep 17 00:00:00 2001 From: Adi Roiban Date: Tue, 31 Mar 2009 19:04:08 +0300 Subject: [PATCH] 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 ""