1
0
mirror of https://github.com/django/django.git synced 2025-07-05 18:29:11 +00:00

i18n: made the make-messages.py script work much better by using msgmerge and msguniq

and fixed the german translation file (mostly the header)


git-svn-id: http://code.djangoproject.com/svn/django/branches/i18n@798 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
Georg Bauer 2005-10-07 23:18:29 +00:00
parent b70beda043
commit 9fb343a443
2 changed files with 116 additions and 126 deletions

View File

@ -37,12 +37,16 @@ basedir = os.path.join(basedir, lang, 'LC_MESSAGES')
if not os.path.isdir(basedir): if not os.path.isdir(basedir):
os.makedirs(basedir) os.makedirs(basedir)
lf = os.path.join(basedir, '%s.po' % domain)
tpl_i18n_re = re.compile(r'{%\s+i18n\s+.*?%}') tpl_i18n_re = re.compile(r'{%\s+i18n\s+.*?%}')
tpl_value_re = re.compile(r'{{\s*_\(.*?\)\s*}}') tpl_value_re = re.compile(r'{{\s*_\(.*?\)\s*}}')
tpl_tag_re = re.compile(r"""{%.*_\((?:".*?")|(?:'.*?')\).*%}""") tpl_tag_re = re.compile(r"""{%.*_\((?:".*?")|(?:'.*?')\).*%}""")
pofile = os.path.join(basedir, '%s.po' % domain)
potfile = os.path.join(basedir, '%s.pot' % domain)
if os.path.exists(potfile):
os.unlink(potfile)
for (dirpath, dirnames, filenames) in os.walk("."): for (dirpath, dirnames, filenames) in os.walk("."):
for file in filenames: for file in filenames:
if file.endswith('.py') or file.endswith('.html'): if file.endswith('.py') or file.endswith('.html'):
@ -59,11 +63,17 @@ for (dirpath, dirnames, filenames) in os.walk("."):
open(os.path.join(dirpath, '%s.py' % file), "wb").write('\n'.join(lst)) open(os.path.join(dirpath, '%s.py' % file), "wb").write('\n'.join(lst))
thefile = '%s.py' % file thefile = '%s.py' % file
if verbose: sys.stdout.write('processing file %s in %s\n' % (file, dirpath)) if verbose: sys.stdout.write('processing file %s in %s\n' % (file, dirpath))
if os.path.isfile(lf): cmd = 'xgettext %s -d %s -L Python -o - "%s"' % (
cmd = 'xgettext -j -d %s -L Python -p "%s" "%s"' % (domain, basedir, os.path.join(dirpath, thefile)) os.path.exists(potfile) and '--omit-header' or '', domain, os.path.join(dirpath, thefile))
else: msgs = os.popen(cmd, 'r').read()
cmd = 'xgettext -d %s -L Python -p "%s" "%s"' % (domain, basedir, os.path.join(dirpath, thefile)) if msgs:
os.system(cmd) open(potfile, 'ab').write(msgs)
if thefile != file: if thefile != file:
os.unlink(os.path.join(dirpath, thefile)) os.unlink(os.path.join(dirpath, thefile))
msgs = os.popen('msguniq %s' % potfile, 'r').read()
open(potfile, 'w').write(msgs)
msgs = os.popen('msgmerge %s %s' % (pofile, potfile), 'r').read()
open(pofile, 'wb').write(msgs)
os.unlink(potfile)

View File

@ -6,72 +6,95 @@
#, fuzzy #, fuzzy
msgid "" msgid ""
msgstr "" msgstr ""
"Project-Id-Version: PACKAGE VERSION\n" "Project-Id-Version: Django 1.0\n"
"Report-Msgid-Bugs-To: \n" "Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2005-10-01 18:22+0200\n" "POT-Creation-Date: 2005-10-08 00:07+0200\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "PO-Revision-Date: 2005-10-08 00:03+0200\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" "Last-Translator: Georg Bauer <gb@bofh.ms>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
"MIME-Version: 1.0\n" "MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=iso-8859-1\n" "Content-Type: text/plain; charset=iso-8859-1\n"
"Content-Transfer-Encoding: 8bit\n" "Content-Transfer-Encoding: 8bit\n"
#: core/validators.py:56 #: conf/admin_templates/admin_object_history.html.py:1
msgid "This value must contain only letters, numbers and underscores." #: conf/admin_templates/base.html.py:4
msgstr "Der Wert darf nur Buchstaben, Ziffern und Unterstriche enthalten." #: conf/admin_templates/registration/password_change_done.html.py:1
#: conf/admin_templates/registration/password_reset_form.html.py:1
#: conf/admin_templates/registration/logged_out.html.py:1
#: conf/admin_templates/registration/password_reset_done.html.py:1
#: conf/admin_templates/registration/password_change_form.html.py:1
msgid "Home"
msgstr "Start"
#: conf/admin_templates/404.html:3 conf/admin_templates/404.html:7 #: conf/admin_templates/admin_object_history.html.py:2
#: conf/admin_templates/404.html.py:1 conf/admin_templates/404.html.py:2 msgid "History"
msgid "Page not found" msgstr "Geschichte"
msgstr "Seite nicht gefunden"
#: conf/admin_templates/404.html:9 conf/admin_templates/404.html.py:3 #: conf/admin_templates/admin_object_history.html.py:3
msgid "We're sorry, but the requested page could not be found." msgid "Date/time"
msgstr "Datum/Zeit"
#: conf/admin_templates/admin_object_history.html.py:4
msgid "User"
msgstr "Benutzer"
#: conf/admin_templates/admin_object_history.html.py:5
msgid "Action"
msgstr "Aktion"
#: conf/admin_templates/admin_object_history.html.py:6
msgid ""
"This object doesn't have a change history. It probably wasn't added via this "
"admin site."
msgstr "" msgstr ""
"Es tut uns leid, aber die angeforderte Seite kann nicht gefunden werden." "Dieses Objekt hat keine Änderungsgeschichte. Es wurde möglicherweise nicht "
"über diese Verwaltungsseiten angelegt."
#: conf/admin_templates/index.html:26
#: conf/admin_templates/changelist_generic.html:8
#: conf/admin_templates/changelist_generic.html.py:1 #: conf/admin_templates/changelist_generic.html.py:1
#: conf/admin_templates/index.html.py:1 #: conf/admin_templates/index.html.py:1
msgid "Add" msgid "Add"
msgstr "Zufügen" msgstr "Zufügen"
#: conf/admin_templates/index.html:32 conf/admin_templates/index.html.py:2 #: conf/admin_templates/changelist_generic.html.py:2
msgid "Change" msgid "Click to change"
msgstr "Ändern" msgstr "Zur Änderung klicken"
#: conf/admin_templates/index.html:50 conf/admin_templates/index.html.py:4
msgid "Recent Actions"
msgstr "Kürzliche Aktionen"
#: conf/admin_templates/index.html:51 conf/admin_templates/index.html.py:5
msgid "My Actions"
msgstr "Meine Aktionen"
#: conf/admin_templates/index.html:55 conf/admin_templates/index.html.py:6
msgid "None available"
msgstr "Keine vorhanden"
#: conf/admin_templates/base_site.html:3
#: conf/admin_templates/base_site.html.py:1 #: conf/admin_templates/base_site.html.py:1
msgid "Django site admin" msgid "Django site admin"
msgstr "Django Systemverwaltung" msgstr "Django Systemverwaltung"
#: conf/admin_templates/base_site.html:6
#: conf/admin_templates/base_site.html.py:2 #: conf/admin_templates/base_site.html.py:2
msgid "Django administration" msgid "Django administration"
msgstr "Django Verwaltung" msgstr "Django Verwaltung"
#: conf/admin_templates/500.html:5 conf/admin_templates/500.html.py:1 #: conf/admin_templates/index.html.py:2
msgid "Change"
msgstr "Ändern"
#: conf/admin_templates/index.html.py:3
msgid "You don't have permission to edit anything."
msgstr "Sie haben keine Berechtigung irgendwas zu ändern."
#: conf/admin_templates/index.html.py:4
msgid "Recent Actions"
msgstr "Kürzliche Aktionen"
#: conf/admin_templates/index.html.py:5
msgid "My Actions"
msgstr "Meine Aktionen"
#: conf/admin_templates/index.html.py:6
msgid "None available"
msgstr "Keine vorhanden"
#: conf/admin_templates/500.html.py:1
msgid "Server error (500)" msgid "Server error (500)"
msgstr "Serverfehler (500)" msgstr "Serverfehler (500)"
#: conf/admin_templates/500.html:8 #: conf/admin_templates/500.html.py:2
msgid "Server error <em>(500)</em>" msgid "Server Error <em>(500)</em>"
msgstr "Serverfehler <em>(500)</em>" msgstr "Serverfehler <em>(500)</em>"
#: conf/admin_templates/500.html:9 conf/admin_templates/500.html.py:3 #: conf/admin_templates/500.html.py:3
msgid "" msgid ""
"There's been an error. It's been reported to the site administrators via e-" "There's been an error. It's been reported to the site administrators via e-"
"mail and should be fixed shortly. Thanks for your patience." "mail and should be fixed shortly. Thanks for your patience."
@ -80,7 +103,15 @@ msgstr ""
"eMail weitergegeben und sollte bald behoben sein. Vielen Dank für Ihr " "eMail weitergegeben und sollte bald behoben sein. Vielen Dank für Ihr "
"Verständnis." "Verständnis."
#: conf/admin_templates/delete_confirmation_generic.html:6 #: conf/admin_templates/404.html.py:1 conf/admin_templates/404.html.py:2
msgid "Page not found"
msgstr "Seite nicht gefunden"
#: conf/admin_templates/404.html.py:3
msgid "We're sorry, but the requested page could not be found."
msgstr ""
"Es tut uns leid, aber die angeforderte Seite kann nicht gefunden werden."
#: conf/admin_templates/delete_confirmation_generic.html.py:1 #: conf/admin_templates/delete_confirmation_generic.html.py:1
#, python-format #, python-format
msgid "" msgid ""
@ -92,7 +123,6 @@ msgstr ""
"abhängigen Daten zur Folge, aber Sie haben nicht die nötigen Rechte um die " "abhängigen Daten zur Folge, aber Sie haben nicht die nötigen Rechte um die "
"folgenden abhängigen Daten zu löschen:" "folgenden abhängigen Daten zu löschen:"
#: conf/admin_templates/delete_confirmation_generic.html:13
#: conf/admin_templates/delete_confirmation_generic.html.py:2 #: conf/admin_templates/delete_confirmation_generic.html.py:2
#, python-format #, python-format
msgid "" msgid ""
@ -102,66 +132,42 @@ msgstr ""
"Sind Sie sicher, das Sie %(object_name)s \"%(object)s\" löschen wollen? Es " "Sind Sie sicher, das Sie %(object_name)s \"%(object)s\" löschen wollen? Es "
"werden zusätzlich die folgenden abhängigen Daten mit gelöscht:" "werden zusätzlich die folgenden abhängigen Daten mit gelöscht:"
#: conf/admin_templates/login.html:14 conf/admin_templates/login.html.py:1
msgid "Username:"
msgstr "Benutzername:"
#: conf/admin_templates/login.html:17 conf/admin_templates/login.html.py:2
msgid "Password:"
msgstr "Passwort:"
#: conf/admin_templates/login.html:19 conf/admin_templates/login.html.py:3
msgid "Have you <a href=\"/password_reset/\">forgotten your password</a>?"
msgstr "Haben Sie <a href=\"/password_reset/\">ihr Passwort vergessen</a>?"
#: conf/admin_templates/base.html:22 conf/admin_templates/base.html.py:1
msgid "Welcome,"
msgstr "Willkommen,"
#: conf/admin_templates/base.html:22 conf/admin_templates/base.html.py:2
#: conf/admin_templates/base.html.py:5
msgid "Change password"
msgstr "Passwort ändern"
#: conf/admin_templates/base.html:22 conf/admin_templates/base.html.py:3
#: conf/admin_templates/base.html.py:5
msgid "Log out"
msgstr "Abmelden"
#: conf/admin_templates/base.html:28 conf/admin_templates/base.html.py:4
#: conf/admin_templates/registration/password_change_done.html.py:1
#: conf/admin_templates/registration/password_reset_form.html.py:1
#: conf/admin_templates/registration/logged_out.html.py:1
#: conf/admin_templates/registration/password_reset_done.html.py:1
#: conf/admin_templates/registration/password_change_form.html.py:1
#: conf/admin_templates/admin_object_history.html.py:1
msgid "Home"
msgstr "Start"
#: conf/admin_templates/index.html:42 conf/admin_templates/index.html.py:3
msgid "You don't have permission to edit anything."
msgstr "Sie haben keine Berechtigung irgendwas zu ändern."
#: conf/admin_templates/changelist_generic.html.py:2
msgid "Click to change"
msgstr "Zur Änderung klicken"
#: conf/admin_templates/500.html.py:2
msgid "Server Error <em>(500)</em>"
msgstr "Serverfehler <em>(500)</em>"
#: conf/admin_templates/delete_confirmation_generic.html.py:3 #: conf/admin_templates/delete_confirmation_generic.html.py:3
msgid "Yes, I'm sure" msgid "Yes, I'm sure"
msgstr "Ja, ich bin sicher" msgstr "Ja, ich bin sicher"
#: conf/admin_templates/login.html.py:1
msgid "Username:"
msgstr "Benutzername:"
#: conf/admin_templates/login.html.py:2
msgid "Password:"
msgstr "Passwort:"
#: conf/admin_templates/login.html.py:3
msgid "Have you <a href=\"/password_reset/\">forgotten your password</a>?"
msgstr "Haben Sie <a href=\"/password_reset/\">ihr Passwort vergessen</a>?"
#: conf/admin_templates/login.html.py:4 #: conf/admin_templates/login.html.py:4
msgid "Log in" msgid "Log in"
msgstr "Anmelden" msgstr "Anmelden"
#: conf/admin_templates/base.html.py:1
msgid "Welcome,"
msgstr "Willkommen,"
#: conf/admin_templates/base.html.py:2 conf/admin_templates/base.html.py:5
msgid "Change password"
msgstr "Passwort ändern"
#: conf/admin_templates/base.html.py:3 conf/admin_templates/base.html.py:5
msgid "Log out"
msgstr "Abmelden"
#: conf/admin_templates/registration/password_change_done.html.py:2 #: conf/admin_templates/registration/password_change_done.html.py:2
#: conf/admin_templates/registration/password_change_done.html.py:6
#: conf/admin_templates/registration/password_change_form.html.py:2 #: conf/admin_templates/registration/password_change_form.html.py:2
#: conf/admin_templates/registration/password_change_form.html.py:3 #: conf/admin_templates/registration/password_change_form.html.py:3
#: conf/admin_templates/registration/password_change_done.html.py:6
#: conf/admin_templates/registration/password_change_form.html.py:4 #: conf/admin_templates/registration/password_change_form.html.py:4
#: conf/admin_templates/registration/password_change_form.html.py:10 #: conf/admin_templates/registration/password_change_form.html.py:10
msgid "Password change" msgid "Password change"
@ -179,9 +185,9 @@ msgstr "Ihr Kennwort wurde ge
#: conf/admin_templates/registration/password_reset_form.html.py:2 #: conf/admin_templates/registration/password_reset_form.html.py:2
#: conf/admin_templates/registration/password_reset_form.html.py:3 #: conf/admin_templates/registration/password_reset_form.html.py:3
#: conf/admin_templates/registration/password_reset_form.html.py:4 #: conf/admin_templates/registration/password_reset_form.html.py:4
#: conf/admin_templates/registration/password_reset_done.html.py:2
#: conf/admin_templates/registration/password_reset_form.html.py:8 #: conf/admin_templates/registration/password_reset_form.html.py:8
#: conf/admin_templates/registration/password_reset_form.html.py:9 #: conf/admin_templates/registration/password_reset_form.html.py:9
#: conf/admin_templates/registration/password_reset_done.html.py:2
#: conf/admin_templates/registration/password_reset_done.html.py:6 #: conf/admin_templates/registration/password_reset_done.html.py:6
msgid "Password reset" msgid "Password reset"
msgstr "Kennwort zurücksetzen" msgstr "Kennwort zurücksetzen"
@ -224,7 +230,6 @@ msgstr ""
"Wir haben Ihnen ein neues Kennwort per eMail zugeschickt an die Adresse, die " "Wir haben Ihnen ein neues Kennwort per eMail zugeschickt an die Adresse, die "
"Sie uns gegeben haben. Es sollte in Kürze ankommen." "Sie uns gegeben haben. Es sollte in Kürze ankommen."
#: conf/admin_templates/registration/password_change_form.html.py:4
#: conf/admin_templates/registration/password_change_form.html.py:5 #: conf/admin_templates/registration/password_change_form.html.py:5
msgid "" msgid ""
"Please enter your old password, for security's sake, and then enter your new " "Please enter your old password, for security's sake, and then enter your new "
@ -234,22 +239,18 @@ msgstr ""
"dann zweimal (um sicherzustellen, das Sie es korrekt eingegeben haben) das " "dann zweimal (um sicherzustellen, das Sie es korrekt eingegeben haben) das "
"neue Kennwort ein." "neue Kennwort ein."
#: conf/admin_templates/registration/password_change_form.html.py:5
#: conf/admin_templates/registration/password_change_form.html.py:6 #: conf/admin_templates/registration/password_change_form.html.py:6
msgid "Old password:" msgid "Old password:"
msgstr "altes Kennwort:" msgstr "altes Kennwort:"
#: conf/admin_templates/registration/password_change_form.html.py:6
#: conf/admin_templates/registration/password_change_form.html.py:7 #: conf/admin_templates/registration/password_change_form.html.py:7
msgid "New password:" msgid "New password:"
msgstr "neues Kennwort:" msgstr "neues Kennwort:"
#: conf/admin_templates/registration/password_change_form.html.py:7
#: conf/admin_templates/registration/password_change_form.html.py:8 #: conf/admin_templates/registration/password_change_form.html.py:8
msgid "Confirm password:" msgid "Confirm password:"
msgstr "Kennwortwiederholung:" msgstr "Kennwortwiederholung:"
#: conf/admin_templates/registration/password_change_form.html.py:8
#: conf/admin_templates/registration/password_change_form.html.py:9 #: conf/admin_templates/registration/password_change_form.html.py:9
msgid "Change my password" msgid "Change my password"
msgstr "Mein Kennwort ändern" msgstr "Mein Kennwort ändern"
@ -285,27 +286,6 @@ msgstr "Vielen Dank, das Sie unsere Seiten benutzen!"
msgid "The %(site_name)s team" msgid "The %(site_name)s team"
msgstr "Das Team von %(site_name)s" msgstr "Das Team von %(site_name)s"
#: conf/admin_templates/admin_object_history.html.py:2 #: core/validators.py:56
msgid "History" msgid "This value must contain only letters, numbers and underscores."
msgstr "Geschichte" msgstr "Der Wert darf nur Buchstaben, Ziffern und Unterstriche enthalten."
#: conf/admin_templates/admin_object_history.html.py:3
msgid "Date/time"
msgstr "Datum/Zeit"
#: conf/admin_templates/admin_object_history.html.py:4
msgid "User"
msgstr "Benutzer"
#: conf/admin_templates/admin_object_history.html.py:5
msgid "Action"
msgstr "Aktion"
#: conf/admin_templates/admin_object_history.html.py:6
msgid ""
"This object doesn't have a change history. It probably wasn't added via this "
"admin site."
msgstr ""
"Dieses Objekt hat keine Änderungsgeschichte. Es wurde möglicherweise nicht "
"über diese Verwaltungsseiten angelegt."