Przeglądaj źródła

HUE-759 [about] Template Internationalization

Created message bundles for all the templates
Enrico Berti 13 lat temu
rodzic
commit
db7b1ca

+ 2 - 0
apps/about/babel.cfg

@@ -0,0 +1,2 @@
+[python: src/about/**.py]
+[mako: src/about/templates/**.mako]

+ 35 - 0
apps/about/src/about/locale/django.pot

@@ -0,0 +1,35 @@
+# Translations template for PROJECT.
+# Copyright (C) 2012 ORGANIZATION
+# This file is distributed under the same license as the PROJECT project.
+# FIRST AUTHOR <EMAIL@ADDRESS>, 2012.
+#
+#, fuzzy
+msgid ""
+msgstr ""
+"Project-Id-Version: PROJECT VERSION\n"
+"Report-Msgid-Bugs-To: EMAIL@ADDRESS\n"
+"POT-Creation-Date: 2012-06-30 00:29+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"
+
+#: src/about/templates/index.mako:21
+msgid "About Hue"
+msgstr ""
+
+#: src/about/templates/index.mako:26
+msgid "Configuration"
+msgstr ""
+
+#: src/about/templates/index.mako:27
+msgid "Check for misconfiguration"
+msgstr ""
+
+#: src/about/templates/index.mako:28
+msgid "Server Logs"
+msgstr ""
+

+ 35 - 0
apps/about/src/about/locale/en_US/LC_MESSAGES/django.po

@@ -0,0 +1,35 @@
+# English (United States) translations for PROJECT.
+# Copyright (C) 2012 ORGANIZATION
+# This file is distributed under the same license as the PROJECT project.
+# FIRST AUTHOR <EMAIL@ADDRESS>, 2012.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: PROJECT VERSION\n"
+"Report-Msgid-Bugs-To: EMAIL@ADDRESS\n"
+"POT-Creation-Date: 2012-06-30 00:29+0200\n"
+"PO-Revision-Date: 2012-06-30 00:29+0200\n"
+"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
+"Language-Team: en_US <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.6\n"
+
+#: src/about/templates/index.mako:21
+msgid "About Hue"
+msgstr ""
+
+#: src/about/templates/index.mako:26
+msgid "Configuration"
+msgstr ""
+
+#: src/about/templates/index.mako:27
+msgid "Check for misconfiguration"
+msgstr ""
+
+#: src/about/templates/index.mako:28
+msgid "Server Logs"
+msgstr ""
+

+ 5 - 4
apps/about/src/about/templates/index.mako

@@ -15,15 +15,16 @@
 ## limitations under the License.
 <%!
 from desktop.views import commonheader, commonfooter
+from django.utils.translation import ugettext as _
 %>
-${commonheader("About Hue", "about", "100px")}
+${commonheader(_('About Hue'), "about", "100px")}
 
 	<div class="subnav subnav-fixed">
 		<div class="container-fluid">
 		<ul class="nav nav-pills">
-			<li><a href="${url("desktop.views.dump_config")}">Configuration</a></li>
-			<li><a href="${url("desktop.views.check_config")}">Check for misconfiguration</a></li>
-			<li><a href="${url("desktop.views.log_view")}">Server Logs</a></li>
+			<li><a href="${url("desktop.views.dump_config")}">${_('Configuration')}</a></li>
+			<li><a href="${url("desktop.views.check_config")}">${_('Check for misconfiguration')}</a></li>
+			<li><a href="${url("desktop.views.log_view")}">${_('Server Logs')}</a></li>
 		</ul>
 		</div>
 	</div>