diff options
| author | Lex Neva <github.com@lexneva.name> | 2018-08-20 15:49:19 -0400 |
|---|---|---|
| committer | Lex Neva <github.com@lexneva.name> | 2018-08-20 15:56:29 -0400 |
| commit | 871358d990d4a06b2eaaf0e405f2d18e26753d52 (patch) | |
| tree | 700b6c2efea45e5e5aa69fb5e92285327227d7f2 /lib/i18n.py | |
| parent | f7f59efd7d5117c6b9b43b100df5fe646ea46bc3 (diff) | |
gettextify INX templates
Diffstat (limited to 'lib/i18n.py')
| -rw-r--r-- | lib/i18n.py | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/lib/i18n.py b/lib/i18n.py index d20f5d2f..06e0dd49 100644 --- a/lib/i18n.py +++ b/lib/i18n.py @@ -4,6 +4,11 @@ import gettext _ = translation = None +# Use N_ to mark a string for translation but _not_ immediately translate it. +# reference: https://docs.python.org/3/library/gettext.html#deferred-translations +# Makefile configures pybabel to treat N_() the same as _() +def N_(message): return message + def localize(): if getattr(sys, 'frozen', False): # we are in a pyinstaller installation |
