--- debian/changelog (Revision 22636) +++ debian/changelog (Arbeitskopie) @@ -1,3 +1,10 @@ +univention-directory-manager-module-example (2.0.9-1) unstable; urgency=low + + * Initialize locale (Bug #17915) + * Update german translation. + + -- Philipp Hahn Fri, 18 Feb 2011 11:30:56 +0100 + univention-directory-manager-module-example (2.0.8-1) unstable; urgency=low * Fix installation path of translation catalog (Bug #17915) --- scripts/ip-phone-tool (Revision 22636) +++ scripts/ip-phone-tool (Arbeitskopie) @@ -45,7 +45,8 @@ import univention.admin.localization from optparse import OptionParser, OptionValueError -translation=univention.admin.localization.translation('univention.admin.handlers.test') ## missing in this example +univention.admin.localization.locale.setlocale(univention.admin.localization.locale.LC_ALL, '') +translation = univention.admin.localization.translation('univention.admin.handlers.test') _ = translation.translate class ipphonetool: @@ -184,11 +185,11 @@ if __name__ == '__main__': - usage = """usage: %prog [options] arguments + usage = _("""usage: %prog [options] arguments e.g. ip-phone-tool set voip1 10.1.0.42 sip:user1@dom.local or ip-phone-tool set voip1 10.1.0.42 sip:user1@dom.local --redirect sip:otheruser@dom.local or ip-phone-tool clear_redirect voip1 - or ip-phone-tool remove voip1""" + or ip-phone-tool remove voip1""") parser = OptionParser(usage=usage) parser.add_option( '-D', '--binddn', + * --- modules/univention/admin/handlers/test/de.po (Revision 22636) +++ modules/univention/admin/handlers/test/de.po (Arbeitskopie) @@ -1,3 +1,19 @@ +# Translation for UDM example module +# Copyright (C) Copyright 2005-2011 Univention GmbH +# This file is distributed under the same license as the univention-directory-manager-module-example package. +# +msgid "" +msgstr "" +"Project-Id-Version: univention-directory-manager-module-example 2.0.9\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2011-02-18 11:21+0100\n" +"PO-Revision-Date: 2011-02-18 11:16+0100\n" +"Last-Translator: Philipp Hahn \n" +"Language-Team: German \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=utf-8\n" +"Content-Transfer-Encoding: 8bit\n" + #: modules/univention/admin/handlers/test/ip_phone.py:46 msgid "VoIP_Protocol" msgstr "VoIP_Protokoll" @@ -103,34 +119,50 @@ msgid "Redirect Option" msgstr "Rufumleitungsoption" -#: scripts/ip-phone-tool:163 +#: scripts/ip-phone-tool:188 +msgid "" +"usage: %prog [options] arguments\n" +" e.g. ip-phone-tool set voip1 10.1.0.42 sip:user1@dom.local\n" +" or ip-phone-tool set voip1 10.1.0.42 sip:user1@dom.local --redirect sip:" +"otheruser@dom.local\n" +" or ip-phone-tool clear_redirect voip1\n" +" or ip-phone-tool remove voip1" +msgstr "" +"usage: %prog [Optionen] Argumente\n" +" z.B. ip-phone-tool set voip1 10.1.0.42 sip:user1@dom.local\n" +" oder ip-phone-tool set voip1 10.1.0.42 sip:user1@dom.local --redirect sip:" +"otheruser@dom.local\n" +" oder ip-phone-tool clear_redirect voip1\n" +" oder ip-phone-tool remove voip1" + +#: scripts/ip-phone-tool:197 msgid "LDAP Bind DN" msgstr "LDAP Bind DN" -#: scripts/ip-phone-tool:166 +#: scripts/ip-phone-tool:200 msgid "LDAP Bind Password" msgstr "LDAP Bind Password" -#: scripts/ip-phone-tool:169 +#: scripts/ip-phone-tool:203 msgid "Prompt for password" msgstr "Nach Passwort fragen" -#: scripts/ip-phone-tool:172 +#: scripts/ip-phone-tool:206 msgid "Read password from file" msgstr "Passwort aus Datei lesen" -#: scripts/ip-phone-tool:175 +#: scripts/ip-phone-tool:209 msgid "Print additional information" msgstr "Mehr Information ausgeben" -#: scripts/ip-phone-tool:183 +#: scripts/ip-phone-tool:217 msgid "Set debug level" msgstr "Debug Level setzen" -#: scripts/ip-phone-tool:186 +#: scripts/ip-phone-tool:220 msgid "Username" msgstr "Benutzername" -#: scripts/ip-phone-tool:190 +#: scripts/ip-phone-tool:224 msgid "Redirect address" msgstr "Rufumleitungsadresse" --- modules/univention/admin/handlers/test/ip_phone.py (Revision 22636) +++ modules/univention/admin/handlers/test/ip_phone.py (Arbeitskopie) @@ -35,7 +35,7 @@ import univention.admin.syntax # Liefert standard Syntax-Definitionen für die UDM 'property_descriptions' unten # Für das Einbinden von Übersetzungskatalogen für verschiedene Sprachen -translation=univention.admin.localization.translation('univention.admin.handlers.test') +translation = univention.admin.localization.translation('univention.admin.handlers.test') _ = translation.translate ############################ ############################# --- refresh-i18n (Revision 22636) +++ refresh-i18n (Arbeitskopie) @@ -33,16 +33,16 @@ po=de i18nfile=./modules/univention/admin/handlers/test/$po -xgettext -L Python -o "$po.pot" modules/univention/admin/handlers/test/*.py scripts/ip-phone-tool +xgettext -L Python -o "messages.pot" modules/univention/admin/handlers/test/*.py scripts/ip-phone-tool -if grep -qs "Content-Type: text/plain; charset=CHARSET" "$po.pot" +if grep -qs "Content-Type: text/plain; charset=CHARSET" "messages.pot" then echo "Rewriting encoding information from CHARSET to ISO-8859-15" - sed -i "s#Content-Type: text/plain; charset=CHARSET#Content-Type: text/plain; charset=ISO-8859-15#" "$po.pot" + sed -i "s#Content-Type: text/plain; charset=CHARSET#Content-Type: text/plain; charset=ISO-8859-15#" "messages.pot" fi echo "Merging old gettext data with newly introduced strings" -msgmerge "$i18nfile.po" "$po.pot" > "$po.pox" +msgmerge "$i18nfile.po" "messages.pot" > "$po.pox" echo "Now you need to fix up all "fuzzy" entries in your editor" read @@ -60,7 +60,7 @@ echo "Copying po file" cp "$po.pox" "$i18nfile.po" echo "Regenerating mo file" - msgfmt -o "$i18nfile.mo" "$i18nfile.po" + msgfmt --check -o "$i18nfile.mo" "$i18nfile.po" fi -rm -rf "$po.pot" "$po.pox" +rm -rf "messages.pot" "$po.pox"