From 3ba3839ecd7924dc2f25295754d7a257c2542b23 Mon Sep 17 00:00:00 2001 From: Bryan Newbold Date: Thu, 21 May 2020 17:54:59 -0700 Subject: better translation marking; add some basic de and zh Current translations are just from Google Translate --- fatcat_scholar/templates/base.html | 20 +++++++++++--------- fatcat_scholar/templates/home.html | 6 +++--- fatcat_scholar/templates/search.html | 10 +++++----- fatcat_scholar/templates/search_macros.html | 10 +++++----- 4 files changed, 24 insertions(+), 22 deletions(-) (limited to 'fatcat_scholar/templates') diff --git a/fatcat_scholar/templates/base.html b/fatcat_scholar/templates/base.html index 9c7aba8..b530c26 100644 --- a/fatcat_scholar/templates/base.html +++ b/fatcat_scholar/templates/base.html @@ -167,7 +167,7 @@
- User Guide + {{ _("User Guide") }}
@@ -192,12 +192,14 @@

Internet Archive

-

We are a 501(c)(3) non-profit, building a digital library of Internet sites and other cultural artifacts in digital form. Other projects include the Wayback Machine, archive.org openlibrary.org and archive-it.org +

+ {% trans trimmed %}We are a 501(c)(3) non-profit, building a digital library of Internet sites and other cultural artifacts in digital form.{% endtrans %} + Other projects include The Wayback Machine, archive.org openlibrary.org and archive-it.org

@@ -210,7 +212,7 @@ Text and Data Mining Discussion Forum Statistics - Help + {{ _("Help") }}
@@ -219,8 +221,8 @@ Editable Catalog (Fatcat) Contribute Search API - Service Status - Source Code + {{ _("Service Status") }} + {{ _("Source Code") }}
diff --git a/fatcat_scholar/templates/home.html b/fatcat_scholar/templates/home.html index c6d9119..875c055 100644 --- a/fatcat_scholar/templates/home.html +++ b/fatcat_scholar/templates/home.html @@ -7,7 +7,7 @@
-

Search Inside Millions of Research Papers

+

{% trans %}Search Inside Millions of Research Papers{% endtrans %}




-

This fulltext search index includes over 25 million research articles and other documents preserved in the Internet Archive. -

The collection spans from digitized copies of eighteenth century journals though the latest Open Access conference proceedings and pre-prints crawled from the World Wide Web. +

{% trans %}This fulltext search index includes over 25 million research articles and other documents preserved in the Internet Archive.{% endtrans %} +

{% trans %}The collection spans from digitized copies of eighteenth century journals though the latest Open Access conference proceedings and pre-prints crawled from the World Wide Web.{% endtrans %}

diff --git a/fatcat_scholar/templates/search.html b/fatcat_scholar/templates/search.html index 8d9fb7d..02e169b 100644 --- a/fatcat_scholar/templates/search.html +++ b/fatcat_scholar/templates/search.html @@ -5,7 +5,7 @@
- Filters + {{ _("Filters") }}

{{ search_macros.query_option(query.time_options, query.filter_time) }} {{ search_macros.query_option(query.type_options, query.filter_type) }} @@ -55,9 +55,9 @@

{% if search_error.type == "backend" %} - Backend Search Engine Error + {% trans %}Backend Search Engine Error{% endtrans %} {% elif search_error.type == "query" %} - Query Error + {% trans %}Search Query Error{% endtrans %} {% endif %}

Computer said: {{ search_error.message }} @@ -75,7 +75,7 @@

- We didn't find any documents matching your query + {% trans %}We didn't find any documents matching your query{% endtrans %}
Try archive.org @@ -88,7 +88,7 @@
- Enter a query in the box above to get started + {% trans %}Enter a query in the box above to get started{% endtrans %}
{% endif %} diff --git a/fatcat_scholar/templates/search_macros.html b/fatcat_scholar/templates/search_macros.html index b1ccc69..ec5a73c 100644 --- a/fatcat_scholar/templates/search_macros.html +++ b/fatcat_scholar/templates/search_macros.html @@ -33,7 +33,7 @@ {% elif paper.biblio.release_type in ("book", "chapter", "dataset") %} [{{ _(paper.biblio.release_type) }}] {% elif not paper.biblio.release_type %} - [media?] + [{{ _("media?") }}] {% else %} [{{ _(paper.biblio.release_type) }}] {% endif %} @@ -89,7 +89,7 @@ {% elif paper.biblio.release_stage and paper.biblio.release_stage != "published" %} [{{ paper.biblio.release_stage }}] {% elif not paper.biblio.release_stage %} - [unpublished?] + [{{ _("unpublished?") }}] {% endif %} {# ### ABSTRACT / QUERY HIGHLIGHT #} @@ -132,7 +132,7 @@
{# colors to use: olive, brown, grey, pink, red, etc #} {% for tag in paper.tags %} - {{ tag }} + {{ _(tag) }} {% endfor %} {# TODO: remove doc for ES 7.x-style lack of type #} @@ -176,7 +176,7 @@ {% endmacro %} {% macro query_option(options, selected) -%} -{{ options.label }} +{{ _(options.label) }}