From fbeeacd7aee5646418849d2ef732fc76e6caa3c1 Mon Sep 17 00:00:00 2001 From: Christopher Allan Webber Date: Sat, 6 Aug 2011 22:00:49 -0500 Subject: [PATCH 1/4] Tools to extract translation from python files and templates - Added pybabel script to entry points - Added babel.ini, which we'll use to extract stuff --- babel.ini | 2 +- setup.py | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/babel.ini b/babel.ini index 666270df..a4e3267a 100644 --- a/babel.ini +++ b/babel.ini @@ -10,4 +10,4 @@ encoding = utf-8 # # Extraction from JavaScript files # [javascript: mediagoblin/static/js/**.js] -# extract_messages = $._, jQuery._ \ No newline at end of file +# extract_messages = $._, jQuery._ diff --git a/setup.py b/setup.py index 6043ad41..40715dd0 100644 --- a/setup.py +++ b/setup.py @@ -53,6 +53,7 @@ setup( entry_points = """\ [console_scripts] gmg = mediagoblin.gmg_commands:main_cli + pybabel = mediagoblin.babel.messages.frontend:main [paste.app_factory] app = mediagoblin.app:paste_app_factory From 74a9c0eba5d71574ee8131897f0fad12220620ca Mon Sep 17 00:00:00 2001 From: Christopher Allan Webber Date: Sat, 6 Aug 2011 23:53:34 -0500 Subject: [PATCH 2/4] MediaGoblin source translation, Transifex config file, German translation test :) --- .tx/config | 8 +++++ .../i18n/de/LC_MESSAGES/mediagoblin.po | 25 +++++++++++++ .../i18n/en/LC_MESSAGES/mediagoblin.po | 35 +++++++++++++++++++ 3 files changed, 68 insertions(+) create mode 100644 .tx/config create mode 100644 mediagoblin/i18n/de/LC_MESSAGES/mediagoblin.po create mode 100644 mediagoblin/i18n/en/LC_MESSAGES/mediagoblin.po diff --git a/.tx/config b/.tx/config new file mode 100644 index 00000000..711b5d94 --- /dev/null +++ b/.tx/config @@ -0,0 +1,8 @@ +[mediagoblin.mediagoblin] +file_filter = mediagoblin/i18n//LC_MESSAGES/mediagoblin.po +source_file = mediagoblin/i18n/en/LC_MESSAGES/mediagoblin.po +source_lang = en + +[main] +host = https://www.transifex.net + diff --git a/mediagoblin/i18n/de/LC_MESSAGES/mediagoblin.po b/mediagoblin/i18n/de/LC_MESSAGES/mediagoblin.po new file mode 100644 index 00000000..a840bdaa --- /dev/null +++ b/mediagoblin/i18n/de/LC_MESSAGES/mediagoblin.po @@ -0,0 +1,25 @@ +# Translations template for PROJECT. +# Copyright (C) 2011 ORGANIZATION +# This file is distributed under the same license as the PROJECT project. +# +# , 2011. +msgid "" +msgstr "" +"Project-Id-Version: GNU MediaGoblin\n" +"Report-Msgid-Bugs-To: http://bugs.foocorp.net/projects/mediagoblin/issues\n" +"POT-Creation-Date: 2011-08-06 23:01-0500\n" +"PO-Revision-Date: 2011-08-07 03:57+0000\n" +"Last-Translator: cwebber \n" +"Language-Team: German (http://www.transifex.net/projects/p/mediagoblin/team/de/)\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" +"Language: de\n" +"Plural-Forms: nplurals=2; plural=(n != 1)\n" + +#: mediagoblin/templates/mediagoblin/root.html:21 +msgid "Welcome to GNU MediaGoblin!" +msgstr "Willkommen aus GNU MediaGoblin!" + + diff --git a/mediagoblin/i18n/en/LC_MESSAGES/mediagoblin.po b/mediagoblin/i18n/en/LC_MESSAGES/mediagoblin.po new file mode 100644 index 00000000..67830c2e --- /dev/null +++ b/mediagoblin/i18n/en/LC_MESSAGES/mediagoblin.po @@ -0,0 +1,35 @@ +# Translations template for GNU MediaGoblin. +# +# GNU MediaGoblin -- federated, autonomous media hosting +# Copyright (C) 2011 Free Software Foundation, Inc +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU Affero General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU Affero General Public License for more details. +# +# You should have received a copy of the GNU Affero General Public License +# along with this program. If not, see . +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: GNU MediaGoblin\n" +"POT-Creation-Date: 2011-08-06 23:01-0500\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language-Team: LANGUAGE \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" + +#: mediagoblin/templates/mediagoblin/root.html:21 +msgid "Welcome to GNU MediaGoblin!" +msgstr "" + From 145922b8a48093a96f77678148d63019f19918e1 Mon Sep 17 00:00:00 2001 From: Christopher Allan Webber Date: Sun, 7 Aug 2011 00:05:09 -0500 Subject: [PATCH 3/4] Changed mediagoblin translations directory to the one we actually use. --- mediagoblin/util.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mediagoblin/util.py b/mediagoblin/util.py index 5880f856..c9f4a0ac 100644 --- a/mediagoblin/util.py +++ b/mediagoblin/util.py @@ -300,7 +300,7 @@ def send_email(from_addr, to_addrs, subject, message_body): TRANSLATIONS_PATH = pkg_resources.resource_filename( - 'mediagoblin', 'translations') + 'mediagoblin', 'i18n') def locale_to_lower_upper(locale): From 3965f0f5fae2fdd3d1242a31806f8fe305d69273 Mon Sep 17 00:00:00 2001 From: Christopher Allan Webber Date: Sun, 7 Aug 2011 09:14:17 -0500 Subject: [PATCH 4/4] Correct version of the GNU MediaGoblin welcome string translated into German :) --- mediagoblin/i18n/de/LC_MESSAGES/mediagoblin.mo | Bin 0 -> 602 bytes mediagoblin/i18n/de/LC_MESSAGES/mediagoblin.po | 4 ++-- 2 files changed, 2 insertions(+), 2 deletions(-) create mode 100644 mediagoblin/i18n/de/LC_MESSAGES/mediagoblin.mo diff --git a/mediagoblin/i18n/de/LC_MESSAGES/mediagoblin.mo b/mediagoblin/i18n/de/LC_MESSAGES/mediagoblin.mo new file mode 100644 index 0000000000000000000000000000000000000000..ba6256234c243d76d87ef64c1363068aff62f8a7 GIT binary patch literal 602 zcmZ8e+iuf95H*M=Kk^C^lebo|_9j3G+Zv%>h$<0?szAl#+Mc)z>s@PiOqvhr?;$>g zaa*Z0BOUD-X>RB2pQlf*6OPA>=ZsfF@?RV>f5s>ne;*~u4}M=T)X;E&w(>0kd6<9s z1`Di>p8L`oH%gYl|HO*KSuMU}h{ij$Ta=z-=L3mFY)mbV`X-8%S8z$xsXQ+^&(_{o zK6IHw%DdZ%F>i-G&CQ3vf zP`9iVL#rL^-Kp7ZHW>}$%o?vA%IO{mBJR#>%=go!?Sr=BlMiiF;JTYM7Lx$@JJeLdOcW9a}+o#r9ck+yPXVIz*(Rr?r^f*A1twF^E%F`P#Tf p!K^ft&e36DJNbLI3XXJ%7G(B5o2JQyvG$j5TXayO+5Ov5@(\n" "Language-Team: German (http://www.transifex.net/projects/p/mediagoblin/team/de/)\n" "MIME-Version: 1.0\n" @@ -20,6 +20,6 @@ msgstr "" #: mediagoblin/templates/mediagoblin/root.html:21 msgid "Welcome to GNU MediaGoblin!" -msgstr "Willkommen aus GNU MediaGoblin!" +msgstr "Willkommen bei GNU MediaGoblin!"