aboutsummaryrefslogtreecommitdiffstats
path: root/fatcat_scholar/templates
diff options
context:
space:
mode:
authorBryan Newbold <bnewbold@archive.org>2020-05-21 17:54:59 -0700
committerBryan Newbold <bnewbold@archive.org>2020-05-21 17:55:21 -0700
commit3ba3839ecd7924dc2f25295754d7a257c2542b23 (patch)
treed7246c44d8cf192da65eb9a14a2006bbed66feee /fatcat_scholar/templates
parentd12d03bd241d93ffc624747f9f60fdf7fbe18f14 (diff)
downloadfatcat-scholar-3ba3839ecd7924dc2f25295754d7a257c2542b23.tar.gz
fatcat-scholar-3ba3839ecd7924dc2f25295754d7a257c2542b23.zip
better translation marking; add some basic de and zh
Current translations are just from Google Translate
Diffstat (limited to 'fatcat_scholar/templates')
-rw-r--r--fatcat_scholar/templates/base.html20
-rw-r--r--fatcat_scholar/templates/home.html6
-rw-r--r--fatcat_scholar/templates/search.html10
-rw-r--r--fatcat_scholar/templates/search_macros.html10
4 files changed, 24 insertions, 22 deletions
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 @@
<div style="display: flex; width: 100%; justify-content: space-between; padding-top: 0.5em;">
<div></div>
<div>
- <a href="#" style="order: -1;">User Guide</a>
+ <a href="#" style="order: -1;">{{ _("User Guide") }}</a>
</div>
</div>
</div>
@@ -192,12 +192,14 @@
<div class="one wide column computer only"></div>
<div class="thirteen wide eleven wide computer column">
<h3>Internet Archive</h3>
- <p style="color: rgba(255, 255, 255, 0.5);">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 <a href="https://web.archive.org">Wayback Machine</a>, <a href="https://archive.org">archive.org</a> <a href="https://openlibrary.org">openlibrary.org</a> and <a href="https://archive-it.org">archive-it.org</a>
+ <p style="color: rgba(255, 255, 255, 0.5);">
+ {% 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 <a href="https://web.archive.org">The Wayback Machine</a>, <a href="https://archive.org">archive.org</a> <a href="https://openlibrary.org">openlibrary.org</a> and <a href="https://archive-it.org">archive-it.org</a>
<div class="ui horizontal inverted link list">
- <a class="item" href="https://archive.org/about/">About Us</a>
- <a class="item" href="https://archive.org/about/contact.php">Contact Us</a>
- <a class="item" href="https://archive.org/about/terms.php">Policies</a>
- <a class="item" href="https://archive.org/donate">Donate</a>
+ <a class="item" href="https://archive.org/about/">{{ _("About Us") }}</a>
+ <a class="item" href="https://archive.org/about/contact.php">{{ _("Contact Us") }}</a>
+ <a class="item" href="https://archive.org/about/terms.php">{{ _("Policies") }}</a>
+ <a class="item" href="https://archive.org/donate">{{ _("Donate") }}</a>
</div>
</div>
</div>
@@ -210,7 +212,7 @@
<a href="#" class="item">Text and Data Mining</a>
<a href="#" class="item">Discussion Forum</a>
<a href="#" class="item">Statistics</a>
- <a href="#" class="item">Help</a>
+ <a href="/help" class="item">{{ _("Help") }}</a>
</div>
</div>
<div class="three wide column">
@@ -219,8 +221,8 @@
<a href="https://fatcat.wiki" class="item">Editable Catalog (Fatcat)</a>
<a href="https://guide.fatcat.wiki" class="item">Contribute</a>
<a href="/api/redoc" class="item">Search API</a>
- <a href="https://status.fatcat.wiki" class="item">Service Status</a>
- <a href="https://github.com/internetarchive/fatcat-scholar" class="item">Source Code</a>
+ <a href="https://status.fatcat.wiki" class="item">{{ _("Service Status") }}</a>
+ <a href="https://github.com/internetarchive/fatcat-scholar" class="item">{{ _("Source Code") }}</a>
</div>
</div>
</div>
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 @@
<div class="ui centered grid">
<div class="ui sixteen wide mobile twelve wide computer column">
<div style="width: 100%; text-align: center;">
- <h1>Search Inside Millions of Research Papers</h1>
+ <h1>{% trans %}Search Inside Millions of Research Papers{% endtrans %}</h1>
<br>
<form class="" id="fulltext_query" action="{{ lang_prefix }}/search") }}" method="get" role="search" aria-label="papers" itemprop="potentialAction" itemscope itemtype="https://schema.org/SearchAction">
<meta itemprop="target" content="https://{{ settings.SCHOLAR_DOMAIN }}/fulltext/search?q={q}"/>
@@ -21,8 +21,8 @@
</div>
<br>
<br>
- <p style="font-size: 1.1rem;">This fulltext search index includes over 25 million research articles and other documents preserved in the Internet Archive.
- <p style="font-size: 1.1rem;">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.
+ <p style="font-size: 1.1rem;">{% trans %}This fulltext search index includes over 25 million research articles and other documents preserved in the Internet Archive.{% endtrans %}
+ <p style="font-size: 1.1rem;">{% 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 %}
</div>
</div>
</div>
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 @@
<div class="tablet-only" style="margin-top: 1.0em;">
<details class="search_filters">
- <summary style="float: right;"><i class="filter icon"></i>Filters</summary>
+ <summary style="float: right;"><i class="filter icon"></i>{{ _("Filters") }}</summary>
<p>
{{ search_macros.query_option(query.time_options, query.filter_time) }}
{{ search_macros.query_option(query.type_options, query.filter_type) }}
@@ -55,9 +55,9 @@
<div class="content">
<div class="header">
{% 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 %}
</div>
<p>Computer said: <code>{{ search_error.message }}</code>
@@ -75,7 +75,7 @@
<div class="ui placeholder segment" style="height: 100%;">
<div class="ui icon header">
<i class="search icon"></i>
- We didn't find any documents matching your query
+ {% trans %}We didn't find any documents matching your query{% endtrans %}
</div>
<div class="inline">
<a href="https://archive.org/search.php?sin=TXT&query={{ query.q|urlencode }}" class="ui button" style="margin: 0.5em;">Try archive.org</a>
@@ -88,7 +88,7 @@
<div class="ui placeholder segment" style="height: 100%;">
<div class="ui icon header">
<i class="search icon"></i>
- Enter a query in the box above to get started
+ {% trans %}Enter a query in the box above to get started{% endtrans %}
</div>
</div>
{% 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 %}
- <span style="color: red;">[media?]</span>
+ <span style="color: red;">[{{ _("media?") }}]</span>
{% else %}
[{{ _(paper.biblio.release_type) }}]
{% endif %}
@@ -89,7 +89,7 @@
{% elif paper.biblio.release_stage and paper.biblio.release_stage != "published" %}
<b style="color: red;"><code>[{{ paper.biblio.release_stage }}]</code></b>
{% elif not paper.biblio.release_stage %}
- <b style="color: red;"><code>[unpublished?]</code></b>
+ <b style="color: red;"><code>[{{ _("unpublished?") }}]</code></b>
{% endif %}
{# ### ABSTRACT / QUERY HIGHLIGHT #}
@@ -132,7 +132,7 @@
<div style="margin-top: 0.2em;">
{# colors to use: olive, brown, grey, pink, red, etc #}
{% for tag in paper.tags %}
- <span class="ui label small">{{ tag }}</span>
+ <span class="ui label small">{{ _(tag) }}</span>
{% endfor %}
{# TODO: remove doc for ES 7.x-style lack of type #}
<a href="{{ settings.ELASTICSEARCH_BACKEND }}/_doc/{{ settings.ELASTICSEARCH_FULLTEXT_INDEX }}/{{ paper.key }}">
@@ -176,7 +176,7 @@
{% endmacro %}
{% macro query_option(options, selected) -%}
-<span style="color: rgba(0,0,0,0.4);">{{ options.label }}</span>
+<span style="color: rgba(0,0,0,0.4);">{{ _(options.label) }}</span>
<div class="ui link list" style="margin-top: 0.3em;">
{% if selected %}
<input form="search_form" type="hidden" name="{{ options.slug }}" value="{{ selected }}">
@@ -188,7 +188,7 @@
{% else %}
<span>
{% endif %}
- {{ opt.label }}
+ {{ _(opt.label) }}
</span>
</button>
<br>