From e70e7cff4b5c910405694fb297330507b49937b1 Mon Sep 17 00:00:00 2001 From: Bryan Newbold Date: Tue, 23 Mar 2021 21:38:16 -0700 Subject: implement additional translation languages --- CHANGELOG.md | 5 +++++ fatcat_scholar/templates/base.html | 4 ++++ fatcat_scholar/web.py | 15 ++++++++++++++- 3 files changed, 23 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index ab0e4a5..2e4f618 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -12,6 +12,11 @@ See also: ### Added +- added Farsi/Persian (fa) translation +- added Italian (it) translation +- added Dutch (nl) translation +- added Portuguese (pt) translation + ### Changed ### Fixed diff --git a/fatcat_scholar/templates/base.html b/fatcat_scholar/templates/base.html index 584f950..5af6ea2 100644 --- a/fatcat_scholar/templates/base.html +++ b/fatcat_scholar/templates/base.html @@ -89,9 +89,13 @@ عَرَبِيّ Deutsch Español + فارسی Français Hrvatski + Italiano Norwegian Bokmål + Nederlands + Português Русский 中文
diff --git a/fatcat_scholar/web.py b/fatcat_scholar/web.py index 2193746..5020bf1 100644 --- a/fatcat_scholar/web.py +++ b/fatcat_scholar/web.py @@ -27,7 +27,20 @@ from fatcat_scholar.schema import ScholarDoc logger = logging.getLogger() -I18N_LANG_TRANSLATIONS = ["de", "zh", "ru", "ar", "fr", "es", "nb", "hr"] +I18N_LANG_TRANSLATIONS = [ + "ar", + "de", + "es", + "fa", + "fr", + "hr", + "it", + "nb", + "nl", + "pt", + "ru", + "zh", +] I18N_LANG_OPTIONS = I18N_LANG_TRANSLATIONS + [ settings.I18N_LANG_DEFAULT, ] -- cgit v1.2.3