From ef162e8d070f51f422e57e9cfd62beb1db47e932 Mon Sep 17 00:00:00 2001 From: Bryan Newbold Date: Tue, 12 May 2020 15:50:49 -0700 Subject: very hack-y i18n support in jinja2 templates --- extra/i18n/babel.cfg | 4 ++++ extra/i18n/web_interface.pot | 27 +++++++++++++++++++++++++++ 2 files changed, 31 insertions(+) create mode 100644 extra/i18n/babel.cfg create mode 100644 extra/i18n/web_interface.pot (limited to 'extra/i18n') diff --git a/extra/i18n/babel.cfg b/extra/i18n/babel.cfg new file mode 100644 index 0000000..ff50c82 --- /dev/null +++ b/extra/i18n/babel.cfg @@ -0,0 +1,4 @@ +[python 1="**.py" language=":"][/python] +[jinja2: **/templates/**.html] +encoding = utf-8 +extensions = jinja2.ext.autoescape,jinja2.ext.with_ diff --git a/extra/i18n/web_interface.pot b/extra/i18n/web_interface.pot new file mode 100644 index 0000000..b9b0b7f --- /dev/null +++ b/extra/i18n/web_interface.pot @@ -0,0 +1,27 @@ +# Translations template for PROJECT. +# Copyright (C) 2020 ORGANIZATION +# This file is distributed under the same license as the PROJECT project. +# FIRST AUTHOR , 2020. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: PROJECT VERSION\n" +"Report-Msgid-Bugs-To: EMAIL@ADDRESS\n" +"POT-Creation-Date: 2020-05-12 14:16-0700\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 2.6.0\n" + +#: fatcat_scholar/templates/home.html:8 +msgid "This is a longer paragraph, all of which should be translated." +msgstr "" + +#: fatcat_scholar/templates/home.html:10 +msgid "this is a quick" +msgstr "" + -- cgit v1.2.3