Skip to content

Commit

Permalink
i18n: tx configuration
Browse files Browse the repository at this point in the history
Signed-off-by: Alizee Pace <alizee.pace@gmail.com>
  • Loading branch information
alizeepace committed Aug 30, 2016
1 parent f792bce commit b088ed8
Show file tree
Hide file tree
Showing 12 changed files with 238 additions and 2 deletions.
32 changes: 32 additions & 0 deletions .tx/config
@@ -0,0 +1,32 @@
# -*- coding: utf-8 -*-
#
# This file is part of Invenio.
# Copyright (C) 2016 CERN.
#
# Invenio is free software; you can redistribute it
# and/or modify it under the terms of the GNU General Public License as
# published by the Free Software Foundation; either version 2 of the
# License, or (at your option) any later version.
#
# Invenio 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
# General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with Invenio; if not, write to the
# Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston,
# MA 02111-1307, USA.
#
# In applying this license, CERN does not
# waive the privileges and immunities granted to it by virtue of its status
# as an Intergovernmental Organization or submit itself to any jurisdiction.

[main]
host = https://www.transifex.com

[invenio-1.invenio-migrator-messages]
file_filter = invenio_migrator/translations/<lang>/LC_MESSAGES/messages.po
source_file = invenio_migrator/translations/messages.pot
source_lang = en
type = PO
5 changes: 5 additions & 0 deletions MANIFEST.in
Expand Up @@ -27,13 +27,18 @@ include *.sh
include *.txt
include .dockerignore
include .editorconfig
include .tx/config
include LICENSE
include babel.ini
include pytest.ini
recursive-include docs *.bat
recursive-include docs *.py
recursive-include docs *.rst
recursive-include docs Makefile
recursive-include examples *.py
recursive-include invenio_migrator *.po
recursive-include invenio_migrator *.mo
recursive-include invenio_migrator *.pot
recursive-include tests *.jpg
recursive-include tests *.json
recursive-include tests *.py
Expand Down
40 changes: 40 additions & 0 deletions babel.ini
@@ -0,0 +1,40 @@
# -*- coding: utf-8 -*-
#
# This file is part of Invenio.
# Copyright (C) 2015 CERN.
#
# Invenio is free software; you can redistribute it
# and/or modify it under the terms of the GNU General Public License as
# published by the Free Software Foundation; either version 2 of the
# License, or (at your option) any later version.
#
# Invenio 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
# General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with Invenio; if not, write to the
# Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston,
# MA 02111-1307, USA.
#
# In applying this license, CERN does not
# waive the privileges and immunities granted to it by virtue of its status
# as an Intergovernmental Organization or submit itself to any jurisdiction.

# Extraction from Python source files

[python: **.py]
encoding = utf-8

# Extraction from Jinja2 templates

[jinja2: **/templates/**.html]
encoding = utf-8
extensions = jinja2.ext.autoescape, jinja2.ext.with_

# Extraction from JavaScript files

[javascript: **.js]
encoding = utf-8
extract_messages = $._, jQuery._
20 changes: 20 additions & 0 deletions invenio_migrator/translations/cs/LC_MESSAGES/messages.po
@@ -0,0 +1,20 @@
# Translations template for invenio-migrator.
# Copyright (C) 2016 CERN
# This file is distributed under the same license as the invenio-migrator
# project.
# FIRST AUTHOR <EMAIL@ADDRESS>, 2016.
#
#, fuzzy
msgid ""
msgstr ""
"Project-Id-Version: invenio-migrator 1.0.0a8.dev20160805\n"
"Report-Msgid-Bugs-To: info@inveniosoftware.org\n"
"POT-Creation-Date: 2016-08-25 14:21+0200\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Language-Team: Czech (https://www.transifex.com/inveniosoftware/teams/23537/cs/)\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=utf-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Generated-By: Babel 2.3.4\n"
"Language: cs\n"
"Plural-Forms: nplurals=3; plural=(n==1) ? 0 : (n>=2 && n<=4) ? 1 : 2;\n"
20 changes: 20 additions & 0 deletions invenio_migrator/translations/da/LC_MESSAGES/messages.po
@@ -0,0 +1,20 @@
# Translations template for invenio-migrator.
# Copyright (C) 2016 CERN
# This file is distributed under the same license as the invenio-migrator
# project.
# FIRST AUTHOR <EMAIL@ADDRESS>, 2016.
#
#, fuzzy
msgid ""
msgstr ""
"Project-Id-Version: invenio-migrator 1.0.0a8.dev20160805\n"
"Report-Msgid-Bugs-To: info@inveniosoftware.org\n"
"POT-Creation-Date: 2016-08-25 14:21+0200\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Language-Team: Danish (https://www.transifex.com/inveniosoftware/teams/23537/da/)\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=utf-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Generated-By: Babel 2.3.4\n"
"Language: da\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
20 changes: 20 additions & 0 deletions invenio_migrator/translations/de/LC_MESSAGES/messages.po
@@ -0,0 +1,20 @@
# Translations template for invenio-migrator.
# Copyright (C) 2016 CERN
# This file is distributed under the same license as the invenio-migrator
# project.
# FIRST AUTHOR <EMAIL@ADDRESS>, 2016.
#
#, fuzzy
msgid ""
msgstr ""
"Project-Id-Version: invenio-migrator 1.0.0a8.dev20160805\n"
"Report-Msgid-Bugs-To: info@inveniosoftware.org\n"
"POT-Creation-Date: 2016-08-25 14:21+0200\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Language-Team: German (https://www.transifex.com/inveniosoftware/teams/23537/de/)\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=utf-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Generated-By: Babel 2.3.4\n"
"Language: de\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
20 changes: 20 additions & 0 deletions invenio_migrator/translations/es/LC_MESSAGES/messages.po
@@ -0,0 +1,20 @@
# Translations template for invenio-migrator.
# Copyright (C) 2016 CERN
# This file is distributed under the same license as the invenio-migrator
# project.
# FIRST AUTHOR <EMAIL@ADDRESS>, 2016.
#
#, fuzzy
msgid ""
msgstr ""
"Project-Id-Version: invenio-migrator 1.0.0a8.dev20160805\n"
"Report-Msgid-Bugs-To: info@inveniosoftware.org\n"
"POT-Creation-Date: 2016-08-25 14:21+0200\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Language-Team: Spanish (https://www.transifex.com/inveniosoftware/teams/23537/es/)\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=utf-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Generated-By: Babel 2.3.4\n"
"Language: es\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
20 changes: 20 additions & 0 deletions invenio_migrator/translations/fr/LC_MESSAGES/messages.po
@@ -0,0 +1,20 @@
# Translations template for invenio-migrator.
# Copyright (C) 2016 CERN
# This file is distributed under the same license as the invenio-migrator
# project.
# FIRST AUTHOR <EMAIL@ADDRESS>, 2016.
#
#, fuzzy
msgid ""
msgstr ""
"Project-Id-Version: invenio-migrator 1.0.0a8.dev20160805\n"
"Report-Msgid-Bugs-To: info@inveniosoftware.org\n"
"POT-Creation-Date: 2016-08-25 14:21+0200\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Language-Team: French (https://www.transifex.com/inveniosoftware/teams/23537/fr/)\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=utf-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Generated-By: Babel 2.3.4\n"
"Language: fr\n"
"Plural-Forms: nplurals=2; plural=(n > 1);\n"
20 changes: 20 additions & 0 deletions invenio_migrator/translations/it/LC_MESSAGES/messages.po
@@ -0,0 +1,20 @@
# Translations template for invenio-migrator.
# Copyright (C) 2016 CERN
# This file is distributed under the same license as the invenio-migrator
# project.
# FIRST AUTHOR <EMAIL@ADDRESS>, 2016.
#
#, fuzzy
msgid ""
msgstr ""
"Project-Id-Version: invenio-migrator 1.0.0a8.dev20160805\n"
"Report-Msgid-Bugs-To: info@inveniosoftware.org\n"
"POT-Creation-Date: 2016-08-25 14:21+0200\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Language-Team: Italian (https://www.transifex.com/inveniosoftware/teams/23537/it/)\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=utf-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Generated-By: Babel 2.3.4\n"
"Language: it\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
20 changes: 20 additions & 0 deletions invenio_migrator/translations/messages.pot
@@ -0,0 +1,20 @@
# Translations template for invenio-migrator.
# Copyright (C) 2016 CERN
# This file is distributed under the same license as the invenio-migrator
# project.
# FIRST AUTHOR <EMAIL@ADDRESS>, 2016.
#
#, fuzzy
msgid ""
msgstr ""
"Project-Id-Version: invenio-migrator 1.0.0a8.dev20160805\n"
"Report-Msgid-Bugs-To: info@inveniosoftware.org\n"
"POT-Creation-Date: 2016-08-25 14:21+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 2.3.4\n"

21 changes: 19 additions & 2 deletions setup.cfg
@@ -1,7 +1,7 @@
# -*- coding: utf-8 -*-
#
# This file is part of Invenio.
# Copyright (C) 2016 CERN.
# Copyright (C) 2015, 2016 CERN.
#
# Invenio is free software; you can redistribute it
# and/or modify it under the terms of the GNU General Public License as
Expand All @@ -24,7 +24,7 @@


[aliases]
test=pytest
test = pytest

[build_sphinx]
source-dir = docs/
Expand All @@ -33,3 +33,20 @@ all_files = 1

[bdist_wheel]
universal = 1

[compile_catalog]
directory = invenio_migrator/translations/

[extract_messages]
copyright_holder = CERN
msgid_bugs_address = info@inveniosoftware.org
mapping-file = babel.ini
output-file = invenio_migrator/translations/messages.pot

[init_catalog]
input-file = invenio_migrator/translations/messages.pot
output-dir = invenio_migrator/translations/

[update_catalog]
input-file = invenio_migrator/translations/messages.pot
output-dir = invenio_migrator/translations/
2 changes: 2 additions & 0 deletions setup.py
Expand Up @@ -81,10 +81,12 @@
extras_require['all'].extend(reqs)

setup_requires = [
'Babel>=1.3',
'pytest-runner>=2.7.0',
]

install_requires = [
'Flask-BabelEx>=0.9.2',
'Flask>=0.11.1',
'Click>=6.3',
'six>=1.10.0',
Expand Down

0 comments on commit b088ed8

Please sign in to comment.