Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Problems notice #36

Closed
wants to merge 3 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions babel.cfg
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[python: **.py]
[jinja2: **/templates/**.html]
extensions=jinja2.ext.autoescape,jinja2.ext.with_
76 changes: 76 additions & 0 deletions messages.pot
Original file line number Diff line number Diff line change
@@ -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 <EMAIL@ADDRESS>, 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 <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <[email protected]>\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 <a href=\"%(liburl)s\">%(libname)s</a> at <a "
"href=\"%(uniurl)s\">%(uniname)s</a>."
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 <em>Labour Studies Index</em> 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 ""

8 changes: 6 additions & 2 deletions templates/base.html
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
<body>
<header>
<div class="header">
<a href="{{ url_for('home_html')}}"</a>Labour Studies Index</a>
<a href="{{ url_for('home_html')}}"</a>{{ _('Labour Studies Index') }}</a>
</div>
<div class="searchbox">
<form action="{{ url_for('search_bar') }}">
Expand All @@ -21,7 +21,11 @@
</header>
{% block content %}{% endblock %}
<footer class="footer">
A project of the <a href="http://laurentian.ca/library/">J.N. Desmarais Library</a> at <a href="http://laurentian.ca/">Laurentian University</a>.
{{ _('A project of the <a href="%(liburl)s">%(libname)s</a> at <a href="%(uniurl)s">%(uniname)s</a>.',
liburl="http://laurentian.ca/library/", libname="J.N. Desmarais Library",
uniurl="http://laurentian.ca/", uniname="Laurentian University"
) }}
{{ _('Problems with the site? Send an e-mail to %(mail)s.', mail='<a href="mailto:[email protected]">Desmond Maley</a>') }}
<a style="float:right; font-size: 60%; padding-right: 1em;" href="https://drive.google.com/open?id=1ckkrQzW4KI11U58ODsQFISlOUYI0aXWpUT9_xw019mo&authuser=1">(Presentation)</a>
</footer>
</body>
Expand Down
26 changes: 13 additions & 13 deletions templates/citation.html
Original file line number Diff line number Diff line change
Expand Up @@ -32,13 +32,13 @@ <h1 property="name">{{ record.title|escape }}</h1>
<tbody>
{%- if record.doc_type_human %}
<tr>
<th>Document type</th>
<th>{{ _('Document type') }}</th>
<td><a href="{{
url_for('filter_citations', facets='doctype:' + record.doc_type_human)
}}">{{ record.doc_type_human|escape}}</a></td>
</tr>
{%- 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') }}
Expand All @@ -55,14 +55,14 @@ <h1 property="name">{{ record.title|escape }}</h1>
{%- endif %}
{%- if record.doc_type == 'THES' and record.work_type %}
<tr>
<th>Degree</th>
<th>{{ _('Degree') }}</th>
<td>{{ record.work_type|striptags }}</td>
</tr>
{%- endif %}
{%- if record.doc_type != "THES" %}
{%- if record.pub_venue == "Periodical" and record.doc_type != "RPRT" %}
<tr property="isPartOf" typeof="{{ record.pub_venue }}" resource="#pub_venue">
<th>Journal</th>
<th>{{ _('Journal') }}</th>
<td><span property="name"><a href="{{
url_for('filter_citations', facets='publication:' + record.title2)
}}">{{ record.title2|escape }}</a></span>
Expand All @@ -71,21 +71,21 @@ <h1 property="name">{{ record.title|escape }}</h1>
</tr>
{%- if record.volume %}
<tr property="isPartOf" typeof="PublicationVolume" resource="#volume">
<th>Volume</th>
<th>{{ _('Volume') }}</th>
<td property="volumeNumber">{{ record.volume|striptags }}</td>
</tr>
{%- endif %}
{%- endif %}
{%- if record.pub_venue == "Book" and record.doc_type != "RPRT" and record.doc_type != "BOOK" %}
<tr property="isPartOf" typeof="{{ record.pub_venue }}" resource="#pub_venue">
<th>Book</th>
<th>{{ _('Book') }}</th>
<td><span property="name">{{ record.title2|escape }}</span></td>
</tr>
{%- endif %}
{%- endif %}
{%- if record.publisher %}
<tr resource="#pub_venue">
<th>Publisher</th>
<th>{{ _('Publisher') }}</th>
<td><span property="publisher" typeof="Organization">
<span property="name">{{ record.publisher }}</span>;
{%- if record.pub_place %}
Expand All @@ -97,36 +97,36 @@ <h1 property="name">{{ record.title|escape }}</h1>
{%- endif %}
{%- if record.pub_date_human %}
<tr>
<th>Date</th>
<th>{{ _('Date') }}</th>
<td property="datePublished">{{ record.pub_date_human|escape|trim }}</td>
</tr>
{%- endif %}
{%- if record.isbn_issn and record.pub_venue == 'Book' %}
<tr{% if record.schema_type == "Article"%} resource="#pub_venue"{% endif %}>
<th>ISBN</th>
<th>{{ _('ISBN') }}</th>
<td property="isbn">{{ record.isbn_issn|escape }}</td>
</tr>
{%- elif record.isbn_issn and record.pub_venue == 'Periodical' %}
<tr resource="#pub_venue">
<th>ISSN</th>
<th>{{ _('ISSN') }}</th>
<td property="issn">{{ record.isbn_issn|escape }}</td>
</tr>
{%- endif %}
{%- if record.start_page %}
<tr>
<th>Pages</th>
<th>{{ _('Pages') }}</th>
<td property="pagination"><span property="pageStart">{{ record.start_page|escape }}</span>{% if record.end_page %}-<span property="pageEnd">{{ record.end_page|escape }}</span>{% endif %}</td>
</tr>
{%- endif %}
{%- if record.url %}
<tr>
<th>URL</th>
<th>{{ _('URL') }}</th>
<td><a href="{{ record.url|escape }}" property="url">{{ record.url|escape }}</a></td>
</tr>
{%- endif %}
{%- if record.kw and 0 %}
<tr>
<th>Keywords</th>
<th>{{ _('Keywords') }}</th>
<td>
{%- for kw in record.kw %}
<span property="about">{{ kw.0|escape }}</span>{% if loop.revindex0 %}, {% endif %}
Expand Down
16 changes: 8 additions & 8 deletions templates/home.html
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
{% extends "base.html" %}
{% block title %}Labour Studies Index{% endblock %}
{% block title %}{{ _('Labour Studies Index') }}{% endblock %}
{%- block content -%}
<section class="home">
<p>
The <em>Labour Studies Index</em> offers {{ summary.total }}
{{ _("The <em>Labour Studies Index</em> offers %s
citations of journal articles, books, book chapters, theses, and
other literature.
other literature.", summary.total) }}
</p>
<section class="authors home_summary">
<h2>Authors ({{ summary.acnt }})</h2>
<table>
<thead>
<tr><th>Author</th><th class="numcites">Number of citations</th></tr>
<tr><th>{{ _('Author') }}</th><th class="numcites">{{ _('Number of citations') }}</th></tr>
</thead>
<tbody>
{%- for author in summary.authors %}
Expand All @@ -31,7 +31,7 @@ <h2>Authors ({{ summary.acnt }})</h2>
<h2>Publications ({{ summary.pcnt }})</h2>
<table>
<thead>
<tr><th>Publication</th><th class="numcites">Number of citations</th></tr>
<tr><th>{{ _('Publication') }}</th><th class="numcites">{{ _('Number of citations') }}</th></tr>
</thead>
<tbody>
{%- for pub in summary.pubs %}
Expand All @@ -51,7 +51,7 @@ <h2>Publications ({{ summary.pcnt }})</h2>
<h2>Publication types</h2>
<table>
<thead>
<tr><th>Type</th><th class="numcites">Number of citations</th></tr>
<tr><th>{{ _('Type') }}</th><th class="numcites">{{ _('Number of citations') }}</th></tr>
</thead>
<tbody>
{%- for pub in summary.types %}
Expand All @@ -71,7 +71,7 @@ <h2>Publication types</h2>
<h2>Languages</h2>
<table>
<thead>
<tr><th>Language</th><th class="numcites">Number of citations</th></tr>
<tr><th>{{ _('Language') }}</th><th class="numcites">{{ _('Number of citations') }}</th></tr>
</thead>
<tbody>
{%- for pub in summary.languages %}
Expand All @@ -87,7 +87,7 @@ <h2>Languages</h2>
<h2>Series</h2>
<table>
<thead>
<tr><th>Series title</th><th class="numcites">Number of citations</th></tr>
<tr><th>{{ _('Series title') }}</th><th class="numcites">{{ _('Number of citations') }}</th></tr>
</thead>
<tbody>
{%- for pub in summary.series %}
Expand Down
8 changes: 4 additions & 4 deletions templates/search_results.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,17 +5,17 @@
<span class="result_count">{{ results.start }} - {{ results.end }} of {{ results.cnt }}</span>
{%- if results.q %}
{%- if results.page_next %}
<span class="pager"><a href="{{ url_for('search_results', search=results.q, offset=results.page_next, limit=results.limit)}}">Next</a></span>
<span class="pager"><a href="{{ url_for('search_results', search=results.q, offset=results.page_next, limit=results.limit)}}">{{ ('Next') }}</a></span>
{%- endif %}
{%- if results.page_prev %}
<span class="pager"><a href="{{ url_for('search_results', search=results.q, offset=results.page_prev, limit=results.limit)}}">Previous</a></span>
<span class="pager"><a href="{{ url_for('search_results', search=results.q, offset=results.page_prev, limit=results.limit)}}">{{ _('Previous') }}</a></span>
{%- endif %}
{%- elif results.facets %}
{%- if results.page_next %}
<span class="pager"><a href="{{ url_for('filter_citations', facets=results.facets, offset=results.page_next, limit=results.limit)}}">Next</a></span>
<span class="pager"><a href="{{ url_for('filter_citations', facets=results.facets, offset=results.page_next, limit=results.limit)}}">{{ _('Next') }}</a></span>
{%- endif %}
{%- if results.page_prev %}
<span class="pager"><a href="{{ url_for('filter_citations', facets=results.facets, offset=results.page_prev, limit=results.limit)}}">Previous</a></span>
<span class="pager"><a href="{{ url_for('filter_citations', facets=results.facets, offset=results.page_prev, limit=results.limit)}}">{{ _('Previous') }}</a></span>
{%- endif %}
{%- endif %}
{%- for r in results.r %}
Expand Down
94 changes: 94 additions & 0 deletions translations/fr/LC_MESSAGES/messages.po
Original file line number Diff line number Diff line change
@@ -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 <EMAIL@ADDRESS>, 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 <EMAIL@ADDRESS>\n"
"Language-Team: fr <[email protected]>\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 <a href=\"%(liburl)s\">%(libname)s</a> at <a "
"href=\"%(uniurl)s\">%(uniname)s</a>."
msgstr ""
"Un projet de la <a href=\"%(liburl)s\">%(libname)s</a> à <a "
"href=\"%(uniurl)s\">%(uniname)s</a>."

#: 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 <em>Labour Studies Index</em> offers %s\n"
" citations of journal articles, books, book chapters, theses, and\n"
" other literature."
msgstr ""
"<em>L'indexe d'études du travail<em> 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 <em>Labour Studies Index</em> offers "
#~ msgstr "<em>L'indexe des études du travail</em> offre "