diff --git a/babel.cfg b/babel.cfg new file mode 100644 index 0000000..f0234b3 --- /dev/null +++ b/babel.cfg @@ -0,0 +1,3 @@ +[python: **.py] +[jinja2: **/templates/**.html] +extensions=jinja2.ext.autoescape,jinja2.ext.with_ diff --git a/messages.pot b/messages.pot new file mode 100644 index 0000000..7feb304 --- /dev/null +++ b/messages.pot @@ -0,0 +1,76 @@ +# Translations template for PROJECT. +# Copyright (C) 2015 ORGANIZATION +# This file is distributed under the same license as the PROJECT project. +# FIRST AUTHOR , 2015. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: PROJECT VERSION\n" +"Report-Msgid-Bugs-To: EMAIL@ADDRESS\n" +"POT-Creation-Date: 2015-06-04 12:55-0400\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 1.3\n" + +#: templates/base.html:13 templates/home.html:2 +msgid "Labour Studies Index" +msgstr "" + +#: templates/base.html:24 +#, python-format +msgid "" +"A project of the %(libname)s at %(uniname)s." +msgstr "" + +#: templates/base.html:28 +#, python-format +msgid "Problems with the site? Send an e-mail to %(mail)s." +msgstr "" + +#: templates/home.html:6 +#, python-format +msgid "" +"The Labour Studies Index offers %s\n" +" citations of journal articles, books, book chapters, theses, and\n" +" other literature." +msgstr "" + +#: templates/home.html:14 +msgid "Author" +msgstr "" + +#: templates/home.html:14 templates/home.html:34 templates/home.html:54 +#: templates/home.html:74 templates/home.html:90 +msgid "Number of citations" +msgstr "" + +#: templates/home.html:34 +msgid "Publication" +msgstr "" + +#: templates/home.html:54 +msgid "Type" +msgstr "" + +#: templates/home.html:74 +msgid "Language" +msgstr "" + +#: templates/home.html:90 +msgid "Series title" +msgstr "" + +#: templates/search_results.html:11 templates/search_results.html:18 +msgid "Previous" +msgstr "" + +#: templates/search_results.html:15 +msgid "Next" +msgstr "" + diff --git a/templates/base.html b/templates/base.html index b11d43f..3d387d6 100644 --- a/templates/base.html +++ b/templates/base.html @@ -10,7 +10,7 @@
{% block content %}{% endblock %} diff --git a/templates/citation.html b/templates/citation.html index ea58fbc..ba16cd7 100644 --- a/templates/citation.html +++ b/templates/citation.html @@ -32,13 +32,13 @@

{{ record.title|escape }}

{%- if record.doc_type_human %} - Document type + {{ _('Document type') }} {{ record.doc_type_human|escape}} {%- endif %} -{%- if record.authors|length > 0 %} +{%- if record.authors|length ') 0 %} {%- for author in record.authors %} {%- if author.author_type == 'author': %} {{ author_block(author, 'Author', 'author') }} @@ -55,14 +55,14 @@

{{ record.title|escape }}

{%- endif %} {%- if record.doc_type == 'THES' and record.work_type %} - Degree + {{ _('Degree') }} {{ record.work_type|striptags }} {%- endif %} {%- if record.doc_type != "THES" %} {%- if record.pub_venue == "Periodical" and record.doc_type != "RPRT" %} - Journal + {{ _('Journal') }} {{ record.title2|escape }} @@ -71,21 +71,21 @@

{{ record.title|escape }}

{%- if record.volume %} - Volume + {{ _('Volume') }} {{ record.volume|striptags }} {%- endif %} {%- endif %} {%- if record.pub_venue == "Book" and record.doc_type != "RPRT" and record.doc_type != "BOOK" %} - Book + {{ _('Book') }} {{ record.title2|escape }} {%- endif %} {%- endif %} {%- if record.publisher %} - Publisher + {{ _('Publisher') }} {{ record.publisher }}; {%- if record.pub_place %} @@ -97,36 +97,36 @@

{{ record.title|escape }}

{%- endif %} {%- if record.pub_date_human %} - Date + {{ _('Date') }} {{ record.pub_date_human|escape|trim }} {%- endif %} {%- if record.isbn_issn and record.pub_venue == 'Book' %} - ISBN + {{ _('ISBN') }} {{ record.isbn_issn|escape }} {%- elif record.isbn_issn and record.pub_venue == 'Periodical' %} - ISSN + {{ _('ISSN') }} {{ record.isbn_issn|escape }} {%- endif %} {%- if record.start_page %} - Pages + {{ _('Pages') }} {{ record.start_page|escape }}{% if record.end_page %}-{{ record.end_page|escape }}{% endif %} {%- endif %} {%- if record.url %} - URL + {{ _('URL') }} {{ record.url|escape }} {%- endif %} {%- if record.kw and 0 %} - Keywords + {{ _('Keywords') }} {%- for kw in record.kw %} {{ kw.0|escape }}{% if loop.revindex0 %}, {% endif %} diff --git a/templates/home.html b/templates/home.html index 618c91d..38ed7a5 100644 --- a/templates/home.html +++ b/templates/home.html @@ -1,17 +1,17 @@ {% extends "base.html" %} -{% block title %}Labour Studies Index{% endblock %} +{% block title %}{{ _('Labour Studies Index') }}{% endblock %} {%- block content -%}

- The Labour Studies Index offers {{ summary.total }} + {{ _("The Labour Studies Index offers %s citations of journal articles, books, book chapters, theses, and - other literature. + other literature.", summary.total) }}

Authors ({{ summary.acnt }})

- + {%- for author in summary.authors %} @@ -31,7 +31,7 @@

Authors ({{ summary.acnt }})

Publications ({{ summary.pcnt }})

AuthorNumber of citations
{{ _('Author') }}{{ _('Number of citations') }}
- + {%- for pub in summary.pubs %} @@ -51,7 +51,7 @@

Publications ({{ summary.pcnt }})

Publication types

PublicationNumber of citations
{{ _('Publication') }}{{ _('Number of citations') }}
- + {%- for pub in summary.types %} @@ -71,7 +71,7 @@

Publication types

Languages

TypeNumber of citations
{{ _('Type') }}{{ _('Number of citations') }}
- + {%- for pub in summary.languages %} @@ -87,7 +87,7 @@

Languages

Series

LanguageNumber of citations
{{ _('Language') }}{{ _('Number of citations') }}
- + {%- for pub in summary.series %} diff --git a/templates/search_results.html b/templates/search_results.html index 060bd62..ce4ec47 100644 --- a/templates/search_results.html +++ b/templates/search_results.html @@ -5,17 +5,17 @@ {{ results.start }} - {{ results.end }} of {{ results.cnt }} {%- if results.q %} {%- if results.page_next %} - Next + {{ ('Next') }} {%- endif %} {%- if results.page_prev %} - Previous + {{ _('Previous') }} {%- endif %} {%- elif results.facets %} {%- if results.page_next %} - Next + {{ _('Next') }} {%- endif %} {%- if results.page_prev %} - Previous + {{ _('Previous') }} {%- endif %} {%- endif %} {%- for r in results.r %} diff --git a/translations/fr/LC_MESSAGES/messages.po b/translations/fr/LC_MESSAGES/messages.po new file mode 100644 index 0000000..f03f59b --- /dev/null +++ b/translations/fr/LC_MESSAGES/messages.po @@ -0,0 +1,94 @@ +# French translations for PROJECT. +# Copyright (C) 2015 ORGANIZATION +# This file is distributed under the same license as the PROJECT project. +# FIRST AUTHOR , 2015. +msgid "" +msgstr "" +"Project-Id-Version: PROJECT VERSION\n" +"Report-Msgid-Bugs-To: EMAIL@ADDRESS\n" +"POT-Creation-Date: 2015-06-04 12:55-0400\n" +"PO-Revision-Date: 2015-06-04 09:22-0400\n" +"Last-Translator: FULL NAME \n" +"Language-Team: fr \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 1.3\n" + +#: templates/base.html:13 templates/home.html:2 +msgid "Labour Studies Index" +msgstr "Indexe des études du travail" + +#: templates/base.html:24 +msgid "" +"A project of the %(libname)s at %(uniname)s." +msgstr "" +"Un projet de la %(libname)s à %(uniname)s." + +#: templates/base.html:28 +#, python-format +msgid "Problems with the site? Send an e-mail to %(mail)s." +msgstr "Problèmes avec le site? Envoy un courriel à %s(mail)s." + +#: templates/home.html:6 +msgid "" +"The Labour Studies Index offers %s\n" +" citations of journal articles, books, book chapters, theses, and\n" +" other literature." +msgstr "" +"L'indexe d'études du travail offre %s\n" +"des citations d'articles de journaux, livres, chapitres de livre, thèses " +"et\n" +" autre matériaux de litérature." + +#: templates/home.html:14 +msgid "Author" +msgstr "Auteur" + +#: templates/home.html:14 templates/home.html:34 templates/home.html:54 +#: templates/home.html:74 templates/home.html:90 +msgid "Number of citations" +msgstr "Montant de citations" + +#: templates/home.html:34 +msgid "Publication" +msgstr "Publication" + +#: templates/home.html:54 +msgid "Type" +msgstr "Type" + +#: templates/home.html:74 +msgid "Language" +msgstr "Langage" + +#: templates/home.html:90 +msgid "Series title" +msgstr "Titre de Série" + +#: templates/search_results.html:11 templates/search_results.html:18 +msgid "Previous" +msgstr "Précédante" + +#: templates/search_results.html:15 +msgid "Next" +msgstr "Suivante" + +#~ msgid "A project of the " +#~ msgstr "Un project de la " + +#~ msgid "J.N. Desmarais Library" +#~ msgstr "Bibliothèque J.N. Desmarais" + +#~ msgid " at " +#~ msgstr " à " + +#~ msgid "Laurentian University" +#~ msgstr "Université Laurentienne" + +#~ msgid "The Labour Studies Index offers " +#~ msgstr "L'indexe des études du travail offre " +
Series titleNumber of citations
{{ _('Series title') }}{{ _('Number of citations') }}