From 93f1ccaafd2819501f856ac3594ea16d3b921896 Mon Sep 17 00:00:00 2001 From: Bryan Newbold Date: Thu, 25 Mar 2021 11:07:45 -0700 Subject: web: small typos Thanks for catching these gio --- extra/i18n/web_interface.pot | 52 +++++++++++++++++++------------------- fatcat_scholar/templates/help.html | 4 +-- fatcat_scholar/web.py | 16 ++++++++++-- 3 files changed, 42 insertions(+), 30 deletions(-) diff --git a/extra/i18n/web_interface.pot b/extra/i18n/web_interface.pot index aaddf7b..3a10723 100644 --- a/extra/i18n/web_interface.pot +++ b/extra/i18n/web_interface.pot @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: PROJECT VERSION\n" "Report-Msgid-Bugs-To: EMAIL@ADDRESS\n" -"POT-Creation-Date: 2021-03-23 18:56-0700\n" +"POT-Creation-Date: 2021-03-25 11:07-0700\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -114,7 +114,7 @@ msgid "" msgstr "" #: fatcat_scholar/templates/about.html:14 -#: fatcat_scholar/templates/base.html:187 +#: fatcat_scholar/templates/base.html:191 msgid "How It Works" msgstr "" @@ -148,7 +148,7 @@ msgid "" msgstr "" #: fatcat_scholar/templates/about.html:27 -#: fatcat_scholar/templates/base.html:188 +#: fatcat_scholar/templates/base.html:192 msgid "Content Sources" msgstr "" @@ -163,7 +163,7 @@ msgid "" msgstr "" #: fatcat_scholar/templates/about.html:35 -#: fatcat_scholar/templates/base.html:189 +#: fatcat_scholar/templates/base.html:193 msgid "Text and Data Mining" msgstr "" @@ -223,80 +223,80 @@ msgstr "" msgid "language selection menu" msgstr "" -#: fatcat_scholar/templates/base.html:98 +#: fatcat_scholar/templates/base.html:102 msgid "Contribute to translations" msgstr "" -#: fatcat_scholar/templates/base.html:121 +#: fatcat_scholar/templates/base.html:125 msgid "by title, authors, keywords..." msgstr "" -#: fatcat_scholar/templates/base.html:121 +#: fatcat_scholar/templates/base.html:125 msgid "search for papers" msgstr "" -#: fatcat_scholar/templates/base.html:122 fatcat_scholar/templates/home.html:16 +#: fatcat_scholar/templates/base.html:126 fatcat_scholar/templates/home.html:16 msgid "Search" msgstr "" -#: fatcat_scholar/templates/base.html:129 +#: fatcat_scholar/templates/base.html:133 msgid "User Guide" msgstr "" -#: fatcat_scholar/templates/base.html:157 +#: fatcat_scholar/templates/base.html:161 msgid "" "We are a US 501(c)(3) non-profit library, building a global archive of " "Internet sites and other cultural artifacts in digital form." msgstr "" -#: fatcat_scholar/templates/base.html:159 +#: fatcat_scholar/templates/base.html:163 #, python-format msgid "" "Other projects include %(wayback)s, %(archive_org)s, %(openlibrary)s, and" " %(archive_it)s." msgstr "" -#: fatcat_scholar/templates/base.html:166 +#: fatcat_scholar/templates/base.html:170 msgid "About Us" msgstr "" -#: fatcat_scholar/templates/base.html:167 +#: fatcat_scholar/templates/base.html:171 msgid "Contact Us" msgstr "" -#: fatcat_scholar/templates/base.html:168 +#: fatcat_scholar/templates/base.html:172 msgid "Policies" msgstr "" -#: fatcat_scholar/templates/base.html:169 +#: fatcat_scholar/templates/base.html:173 msgid "Donate" msgstr "" -#: fatcat_scholar/templates/base.html:175 +#: fatcat_scholar/templates/base.html:179 msgid "Open Infrastructure" msgstr "" -#: fatcat_scholar/templates/base.html:177 +#: fatcat_scholar/templates/base.html:181 msgid "Editable Catalog (Fatcat)" msgstr "" -#: fatcat_scholar/templates/base.html:178 +#: fatcat_scholar/templates/base.html:182 msgid "Contribute" msgstr "" -#: fatcat_scholar/templates/base.html:179 +#: fatcat_scholar/templates/base.html:183 msgid "Search API" msgstr "" -#: fatcat_scholar/templates/base.html:180 +#: fatcat_scholar/templates/base.html:184 msgid "Service Status" msgstr "" -#: fatcat_scholar/templates/base.html:181 +#: fatcat_scholar/templates/base.html:185 msgid "Source Code" msgstr "" -#: fatcat_scholar/templates/base.html:190 +#: fatcat_scholar/templates/base.html:194 msgid "Help" msgstr "" @@ -478,9 +478,9 @@ msgstr "" #: fatcat_scholar/templates/help.html:134 msgid "" -"A publisher landing page is the authoriative source for the \"version of " -"record\" of a research publication, but content is not always accessible " -"to the general public" +"A publisher landing page is the authoritative source for the \"version of" +" record\" of a research publication, but content is not always accessible" +" to the general public" msgstr "" #: fatcat_scholar/templates/help.html:138 @@ -647,7 +647,7 @@ msgstr "" msgid "" "Mis-matching of file content or version with work metadata. For example, " "sometimes pre-prints or author manuscripts are incorrectly associated " -"with version-of-record metadata, or vica-versa." +"with version-of-record metadata, or vice-versa." msgstr "" #: fatcat_scholar/templates/home.html:10 diff --git a/fatcat_scholar/templates/help.html b/fatcat_scholar/templates/help.html index 1a1ffe4..67d3721 100644 --- a/fatcat_scholar/templates/help.html +++ b/fatcat_scholar/templates/help.html @@ -131,7 +131,7 @@ apply range queries like year:>1989 year:<2000.{% endtrans %} {{ search_macros.doi_access_button({'biblio': {'doi': '#'}}, is_oa=False) }} - {% trans %}A publisher landing page is the authoriative source for the "version of record" of a research publication, but content is not always accessible to the general public{% endtrans %} + {% trans %}A publisher landing page is the authoritative source for the "version of record" of a research publication, but content is not always accessible to the general public{% endtrans %} {{ search_macros.doi_access_button({'biblio': {'doi': '#'}}, is_oa=True) }} @@ -255,6 +255,6 @@ apply range queries like year:>1989 year:<2000.{% endtrans %}
  • {% trans %}Poor metadata quality for conference proceedings. Many are labeled "unpublished" and are not associated with the conference.{% endtrans %}
  • {% trans %}Duplicate versions of same work. For example, different versions of the same paper or dataset. We are working on basic entity-deduplication in the fatcat catalog.{% endtrans %} -
  • {% trans %}Mis-matching of file content or version with work metadata. For example, sometimes pre-prints or author manuscripts are incorrectly associated with version-of-record metadata, or vica-versa.{% endtrans %} +
  • {% trans %}Mis-matching of file content or version with work metadata. For example, sometimes pre-prints or author manuscripts are incorrectly associated with version-of-record metadata, or vice-versa.{% endtrans %}
{% endblock %} diff --git a/fatcat_scholar/web.py b/fatcat_scholar/web.py index 5020bf1..4887aa6 100644 --- a/fatcat_scholar/web.py +++ b/fatcat_scholar/web.py @@ -100,11 +100,23 @@ async def home() -> Any: @api.head("/", include_in_schema=False) async def root_head() -> Any: """ - HTTP HEAD only for the root path. Requested by, eg, uptime monitoring - tools. This is distinct from the CORS middleware. + HTTP HEAD only for the root path (and health check below). Requested by, + eg, uptime monitoring tools. This is distinct from the CORS middleware (for + OPTION). """ return Response() +@api.get("/_health", operation_id="get_health") +async def health() -> Any: + """ + Checks that connection back to elasticsearch index is working. + """ + return Response() + +@api.head("/_health", include_in_schema=False) +async def health_head() -> Any: + return Response() + class HitsModel(BaseModel): count_returned: int count_found: int -- cgit v1.2.3