forked from jan/debianmemberportfolio
initial Pylons i18n
include language detection support in BaseController add initial german translation
This commit is contained in:
parent
12dc602c0b
commit
a6d4a99050
4 changed files with 117 additions and 1 deletions
55
ddportfolioservice/i18n/ddportfolioservice.pot
Normal file
55
ddportfolioservice/i18n/ddportfolioservice.pot
Normal file
|
@ -0,0 +1,55 @@
|
||||||
|
# Translations template for ddportfolioservice.
|
||||||
|
# Copyright (C) 2009 ORGANIZATION
|
||||||
|
# This file is distributed under the same license as the ddportfolioservice
|
||||||
|
# project.
|
||||||
|
# FIRST AUTHOR <EMAIL@ADDRESS>, 2009.
|
||||||
|
#
|
||||||
|
#, fuzzy
|
||||||
|
msgid ""
|
||||||
|
msgstr ""
|
||||||
|
"Project-Id-Version: ddportfolioservice 0.1\n"
|
||||||
|
"Report-Msgid-Bugs-To: EMAIL@ADDRESS\n"
|
||||||
|
"POT-Creation-Date: 2009-01-20 23:13+0100\n"
|
||||||
|
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
|
||||||
|
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
|
||||||
|
"Language-Team: LANGUAGE <LL@li.org>\n"
|
||||||
|
"MIME-Version: 1.0\n"
|
||||||
|
"Content-Type: text/plain; charset=utf-8\n"
|
||||||
|
"Content-Transfer-Encoding: 8bit\n"
|
||||||
|
"Generated-By: Babel 0.9.1\n"
|
||||||
|
|
||||||
|
#: ddportfolioservice/ddportfolio.py:35
|
||||||
|
#, python-format
|
||||||
|
msgid "unable to parse %s: %s"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: ddportfolioservice/ddportfolio.py:69 ddportfolioservice/ddportfolio.py:81
|
||||||
|
#: ddportfolioservice/ddportfolio.py:86
|
||||||
|
#: ddportfolioservice/templates/showform.mako:5
|
||||||
|
#: ddportfolioservice/templates/showform.mako:10
|
||||||
|
msgid "Debian Developer Portfolio"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: ddportfolioservice/ddportfolio.py:87
|
||||||
|
#: ddportfolioservice/templates/showform.mako:11
|
||||||
|
msgid "Name:"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: ddportfolioservice/ddportfolio.py:89
|
||||||
|
msgid "E-Mail:"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: ddportfolioservice/ddportfolio.py:91
|
||||||
|
#: ddportfolioservice/templates/showform.mako:15
|
||||||
|
msgid "User name:"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: ddportfolioservice/ddportfolio.py:93
|
||||||
|
#: ddportfolioservice/templates/showform.mako:17
|
||||||
|
msgid "Build DD Portfolio URLs"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: ddportfolioservice/templates/showform.mako:13
|
||||||
|
msgid "E-Mail address:"
|
||||||
|
msgstr ""
|
||||||
|
|
BIN
ddportfolioservice/i18n/de/LC_MESSAGES/ddportfolioservice.mo
Normal file
BIN
ddportfolioservice/i18n/de/LC_MESSAGES/ddportfolioservice.mo
Normal file
Binary file not shown.
55
ddportfolioservice/i18n/de/LC_MESSAGES/ddportfolioservice.po
Normal file
55
ddportfolioservice/i18n/de/LC_MESSAGES/ddportfolioservice.po
Normal file
|
@ -0,0 +1,55 @@
|
||||||
|
# German translations for ddportfolioservice.
|
||||||
|
# Copyright (C) 2009 Jan Dittberner
|
||||||
|
# This file is distributed under the same license as the ddportfolioservice
|
||||||
|
# project.
|
||||||
|
# Jan Dittberner <jan@dittberner.info>, 2009.
|
||||||
|
#
|
||||||
|
msgid ""
|
||||||
|
msgstr ""
|
||||||
|
"Project-Id-Version: ddportfolioservice 0.1\n"
|
||||||
|
"Report-Msgid-Bugs-To: jan@dittberner.info\n"
|
||||||
|
"POT-Creation-Date: 2009-01-20 23:13+0100\n"
|
||||||
|
"PO-Revision-Date: 2009-01-20 23:24+0100\n"
|
||||||
|
"Last-Translator: Jan Dittberner <jan@dittberner.info>\n"
|
||||||
|
"Language-Team: de <LL@li.org>\n"
|
||||||
|
"Plural-Forms: nplurals=2; plural=(n != 1)\n"
|
||||||
|
"MIME-Version: 1.0\n"
|
||||||
|
"Content-Type: text/plain; charset=utf-8\n"
|
||||||
|
"Content-Transfer-Encoding: 8bit\n"
|
||||||
|
"Generated-By: Babel 0.9.1\n"
|
||||||
|
|
||||||
|
#: ddportfolioservice/ddportfolio.py:35
|
||||||
|
#, python-format
|
||||||
|
msgid "unable to parse %s: %s"
|
||||||
|
msgstr "Konnte %s nicht parsen: %s"
|
||||||
|
|
||||||
|
#: ddportfolioservice/ddportfolio.py:69 ddportfolioservice/ddportfolio.py:81
|
||||||
|
#: ddportfolioservice/ddportfolio.py:86
|
||||||
|
#: ddportfolioservice/templates/showform.mako:5
|
||||||
|
#: ddportfolioservice/templates/showform.mako:10
|
||||||
|
msgid "Debian Developer Portfolio"
|
||||||
|
msgstr "Debian-Entwicklerportfolio"
|
||||||
|
|
||||||
|
#: ddportfolioservice/ddportfolio.py:87
|
||||||
|
#: ddportfolioservice/templates/showform.mako:11
|
||||||
|
msgid "Name:"
|
||||||
|
msgstr "Name:"
|
||||||
|
|
||||||
|
#: ddportfolioservice/ddportfolio.py:89
|
||||||
|
msgid "E-Mail:"
|
||||||
|
msgstr "E-Mail"
|
||||||
|
|
||||||
|
#: ddportfolioservice/ddportfolio.py:91
|
||||||
|
#: ddportfolioservice/templates/showform.mako:15
|
||||||
|
msgid "User name:"
|
||||||
|
msgstr "Benutzername:"
|
||||||
|
|
||||||
|
#: ddportfolioservice/ddportfolio.py:93
|
||||||
|
#: ddportfolioservice/templates/showform.mako:17
|
||||||
|
msgid "Build DD Portfolio URLs"
|
||||||
|
msgstr "Debian-Entwicklerportfolio-URLs bauen"
|
||||||
|
|
||||||
|
#: ddportfolioservice/templates/showform.mako:13
|
||||||
|
msgid "E-Mail address:"
|
||||||
|
msgstr "E-Mailadresse:"
|
||||||
|
|
|
@ -7,7 +7,7 @@ from pylons import c, cache, config, g, request, response, session
|
||||||
from pylons.controllers import WSGIController
|
from pylons.controllers import WSGIController
|
||||||
from pylons.controllers.util import abort, etag_cache, redirect_to
|
from pylons.controllers.util import abort, etag_cache, redirect_to
|
||||||
from pylons.decorators import jsonify, validate
|
from pylons.decorators import jsonify, validate
|
||||||
from pylons.i18n import _, ungettext, N_
|
from pylons.i18n import _, ungettext, N_, add_fallback
|
||||||
from pylons.templating import render
|
from pylons.templating import render
|
||||||
|
|
||||||
import ddportfolioservice.lib.helpers as h
|
import ddportfolioservice.lib.helpers as h
|
||||||
|
@ -20,6 +20,12 @@ class BaseController(WSGIController):
|
||||||
# WSGIController.__call__ dispatches to the Controller method
|
# WSGIController.__call__ dispatches to the Controller method
|
||||||
# the request is routed to. This routing information is
|
# the request is routed to. This routing information is
|
||||||
# available in environ['pylons.routes_dict']
|
# available in environ['pylons.routes_dict']
|
||||||
|
# set language environment
|
||||||
|
for lang in request.languages:
|
||||||
|
try:
|
||||||
|
add_fallback(lang)
|
||||||
|
except:
|
||||||
|
pass
|
||||||
return WSGIController.__call__(self, environ, start_response)
|
return WSGIController.__call__(self, environ, start_response)
|
||||||
|
|
||||||
# Include the '_' function in the public names
|
# Include the '_' function in the public names
|
||||||
|
|
Loading…
Reference in a new issue