summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.gitignore1
-rwxr-xr-xi18n-update2
-rw-r--r--ja.po137
-rwxr-xr-xstatic/lang_ja.pngbin0 -> 420 bytes
-rw-r--r--templates/login.html1
-rw-r--r--tmpl.py8
6 files changed, 145 insertions, 4 deletions
diff --git a/.gitignore b/.gitignore
index dc3eb23..86b6c8c 100644
--- a/.gitignore
+++ b/.gitignore
@@ -9,3 +9,4 @@ locale
*.svg
*.old
*.pot
+*.poT
diff --git a/i18n-update b/i18n-update
index 5159100..48d2a21 100755
--- a/i18n-update
+++ b/i18n-update
@@ -1,6 +1,6 @@
#!/bin/sh
for i in *.po
-do dir="locale/${i%.mo}/LC_MESSAGES"
+do dir="locale/${i%.po}/LC_MESSAGES"
[ -d "$dir" ] || mkdir -p "$dir"
msgfmt -v "$i" -o "$dir/subdap.mo"
done
diff --git a/ja.po b/ja.po
new file mode 100644
index 0000000..76ddd8e
--- /dev/null
+++ b/ja.po
@@ -0,0 +1,137 @@
+# Translations template for PROJECT.
+# Copyright (C) 2011 ORGANIZATION
+# This file is distributed under the same license as the PROJECT project.
+# FIRST AUTHOR <EMAIL@ADDRESS>, 2011.
+#
+#, fuzzy
+msgid ""
+msgstr ""
+"Project-Id-Version: PROJECT VERSION\n"
+"Report-Msgid-Bugs-To: EMAIL@ADDRESS\n"
+"POT-Creation-Date: 2011-09-27 08:39+0200\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.6\n"
+
+#: templates/8021x.html:10 templates/login.html:9 templates/select.html:10
+msgid "login"
+msgstr ""
+
+#: templates/8021x.html:14
+msgid "wpa_supplicant WPA-EAP template"
+msgstr ""
+
+#: templates/8021x.html:15
+#, python-format
+msgid ""
+"network={\n"
+"\tscan_ssid=1\n"
+"\tssid=\"crew.sublab.org\"\n"
+"\n"
+"\tkey_mgmt=WPA-EAP\n"
+"\teap=TTLS\n"
+"\tphase2=\"auth=PAP\"\n"
+"\n"
+"\tidentity=\"%(8021x)s\"\n"
+"\tpassword=\"[1:insert password here]\"\n"
+"\n"
+"\tanonymous_identity=\"bernd\"\n"
+"\tca_cert=\"[2:/etc/ssl/certs/cacert.org.pem]\"\n"
+"\taltsubject_match=\"DNS:taifun.local.sublab.org\"\n"
+"\tpriority=500\n"
+"}"
+msgstr ""
+
+#: templates/create.html:9
+msgid "create"
+msgstr "作って"
+
+#: templates/create.html:13 templates/login.html:14 templates/pwchange.html:12
+msgid "uid:"
+msgstr "ユーザー"
+
+#: templates/create.html:15 templates/login.html:16 templates/pwchange.html:16
+msgid "password:"
+msgstr "暗号"
+
+#: templates/create.html:17 templates/pwchange.html:18
+msgid "repeat:"
+msgstr "もう一度"
+
+#: templates/create.html:20
+msgid ""
+"The account creation process takes around 20 to 30 seconds. Please do not"
+" spam the button."
+msgstr ""
+"ウーザーを作る操作は25秒ぐらい掛かります。我慢してください!"
+
+#: templates/error.html:10
+msgid "exception"
+msgstr "間違えたそう"
+
+#: templates/error.html:14
+#, python-format
+msgid ""
+"[1:broken!]\n"
+" [2:[3:subdap.exe] has detected a problem and had to be terminated.\n"
+" Please send an error report to [4:equinox ! diac24 ! net].]\n"
+" [5:%(exception)s]"
+msgstr ""
+
+#: templates/layout.xi:11 templates/layout.xi:28 templates/layout.xi:37
+msgid "subdap"
+msgstr "subdap"
+
+#: templates/layout.xi:19
+msgid "info"
+msgstr "info"
+
+#: templates/login.html:13
+msgid "create account"
+msgstr "ウーザーを作る操"
+
+#: templates/pwchange.html:8 templates/select.html:26
+msgid "change password"
+msgstr "暗号を改める"
+
+#: templates/pwchange.html:14
+msgid "old password:"
+msgstr "まえの暗号"
+
+#: templates/pwchange.html:21
+msgid ""
+"The password change process takes around 20 to 30 seconds. Please do not "
+"spam the button."
+msgstr ""
+"暗号を変わる操作は25秒ぐらい掛かります。我慢してください!"
+
+#: templates/select.html:12
+msgid ""
+"[1:Your password has been changed.][2:]\n"
+" — please note that it may take a few minutes for Kerberos to update\n"
+" its [3:three heads]. At any moment, either your old password or your "
+"new\n"
+" password will work."
+msgstr ""
+
+#: templates/select.html:20
+#, python-format
+msgid "Hi %(hi)s!"
+msgstr "こんにちは%(hi)sさん!"
+
+#: templates/select.html:22
+msgid "sublab.org wiki"
+msgstr "sublab.orgウィキ"
+
+#: templates/select.html:24
+msgid "802.1X template"
+msgstr "802.1X鋳型"
+
+#: templates/select.html:28
+msgid "administration"
+msgstr ""
+
diff --git a/static/lang_ja.png b/static/lang_ja.png
new file mode 100755
index 0000000..325fbad
--- /dev/null
+++ b/static/lang_ja.png
Binary files differ
diff --git a/templates/login.html b/templates/login.html
index 3ca7299..754fa2f 100644
--- a/templates/login.html
+++ b/templates/login.html
@@ -19,5 +19,6 @@
</form>
<a href="login?lang=de" class="lang"><img src="${url('static/lang_de.png')}" alt="Deutsch" width="16" height="11"/></a>
<a href="login?lang=en" class="lang"><img src="${url('static/lang_en.png')}" alt="English" width="16" height="11"/></a>
+ <a href="login?lang=ja" class="lang"><img src="${url('static/lang_ja.png')}" alt="日本語" width="16" height="11"/></a>
</sub:bodyform>
</html>
diff --git a/tmpl.py b/tmpl.py
index b761ec2..3e7d8b5 100644
--- a/tmpl.py
+++ b/tmpl.py
@@ -8,15 +8,17 @@ from genshi.filters import Translator
import gettext
-languages = {'en': None, 'de': None}
+languages = {'en': None, 'de': None, 'ja': None}
for l in languages.keys():
languages[l] = gettext.translation('subdap',
os.path.join(os.path.dirname(__file__), 'locale'), [l],
fallback = True)
- print l, '->', languages[l]
def do_translate(text):
- return cherrypy.thread_data.translations.gettext(text)
+ transl = cherrypy.thread_data.translations.gettext(text)
+ if type(transl) == unicode:
+ return transl
+ return transl.decode('utf-8')
def select_language():
if cherrypy.thread_data.lang != None:
lang = cherrypy.thread_data.lang