View | Details | Raw Unified | Return to bug 17915 | Differences between
and this patch

Collapse All | Expand All

(-)debian/changelog (+7 lines)
 Lines 1-3    Link Here 
1
univention-directory-manager-module-example (2.0.9-1) unstable; urgency=low
2
3
  * Initialize locale (Bug #17915)
4
  * Update german translation.
5
6
 -- Philipp Hahn <hahn@univention.de>  Fri, 18 Feb 2011 11:30:56 +0100
7
1
univention-directory-manager-module-example (2.0.8-1) unstable; urgency=low
8
univention-directory-manager-module-example (2.0.8-1) unstable; urgency=low
2
9
3
  * Fix installation path of translation catalog (Bug #17915)
10
  * Fix installation path of translation catalog (Bug #17915)
(-)scripts/ip-phone-tool (-3 / +4 lines)
 Lines 45-51    Link Here 
45
import univention.admin.localization
45
import univention.admin.localization
46
from optparse import OptionParser, OptionValueError
46
from optparse import OptionParser, OptionValueError
47
47
48
translation=univention.admin.localization.translation('univention.admin.handlers.test')	## missing in this example
48
univention.admin.localization.locale.setlocale(univention.admin.localization.locale.LC_ALL, '')
49
translation = univention.admin.localization.translation('univention.admin.handlers.test')
49
_ = translation.translate
50
_ = translation.translate
50
51
51
class ipphonetool:
52
class ipphonetool:
 Lines 184-194    Link Here 
184
185
185
if __name__ == '__main__':
186
if __name__ == '__main__':
186
187
187
	usage = """usage: %prog [options] arguments
188
	usage = _("""usage: %prog [options] arguments
188
   e.g. ip-phone-tool set voip1 10.1.0.42 sip:user1@dom.local
189
   e.g. ip-phone-tool set voip1 10.1.0.42 sip:user1@dom.local
189
   or   ip-phone-tool set voip1 10.1.0.42 sip:user1@dom.local --redirect sip:otheruser@dom.local
190
   or   ip-phone-tool set voip1 10.1.0.42 sip:user1@dom.local --redirect sip:otheruser@dom.local
190
   or   ip-phone-tool clear_redirect voip1
191
   or   ip-phone-tool clear_redirect voip1
191
   or   ip-phone-tool remove voip1"""
192
   or   ip-phone-tool remove voip1""")
192
193
193
	parser = OptionParser(usage=usage)
194
	parser = OptionParser(usage=usage)
194
	parser.add_option( '-D', '--binddn',
195
	parser.add_option( '-D', '--binddn',
195
  + *
196
  + *
(-)modules/univention/admin/handlers/test/de.po (-8 / +40 lines)
 Lines 1-3    Link Here 
1
# Translation for UDM example module
2
# Copyright (C) Copyright 2005-2011 Univention GmbH
3
# This file is distributed under the same license as the univention-directory-manager-module-example package.
4
#
5
msgid ""
6
msgstr ""
7
"Project-Id-Version: univention-directory-manager-module-example 2.0.9\n"
8
"Report-Msgid-Bugs-To: \n"
9
"POT-Creation-Date: 2011-02-18 11:21+0100\n"
10
"PO-Revision-Date: 2011-02-18 11:16+0100\n"
11
"Last-Translator: Philipp Hahn <hahn@univention.de>\n"
12
"Language-Team: German <de@li.org>\n"
13
"MIME-Version: 1.0\n"
14
"Content-Type: text/plain; charset=utf-8\n"
15
"Content-Transfer-Encoding: 8bit\n"
16
1
#: modules/univention/admin/handlers/test/ip_phone.py:46
17
#: modules/univention/admin/handlers/test/ip_phone.py:46
2
msgid "VoIP_Protocol"
18
msgid "VoIP_Protocol"
3
msgstr "VoIP_Protokoll"
19
msgstr "VoIP_Protokoll"
 Lines 103-136    Link Here 
103
msgid "Redirect Option"
119
msgid "Redirect Option"
104
msgstr "Rufumleitungsoption"
120
msgstr "Rufumleitungsoption"
105
121
106
#: scripts/ip-phone-tool:163
122
#: scripts/ip-phone-tool:188
123
msgid ""
124
"usage: %prog [options] arguments\n"
125
"   e.g. ip-phone-tool set voip1 10.1.0.42 sip:user1@dom.local\n"
126
"   or   ip-phone-tool set voip1 10.1.0.42 sip:user1@dom.local --redirect sip:"
127
"otheruser@dom.local\n"
128
"   or   ip-phone-tool clear_redirect voip1\n"
129
"   or   ip-phone-tool remove voip1"
130
msgstr ""
131
"usage: %prog [Optionen] Argumente\n"
132
"   z.B. ip-phone-tool set voip1 10.1.0.42 sip:user1@dom.local\n"
133
"   oder ip-phone-tool set voip1 10.1.0.42 sip:user1@dom.local --redirect sip:"
134
"otheruser@dom.local\n"
135
"   oder ip-phone-tool clear_redirect voip1\n"
136
"   oder ip-phone-tool remove voip1"
137
138
#: scripts/ip-phone-tool:197
107
msgid "LDAP Bind DN"
139
msgid "LDAP Bind DN"
108
msgstr "LDAP Bind DN"
140
msgstr "LDAP Bind DN"
109
141
110
#: scripts/ip-phone-tool:166
142
#: scripts/ip-phone-tool:200
111
msgid "LDAP Bind Password"
143
msgid "LDAP Bind Password"
112
msgstr "LDAP Bind Password"
144
msgstr "LDAP Bind Password"
113
145
114
#: scripts/ip-phone-tool:169
146
#: scripts/ip-phone-tool:203
115
msgid "Prompt for password"
147
msgid "Prompt for password"
116
msgstr "Nach Passwort fragen"
148
msgstr "Nach Passwort fragen"
117
149
118
#: scripts/ip-phone-tool:172
150
#: scripts/ip-phone-tool:206
119
msgid "Read password from file"
151
msgid "Read password from file"
120
msgstr "Passwort aus Datei lesen"
152
msgstr "Passwort aus Datei lesen"
121
153
122
#: scripts/ip-phone-tool:175
154
#: scripts/ip-phone-tool:209
123
msgid "Print additional information"
155
msgid "Print additional information"
124
msgstr "Mehr Information ausgeben"
156
msgstr "Mehr Information ausgeben"
125
157
126
#: scripts/ip-phone-tool:183
158
#: scripts/ip-phone-tool:217
127
msgid "Set debug level"
159
msgid "Set debug level"
128
msgstr "Debug Level setzen"
160
msgstr "Debug Level setzen"
129
161
130
#: scripts/ip-phone-tool:186
162
#: scripts/ip-phone-tool:220
131
msgid "Username"
163
msgid "Username"
132
msgstr "Benutzername"
164
msgstr "Benutzername"
133
165
134
#: scripts/ip-phone-tool:190
166
#: scripts/ip-phone-tool:224
135
msgid "Redirect address"
167
msgid "Redirect address"
136
msgstr "Rufumleitungsadresse"
168
msgstr "Rufumleitungsadresse"
(-)modules/univention/admin/handlers/test/ip_phone.py (-1 / +1 lines)
 Lines 35-41    Link Here 
35
import univention.admin.syntax		# Liefert standard Syntax-Definitionen für die UDM 'property_descriptions' unten
35
import univention.admin.syntax		# Liefert standard Syntax-Definitionen für die UDM 'property_descriptions' unten
36
36
37
# Für das Einbinden von Übersetzungskatalogen für verschiedene Sprachen
37
# Für das Einbinden von Übersetzungskatalogen für verschiedene Sprachen
38
translation=univention.admin.localization.translation('univention.admin.handlers.test')
38
translation = univention.admin.localization.translation('univention.admin.handlers.test')
39
_ = translation.translate
39
_ = translation.translate
40
40
41
############################ <Syntax definitions> #############################
41
############################ <Syntax definitions> #############################
(-)refresh-i18n (-6 / +6 lines)
 Lines 33-48    Link Here 
33
po=de
33
po=de
34
i18nfile=./modules/univention/admin/handlers/test/$po
34
i18nfile=./modules/univention/admin/handlers/test/$po
35
35
36
xgettext -L Python -o "$po.pot" modules/univention/admin/handlers/test/*.py scripts/ip-phone-tool
36
xgettext -L Python -o "messages.pot" modules/univention/admin/handlers/test/*.py scripts/ip-phone-tool
37
37
38
if grep -qs "Content-Type: text/plain; charset=CHARSET" "$po.pot"
38
if grep -qs "Content-Type: text/plain; charset=CHARSET" "messages.pot"
39
then
39
then
40
	echo "Rewriting encoding information from CHARSET to ISO-8859-15"
40
	echo "Rewriting encoding information from CHARSET to ISO-8859-15"
41
	sed -i "s#Content-Type: text/plain; charset=CHARSET#Content-Type: text/plain; charset=ISO-8859-15#" "$po.pot"
41
	sed -i "s#Content-Type: text/plain; charset=CHARSET#Content-Type: text/plain; charset=ISO-8859-15#" "messages.pot"
42
fi
42
fi
43
43
44
echo "Merging old gettext data with newly introduced strings"
44
echo "Merging old gettext data with newly introduced strings"
45
msgmerge "$i18nfile.po" "$po.pot" > "$po.pox"
45
msgmerge "$i18nfile.po" "messages.pot" > "$po.pox"
46
46
47
echo "Now you need to fix up all "fuzzy" entries in your editor"
47
echo "Now you need to fix up all "fuzzy" entries in your editor"
48
read
48
read
 Lines 60-66    Link Here 
60
    echo "Copying po file"
60
    echo "Copying po file"
61
    cp "$po.pox" "$i18nfile.po"
61
    cp "$po.pox" "$i18nfile.po"
62
    echo "Regenerating mo file"
62
    echo "Regenerating mo file"
63
    msgfmt -o "$i18nfile.mo" "$i18nfile.po"
63
    msgfmt --check -o "$i18nfile.mo" "$i18nfile.po"
64
fi
64
fi
65
65
66
rm -rf "$po.pot" "$po.pox"
66
rm -rf "messages.pot" "$po.pox"

Return to bug 17915