aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBryan Newbold <bnewbold@archive.org>2020-04-03 12:43:13 -0700
committerBryan Newbold <bnewbold@archive.org>2020-04-03 12:43:13 -0700
commit2ec0dfcdefb954d9232a0025cafbf1cc426ae7c2 (patch)
tree3cdfe702dd76b693bc3d9064a23cf7b7532e8404
parentc76aedc347e2e180fd4c8d7f40e0db29fcb81a3f (diff)
downloadfatcat-covid19-2ec0dfcdefb954d9232a0025cafbf1cc426ae7c2.tar.gz
fatcat-covid19-2ec0dfcdefb954d9232a0025cafbf1cc426ae7c2.zip
UI tweaks, i18n prep
-rw-r--r--fatcat_covid19/templates/400.html7
-rw-r--r--fatcat_covid19/templates/404.html2
-rw-r--r--fatcat_covid19/templates/500.html9
-rw-r--r--fatcat_covid19/templates/about_de.html6
-rw-r--r--fatcat_covid19/templates/about_en.html6
-rw-r--r--fatcat_covid19/templates/about_zh.html11
-rw-r--r--fatcat_covid19/templates/base.html19
-rw-r--r--fatcat_covid19/templates/entity_macros.html82
-rw-r--r--fatcat_covid19/templates/fulltext_search.html25
-rw-r--r--fatcat_covid19/templates/sources.html119
-rw-r--r--fatcat_covid19/templates/sources_de.html11
-rw-r--r--fatcat_covid19/templates/sources_en.html11
-rw-r--r--fatcat_covid19/templates/sources_zh.html11
-rw-r--r--fatcat_covid19/webface.py8
14 files changed, 155 insertions, 172 deletions
diff --git a/fatcat_covid19/templates/400.html b/fatcat_covid19/templates/400.html
index f2659ca..7b6598c 100644
--- a/fatcat_covid19/templates/400.html
+++ b/fatcat_covid19/templates/400.html
@@ -3,11 +3,12 @@
<center>
<div style="font-size: 8em;">400</div>
-<div style="font-size: 3em;">Bad Request</div>
+<div style="font-size: 3em;">{{ _("Bad Request") }}</div>
-<p>Wasn't able to handle the request, either due to incorrect or unexpected
+<p>
+{{ _("Wasn't able to handle the request, either due to incorrect or unexpected
input. Usually more context should be available; if you hit this page it means
-you've discovered a new corner case!
+you've discovered a new corner case!") }}
</center>
{% endblock %}
diff --git a/fatcat_covid19/templates/404.html b/fatcat_covid19/templates/404.html
index 653b8ee..89c9189 100644
--- a/fatcat_covid19/templates/404.html
+++ b/fatcat_covid19/templates/404.html
@@ -3,7 +3,7 @@
<center>
<div style="font-size: 8em;">404</div>
-<div style="font-size: 3em;">Not Found</div>
+<div style="font-size: 3em;">{{ _("Not Found") }}</div>
</center>
{% endblock %}
diff --git a/fatcat_covid19/templates/500.html b/fatcat_covid19/templates/500.html
index a99232c..e42ba4e 100644
--- a/fatcat_covid19/templates/500.html
+++ b/fatcat_covid19/templates/500.html
@@ -3,11 +3,12 @@
<center>
<div style="font-size: 8em;">500</div>
-<div style="font-size: 3em;">Internal Error</div>
+<div style="font-size: 3em;">{{ _("Internal Error") }}</div>
-<p>Hrm, something unexpected went wrong. You may have found a bug! This request
-should be logged and reported automatically; you could re-try or contact us for
-more info.
+<p>
+{{ _("Hrm, something unexpected went wrong. You may have found a bug! This
+request should be logged and reported automatically; you could re-try or
+contact us for more info.") }}
</center>
{% endblock %}
diff --git a/fatcat_covid19/templates/about_de.html b/fatcat_covid19/templates/about_de.html
index 2dd2b5e..8db4a6f 100644
--- a/fatcat_covid19/templates/about_de.html
+++ b/fatcat_covid19/templates/about_de.html
@@ -1,12 +1,10 @@
{% extends "base.html" %}
-{% block title %}About{% endblock %}
+{% block title %}{{ _("About") }}{% endblock %}
{% block body %}
-{# <img class="ui fluid bordered image" src="/static/fatcat.jpg" title="CC0 photo of an oversized feline" alt=""> #}
-
-<h1></h1>
+<h1>About Fatcat COVID-19 Paper Search</h1>
TODO
diff --git a/fatcat_covid19/templates/about_en.html b/fatcat_covid19/templates/about_en.html
index 2dd2b5e..8db4a6f 100644
--- a/fatcat_covid19/templates/about_en.html
+++ b/fatcat_covid19/templates/about_en.html
@@ -1,12 +1,10 @@
{% extends "base.html" %}
-{% block title %}About{% endblock %}
+{% block title %}{{ _("About") }}{% endblock %}
{% block body %}
-{# <img class="ui fluid bordered image" src="/static/fatcat.jpg" title="CC0 photo of an oversized feline" alt=""> #}
-
-<h1></h1>
+<h1>About Fatcat COVID-19 Paper Search</h1>
TODO
diff --git a/fatcat_covid19/templates/about_zh.html b/fatcat_covid19/templates/about_zh.html
new file mode 100644
index 0000000..8db4a6f
--- /dev/null
+++ b/fatcat_covid19/templates/about_zh.html
@@ -0,0 +1,11 @@
+{% extends "base.html" %}
+
+{% block title %}{{ _("About") }}{% endblock %}
+
+{% block body %}
+
+<h1>About Fatcat COVID-19 Paper Search</h1>
+
+TODO
+
+{% endblock %}
diff --git a/fatcat_covid19/templates/base.html b/fatcat_covid19/templates/base.html
index 3193619..d2ce02e 100644
--- a/fatcat_covid19/templates/base.html
+++ b/fatcat_covid19/templates/base.html
@@ -32,13 +32,14 @@
<!-- <img class="logo" src="assets/images/logo.png"> -->
fatcat &nbsp;<span style="color: red;">[COVID-19]</span>
</a>
- <a href="{{ url_for("search.page_about") }}" class="item mobile-hide">About</a>
+ <a href="{{ url_for("search.page_about") }}" class="item mobile-hide">{{ _("About") }}</a>
+ <a href="{{ url_for("search.page_sources") }}" class="item mobile-hide">{{ _("Sources") }}</a>
<div class="right menu">
<div class="item" style="padding: 0;">
<form class="" action="/fulltext/search" method="get" role="search" aria-label="Papers">
<div class="ui transparent inverted icon input">
<i class="search icon" style="padding-right: 2em;"></i>
- <input type="text" placeholder="Search Papers..." name="q" style="border: 1px solid #777 !important; padding: 5px !important; width: 15em;">
+ <input type="text" placeholder="{{ _("Search Papers...") }}" name="q" style="border: 1px solid #777 !important; padding: 5px !important; width: 15em;">
</div>
</form>
</div>
@@ -46,11 +47,11 @@
<!-- language/translate SVG icon -->
<img src="data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiA/PjxzdmcgaGVpZ2h0PSIxNzkyIiB2aWV3Qm94PSIwIDAgMTc5MiAxNzkyIiB3aWR0aD0iMTc5MiIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj48cGF0aCBkPSJNNzgyIDEwNzhxLTEgMy0xMi41LS41dC0zMS41LTExLjVsLTIwLTlxLTQ0LTIwLTg3LTQ5LTctNS00MS0zMS41dC0zOC0yOC41cS02NyAxMDMtMTM0IDE4MS04MSA5NS0xMDUgMTEwLTQgMi0xOS41IDR0LTE4LjUgMHE2LTQgODItOTIgMjEtMjQgODUuNS0xMTV0NzguNS0xMThxMTctMzAgNTEtOTguNXQzNi03Ny41cS04LTEtMTEwIDMzLTggMi0yNy41IDcuNXQtMzQuNSA5LjUtMTcgNXEtMiAyLTIgMTAuNXQtMSA5LjVxLTUgMTAtMzEgMTUtMjMgNy00NyAwLTE4LTQtMjgtMjEtNC02LTUtMjMgNi0yIDI0LjUtNXQyOS41LTZxNTgtMTYgMTA1LTMyIDEwMC0zNSAxMDItMzUgMTAtMiA0My0xOS41dDQ0LTIxLjVxOS0zIDIxLjUtOHQxNC41LTUuNSA2IC41cTIgMTItMSAzMyAwIDItMTIuNSAyN3QtMjYuNSA1My41LTE3IDMzLjVxLTI1IDUwLTc3IDEzMWw2NCAyOHExMiA2IDc0LjUgMzJ0NjcuNSAyOHE0IDEgMTAuNSAyNS41dDQuNSAzMC41em0tMjA1LTQ4NnEzIDE1LTQgMjgtMTIgMjMtNTAgMzgtMzAgMTItNjAgMTItMjYtMy00OS0yNi0xNC0xNS0xOC00MWwxLTNxMyAzIDE5LjUgNXQyNi41IDAgNTgtMTZxMzYtMTIgNTUtMTQgMTcgMCAyMSAxN3ptNjk4IDEyOWw2MyAyMjctMTM5LTQyem0tMTEwOCA4MDBsNjk0LTIzMnYtMTAzMmwtNjk0IDIzM3YxMDMxem0xMjQxLTMxN2wxMDIgMzEtMTgxLTY1Ny0xMDAtMzEtMjE2IDUzNiAxMDIgMzEgNDUtMTEwIDIxMSA2NXptLTUwMy05NjJsNTczIDE4NHYtMzgwem0zMTEgMTMyM2wxNTggMTMtNTQgMTYwLTQwLTY2cS0xMzAgODMtMjc2IDEwOC01OCAxMi05MSAxMmgtODRxLTc5IDAtMTk5LjUtMzl0LTE4My41LTg1cS04LTctOC0xNiAwLTggNS0xMy41dDEzLTUuNXE0IDAgMTggNy41dDMwLjUgMTYuNSAyMC41IDExcTczIDM3IDE1OS41IDYxLjV0MTU3LjUgMjQuNXE5NSAwIDE2Ny0xNC41dDE1Ny01MC41cTE1LTcgMzAuNS0xNS41dDM0LTE5IDI4LjUtMTYuNXptNDQ4LTEwNzl2MTA3OWwtNzc0LTI0NnEtMTQgNi0zNzUgMTI3LjV0LTM2OCAxMjEuNXEtMTMgMC0xOC0xMyAwLTEtMS0zdi0xMDc4cTMtOSA0LTEwIDUtNiAyMC0xMSAxMDYtMzUgMTQ5LTUwdi0zODRsNTU4IDE5OHEyIDAgMTYwLjUtNTV0MzE2LTEwOC41IDE2MS41LTUzLjVxMjAgMCAyMCAyMXY0MTh6Ii8+PC9zdmc+"
alt="select language" style="height: 1.5em; filter: invert(100%);">
- <i class="dropdown icon"></i>
+ <i class="dropdown icon" style="margin-left: 0.2em;"></i>
<div class="menu">
- {# TODO #}
- <a class="item" href="{{ url_for(request.endpoint, lang_code='en') }}">English</a>
- <a class="item" href="{{ url_for(request.endpoint, lang_code='de') }}">Deutsch</a>
+ {% for lang_code, lang_name in config.SUPPORTED_LANGUAGES.items() %}
+ <a class="item" href="{{ url_for(request.endpoint, lang_code=lang_code) }}">{{ lang_name }}</a>
+ {% endfor %}
</div>
</div>
</div>
@@ -103,9 +104,9 @@
<div class="ui center aligned container">
<div class="ui horizontal inverted small divided link list">
<a class="item" href="https://fatcat.wiki/">fatcat</a>
- <a class="item" href="/about">About</a>
- <a class="item" href="/sources">Sources</a>
- <a class="item" href="https://github.com/bnewbold/covid19-fatcat-wiki/">Code</a>
+ <a class="item" href="/about">{{ _("About") }}</a>
+ <a class="item" href="/sources">{{ _("Sources") }}</a>
+ <a class="item" href="https://github.com/bnewbold/covid19-fatcat-wiki/">{{ _("Code") }}</a>
<a class="item" href="https://github.com/bnewbold/covid19-fatcat-wiki/tree/{{ config.GIT_REVISION }}"><code>{{ config.GIT_REVISION }}</code></a>
<a class="item" href="#" style="color: red;"><b>[COVID-19]</b></a>
</div>
diff --git a/fatcat_covid19/templates/entity_macros.html b/fatcat_covid19/templates/entity_macros.html
index cc3a8a6..1c4177c 100644
--- a/fatcat_covid19/templates/entity_macros.html
+++ b/fatcat_covid19/templates/entity_macros.html
@@ -14,7 +14,11 @@
<a href="https://fatcat.wiki/release/{{ paper.fatcat_ident }}"
{% endif %}
style="color: #2224c7;">
- {% if paper.title %}
+ {% if g.lang_code != 'en' and g.lang_code == paper.lang and paper.original_title %}
+ {# show original title first instead of title if UI is in that language #}
+ {{ paper.original_title[:512] }}
+ {% if paper.original_title|length > 512 %}...{% endif %}
+ {% elif paper.title %}
{{ paper.title[:512] }}
{% if paper.title|length > 512 %}...{% endif %}
{% else %}
@@ -22,15 +26,30 @@
{% endif %}
</a>
+ {# release type suffix #}
{% if paper.release_type in ("article-journal", "paper-conference") %}
{# pass #}
{% elif paper.release_type in ("book", "chapter", "dataset") %}
- <b style="text-transform: uppercase;">[{{ paper.release_type }}]</b>
+ <b style="text-transform: uppercase;">[{{ _(paper.release_type) }}]</b>
{% elif not paper.release_type %}
<b style="text-transform: uppercase; color: red;">[media?]</b>
{% else %}
- <b style="text-transform: uppercase;">[{{ paper.release_type }}]</b>
+ <b style="text-transform: uppercase;">[{{ _(paper.release_type) }}]</b>
{% endif %}
+
+ {# show inverse of title/original_title above #}
+ {% if g.lang_code != 'en' and g.lang_code == paper.lang and paper.title and paper.title != paper.original_title %}
+ <br>
+ <i style="font-weight: normal;">
+ {{ paper.title[:512] }} {% if paper.title|length > 512 %}...{% endif %}
+ </i>
+ {% elif paper.original_title and paper.title != paper.original_title %}
+ <br>
+ <i style="font-weight: normal;">
+ {{ paper.original_title[:512] }} {% if paper.original_title|length > 512 %}...{% endif %}
+ </i>
+ {% endif %}
+
</h4>
{#
@@ -83,44 +102,77 @@
{# ### ABSTRACT / QUERY HIGHLIGHT #}
{% if paper._highlights %}
- <div style="padding-top: 1em; padding-left: 0.5em;" class="search_highlights">
+ <div style="padding-top: 1em; padding-left: 0.5em; padding-bottom: 0.5em;" class="search_highlights">
{% for highlight in paper._highlights %}
{{ highlight|safe }} ...
{% endfor %}
</div>
{% elif paper.abstract %}
- <div style="padding-top: 1em; padding-left: 0.5em;">
+ <div style="padding-top: 1em; padding-left: 0.5em; padding-bottom: 0.5em;">
{% if paper.abstract[0]|length > 500 %}
{{ paper.abstract[0][:500] }}...
{% else %}
{{ paper.abstract[0][:500] }}...
{% endif %}
</div>
+ {% else %}
+ <br>
{% endif %}
{# ### IDENTIFIERS #}
- {% if paper.doi or paper.pmid or paper.arxiv_id or paper.jstor_id %}
- <br>
- {% endif %}
{% if paper.doi %}
<a href="https://doi.org/{{paper.doi }}" style="color: green;">doi:{{ paper.doi }}</a> &nbsp;
{% endif %}
{% if paper.pmid %}
<a href="https://www.ncbi.nlm.nih.gov/pubmed/{{paper.pmid }}" style="color: green;">pmid:{{ paper.pmid }}</a> &nbsp;
{% endif %}
+ {% if paper.pmcid %}
+ <a href="https://pubmed.ncbi.nlm.nih.gov/{{paper.pmcid }}/" style="color: green;">pmcid:{{ paper.pmcid }}</a> &nbsp;
+ {% endif %}
{% if paper.arxiv_id %}
<a href="https://arxiv.org/abs/{{paper.arxiv_id }}" style="color: green;">arXiv:{{ paper.arxiv_id }}</a> &nbsp;
{% endif %}
- {% if False %} {# XXX: elastic release work grouping searches #}
- <br>
- <a href="/work/{{ paper.work_id }}"><i class="sitemap icon"></i> and 5 other versions of the same work!</a>
+ {% if paper.fatcat_ident %}
+ <a href="https://fatcat.wiki/release/{{paper.fatcat_ident}}" style="color: green;">fatcat:{{ paper.fatcat_ident}}</a> &nbsp;
{% endif %}
+
+ {# ### SOURCE TAGS #}
+ <div style="margin-top: 0.2em;">
+ {% if paper.cord19_uid or 'cord19' in paper.source_tags %}
+ <a href="https://pages.semanticscholar.org/coronavirus-research">
+ <span class="ui label small">CORD-19</span>
+ </a>
+ {% endif %}
+ {% if 'fatcat' in paper.source_tags %}
+ <a href="https://fatcat.wiki">
+ <span class="ui label small">fatcat</span>
+ </a>
+ {% endif %}
+ {% if 'who' in paper.source_tags %}
+ <a href="https://www.who.int/emergencies/diseases/novel-coronavirus-2019/global-research-on-novel-coronavirus-2019-ncov">
+ <span class="ui blue label small">WHO</span>
+ </a>
+ {% endif %}
+ {% if 'wanfang' in paper.source_tags %}
+ <a href="http://subject.med.wanfangdata.com.cn/Channel/7">
+ <span class="ui olive label small">Wanfang</span>
+ </a>
+ {% endif %}
+ {% if 'cnki' in paper.source_tags %}
+ <a href="http://en.gzbd.cnki.net/GZBT/brief/Default.aspx">
+ <span class="ui brown label small">CNKI</span>
+ </a>
+ {% endif %}
+ {# olive, brown, grey, pink, red, etc #}
+ </div>
+
</div>
<div class="three wide left aligned column" style="padding: 1em;">
{% if paper.fulltext.thumbnail_url %}
<a href="{{ config.COVID19_FULLTEXT_HOST }}{{ paper.fulltext.pdf_url.replace('//', '/') }}">
<img src="{{ config.COVID19_FULLTEXT_HOST }}{{ paper.fulltext.thumbnail_url.replace('//', '/') }}" style="border: 1px solid grey; max-height: 12em; max-width: 100%;">
</a>
+ <br>
{% else %}
{# No Fulltext #}
{% endif %}
@@ -149,12 +201,12 @@
{% if found.offset > 0 %}
{% if found.offset - found.limit < 0 %}
- <a href="{{ url_for(endpoint, q=found.query.q, offset=0) }}">&#xab; Previous</a>
+ <a href="{{ url_for(endpoint, q=found.query.q, offset=0) }}">&#xab; {{ _("Previous") }}</a>
{% else %}
- <a href="{{ url_for(endpoint, q=found.query.q, offset=found.offset - found.limit) }}">&#xab; Previous</a>
+ <a href="{{ url_for(endpoint, q=found.query.q, offset=found.offset - found.limit) }}">&#xab; {{ _("Previous") }}</a>
{% endif %}
{% else %}
- <span style="color:gray">&#xab; Previous</span>
+ <span style="color:gray">&#xab; {{ _("Previous") }}</span>
{% endif %}
&nbsp;&nbsp;<i>Showing results {{ found.offset }} &mdash; {{ found.offset +
@@ -163,7 +215,7 @@ found.count_returned }} out of {{ found.count_found }} results</i>&nbsp;&nbsp;
{% if found.offset + found.limit < found.count_found and found.offset + found.limit < found.deep_page_limit %}
<a href="{{ url_for(endpoint, q=found.query.q, offset=found.offset + found.limit) }}">Next &#xbb;</a>
{% else %}
- <span style="color:gray">Next &#xbb;</span>
+ <span style="color:gray">{{ _("Next") }} &#xbb;</span>
{% endif %}
{%- endmacro %}
diff --git a/fatcat_covid19/templates/fulltext_search.html b/fatcat_covid19/templates/fulltext_search.html
index d2a8e4c..d6367a8 100644
--- a/fatcat_covid19/templates/fulltext_search.html
+++ b/fatcat_covid19/templates/fulltext_search.html
@@ -3,9 +3,9 @@
{% block title %}
{% if query %}
- Search: {{ query }}
+ {{ _("Search") }}: {{ query }}
{% else %}
- Fulltext Search
+ {{ _("Fulltext Search") }}
{% endif %}
{% endblock %}
@@ -19,13 +19,15 @@
<div class="ui form">
<div class="ui action input huge fluid">
<input type="text" placeholder="Query..." name="q" value="{% if query %}{{ query }}{% endif %}" aria-label="search metadata">
- <button class="ui primary button">Search</button>
+ <button class="ui primary button">{{ _("Search") }}</button>
</div>
+ {#
<div class="ui checkbox" style="float: right; margin: 1em;">
<input type="checkbox" name="fulltext_only" value="true" {% if fulltext_only %}checked{% endif %}>
<label>Fulltext Available Only</label>
</div>
<br>Can also lookup by <b><a href="/release/lookup">identifier</a></b> or search for <b><a href="/container/search?q={{ query or "" }}">containers</a></b> (eg, journals).
+ #}
</div>
</form>
</div>
@@ -58,22 +60,23 @@
{# "did a query, but no results" #}
<div class="ui container text">
<br>
- Raw query was: <i>{{ found.query.q }}</i>
+ {{ _("Raw query was:") }} <i>{{ found.query.q }}</i>
<div class="ui centered stackable grid" style="padding-top: 15%;">
<div class="row">
- {#
+ <h2>{{ _("No results found!") }}</h2>
+ </div>
+ <div class="row">
<div class="four wide column">
<img src="/static/paper_man_confused.gif" alt="confused paper man">
</div>
- #}
<div class="six wide column">
- <h2>No results found!</h2>
- <p>You could try elsewhere:</p>
+ <br>
+ <p>{{ _("Try searching elsewhere") }}:</p>
<ul>
- <li>Search <a href="https://dissem.in/search?q={{ found.query.q | urlencode }}">dissem.in</a></li>
- <li>Search <a href="https://www.base-search.net/Search/Results?lookfor={{ found.query.q | urlencode }}">BASE</a></li>
- <li>Search <a href="https://scholar.google.com/scholar?q={{ found.query.q | urlencode }}">Google Scholar</a></li>
+ <li><a href="https://www.ncbi.nlm.nih.gov/research/coronavirus/docsum?text={{ found.query.q | urlencode }}">NIH LitCovid</a></li>
+ <li><a href="https://cord-19.apps.allenai.org/?q={{ found.query.q | urlencode }}">Allen AI CORD-19 Explorer</a></li>
+ <li><a href="https://scholar.google.com/scholar?q={{ found.query.q | urlencode }}">Google Scholar</a></li>
</ul>
</div>
</div>
diff --git a/fatcat_covid19/templates/sources.html b/fatcat_covid19/templates/sources.html
deleted file mode 100644
index 17b0818..0000000
--- a/fatcat_covid19/templates/sources.html
+++ /dev/null
@@ -1,119 +0,0 @@
-{% extends "base.html" %}
-
-{% block title %}About{% endblock %}
-
-{% block body %}
-
-{# <img class="ui fluid bordered image" src="/static/fatcat.jpg" title="CC0 photo of an oversized feline" alt=""> #}
-
-<h1></h1>
-
-<p>Fatcat is versioned, publicly-editable catalog of research publications:
-journal articles, conference proceedings, pre-prints, blog posts, and so forth.
-The goal is to improve the state of preservation and access to these works by
-providing a manifest of full-text content versions and locations.
-
-<p>This service does not directly contain full-text content itself, but
-provides basic access for human and machine readers through links to copies in
-web archives, repositories, and the public web.
-
-<p>Significantly more context and background information can be found in <a
-href="https://guide.{{ config.FATCAT_DOMAIN }}/">The Guide</a>.
-
-<p>Feedback and queries can be directed to
-<b><a href="mailto:webservices@archive.org">webservices@archive.org</a></b>.
-
-<h3>Goals and Features</h3>
-
-<p>A few things set Fatcat apart from similar indexing and discovery services:
-
-<ul>
- <li>inclusion of archival, <b>file-level metadata (hashes)</b> in addition
- to URLs, which allows automated verification ("do I have the right copy"),
- reveals content-drift over time, and enables efficient distribution of
- content through the ecosystem
- <li>native support for "post-PDF" digital media, including <b>archival web
- captures and datasets</b>, as well as content stored on the distributed web
- <li>data model that captures the <b>work/edition distinction</b>,
- grouping pre-print, post-review, published, re-published, and updated
- versions of a work together
- <li><b>public editing</b> interface, allowing metadata corrections and improvements
- from individuals and bots in addition to automated imports from authoritative
- sources
- <li>focus on providing a stable API and corpus (making integration with
- diverse user-facing applications simple), while enabling full replication and
- mirroring of the corpus to <b>reduce the risks of centralized control</b>
-</ul>
-
-<p>This service aspires to be a piece of sustainable, long-term, non-profit,
-free-software, collaborative, open digital infrastructure. It is primarily
-designed to support the <i>archival</i> and <i>dissemination</i> roles of
-scholarly communication. It may also support the <i>registration</i> role
-(establishing precedence and authorship), but explicitly does not aid with
-<i>certification</i> of content, and is not intended to be used for
-<i>evaluation</i> of individuals, institutions, or venues. This service is
-"universal", not currated, and happily includes retracted and "predatory"
-content).
-
-<h3>Sources of Metadata</h3>
-
-The source of all bibliographic information is recorded in edit history
-metadata, which allows the provenance of all records to be reconstructed. A few
-major sources are worth highlighting here:
-
-<ul>
- <li>Release metadata from <b>Crossref</b>, via their public
- <a href="https://github.com/CrossRef/rest-api-doc">REST API</a>
- <li>Release metadata and linked full-text content from NIH <b>Pubmed</b> and <b><a href="https://arxiv.org">arXiv.org</a></b>
- <li>Release metadata and linked public domain full-text content the <b>JSTOR</b> Early Journal Content collection
- <li>Creator names and de-duplication from <b>ORCID</b>, via their annual public data releases
- <li>Journal title metadata from <b>DOAJ</b>, <b>ISSN ROAD</b>, and <b>SHERPA/RoMEO</b>
- <li>Full-text URL lists from <b><a href="https://core.ac.uk">CORE</a></b>,
- <b><a href="http://unpaywall.org">Unpaywall</a></b>,
- <b><a href="https://www.semanticscholar.org">Semantic Scholar</a></b>,
- <b><a href="https://citeseerx.ist.psu.edu">CiteseerX</a></b>,
- and <b><a href="https://www.microsoft.com/en-us/research/project/academic">Microsoft Academic Graph</a></b>.
- <li><a href="https://guide.{{ config.FATCAT_DOMAIN }}/sources.html">The Guide</a> lists more major sources
-</ul>
-
-Many thanks for the hard work of all these projects, institutions, and
-individuals!
-
-
-<h3>Support and Acknowledgments</h3>
-
-<p>Fatcat is a project of the <b><a href="https://archive.org">Internet Archive</a></b>,
-a US-based non-profit digital library, well known for its
-<a href="https://web.archive.org">Wayback Machine</a> web archive and
-<a href="https://openlibrary.org">Open Library</a> book digitization and
-lending service. All Fatcat databases and services run on Internet Archive
-servers in California, and a copy of most full-text content is stored in the
-Archive's collections and/or web archives.
-
-<p>Development of Fatcat and related web harvesting, indexing, and preservation
-efforts at the Archive have been partially funded (for the 2018-2019 period) by
-a generous grant from the <b>Mellon Foundation</b>
-(<a href="https://blog.archive.org/2018/03/05/andrew-w-mellon-foundation-awards-grant-to-the-internet-archive-for-long-tail-journal-preservation/">"Long-tail Open Access Journal Preservation"</a>).
-Fatcat supports this work by both tracking which open access works in known
-archives and providing minimum-viable indexing and access mechanisms for
-long-tail works which otherwise would lack them.
-
-<p>The service would not technically be possible without hundreds of Free
-Software components and the efforts of their individual and organizational
-maintainers, more than can be listed here (please see the source code for full
-lists). A few major components include the PostgreSQL database, Elasticsearch
-search engine, Flask python web framework, Rust programming language, Diesel
-database library, Swagger/OpenAPI code generators, Kafka distributed log,
-Ansible configuration management tool, and Ubuntu GNU/Linux operating system
-distribution.
-
-<p>The front-page photo of a large feline with a cup of coffee is by
-<a href="http://www.kampschroer.com/photography.html">Quinn Kampschroer</a>,
-under a CC-0 license. The name "Fatcat" can be interpreted as short for "large
-catalog", as the service aspires to be a <i>complete</i> catalog of the digital
-scholarly record.
-
-<p>A list of technical contributors, including volunteers, is maintained in the
-source code repository (<code>CONTRIBUTORS.md</code>). Thanks everybody!
-
-{% endblock %}
diff --git a/fatcat_covid19/templates/sources_de.html b/fatcat_covid19/templates/sources_de.html
new file mode 100644
index 0000000..67f2975
--- /dev/null
+++ b/fatcat_covid19/templates/sources_de.html
@@ -0,0 +1,11 @@
+{% extends "base.html" %}
+
+{% block title %}{{ _("Content Sources") }}{% endblock %}
+
+{% block body %}
+
+<h1>{{ _("Content Sources") }}</h1>
+
+TODO
+
+{% endblock %}
diff --git a/fatcat_covid19/templates/sources_en.html b/fatcat_covid19/templates/sources_en.html
new file mode 100644
index 0000000..d46ac77
--- /dev/null
+++ b/fatcat_covid19/templates/sources_en.html
@@ -0,0 +1,11 @@
+{% extends "base.html" %}
+
+{% block title %}{{ _("Content Sources") }}{% endblock %}
+
+{% block body %}
+
+<h1>{{ _("Sources of Content and Metadata") }}</h1>
+
+TODO
+
+{% endblock %}
diff --git a/fatcat_covid19/templates/sources_zh.html b/fatcat_covid19/templates/sources_zh.html
new file mode 100644
index 0000000..d46ac77
--- /dev/null
+++ b/fatcat_covid19/templates/sources_zh.html
@@ -0,0 +1,11 @@
+{% extends "base.html" %}
+
+{% block title %}{{ _("Content Sources") }}{% endblock %}
+
+{% block body %}
+
+<h1>{{ _("Sources of Content and Metadata") }}</h1>
+
+TODO
+
+{% endblock %}
diff --git a/fatcat_covid19/webface.py b/fatcat_covid19/webface.py
index 12ccac5..d645cb5 100644
--- a/fatcat_covid19/webface.py
+++ b/fatcat_covid19/webface.py
@@ -16,7 +16,11 @@ from sentry_sdk.integrations.flask import FlaskIntegration
class BaseConfig(object):
- SUPPORTED_LANGUAGES = {'en': 'English', 'de': 'Deutsch'}
+ SUPPORTED_LANGUAGES = {
+ 'en': 'English',
+ 'de': 'Deutsch',
+ 'zh': '中文',
+ }
BABEL_DEFAULT_LOCALE = 'en'
BABEL_DEFAULT_TIMEZONE = 'UTC'
GIT_REVISION = subprocess.check_output(["git", "describe", "--always"]).strip().decode('utf-8')
@@ -86,7 +90,7 @@ def page_about():
@bp.route('/sources', methods=['GET'])
def page_sources():
- return render_template('sources.html')
+ return render_template('sources_{}.html'.format(g.lang_code))
@bp.errorhandler(404)