aurweb/aurweb/scripts
Kevin Morris c1e29e90ca aurweb: Globalize a Translator instance, add more utility
+ Added SUPPORTED_LANGUAGES, a global constant dictionary of
  language => display pairs for languages we support.
+ Add Translator.get_translator, a function used to retrieve a
  translator after initializing it (if needed). Use `fallback=True`
  while creating languages, in case we setup a language that we
  don't have a translation for, it will noop the translation.
  This is particularly useful for "en," since we do not translate
  it, but doing this will allow us to go through our normal translation
  flow in any case.
+ Added typing.
+ Added get_request_language, a function that grabs the language for
  a request session, defaulting to aurweb.config [options] default_lang.
+ Added get_raw_translator_for_request, a function that retrieves
  the concrete translation object for a given language.
+ Added tr, a jinja2 contextfilter that can be used to inline translate
  strings in jinja2 templates.
+ Added `python-jinja` dep to .gitlab-ci.yml. This needs to be
  included in documentation before this set is merged in.
+ Introduce pytest units (test_l10n.py) in `test` along with
  __init__.py, which marks `test` as a test package.
+ Additionally, fix up notify.py to use the global translator. Also
  reduce its source width to <= 80 by newlining some code.
+ Additionally, prepare locale in .gitlab-ci.yml and add
  aurweb.config [options] localedir to config.dev with YOUR_AUR_ROOT
  like others.

Signed-off-by: Kevin Morris <kevr@0cost.org>
Signed-off-by: Lukas Fleischer <lfleischer@archlinux.org>
2021-06-05 19:49:42 -07:00
..
__init__.py Make maintenance scripts installable 2016-10-17 15:23:13 +02:00
aurblup.py Refactor code to comply with flake8 and isort 2021-02-20 11:24:30 -05:00
mkpkglists.py Do not hardcode path to the Python interpreter 2017-08-25 07:01:12 +02:00
notify.py aurweb: Globalize a Translator instance, add more utility 2021-06-05 19:49:42 -07:00
pkgmaint.py Do not hardcode path to the Python interpreter 2017-08-25 07:01:12 +02:00
popupdate.py add test_popupdate.py 2021-06-05 19:49:19 -07:00
rendercomment.py Refactor code to comply with flake8 and isort 2021-02-20 11:24:30 -05:00
tuvotereminder.py Do not hardcode path to the Python interpreter 2017-08-25 07:01:12 +02:00
usermaint.py Erase login IP addresses after seven days 2018-05-10 21:38:25 +02:00