Mercurial > kallithea
comparison development.ini @ 8095:7c7d6b5c07c7 stable
i18n: make sure 'en' in Accept-Language is recognized as having 100% coverage - i18n.lang is for source language
https://github.com/cdent/paste/blob/3.2.3/paste/wsgiwrappers.py#L89 describes
how paste solved the problem. TG solves the same problem (with less
explanation) in
https://github.com/TurboGears/tg2/blob/tg2.4.2/tg/request_local.py#L36 with
fallback language specified in i18n.lang .
Thus, clarify the use of i18n.lang (refining f2f7a8c1281e and 8931078f70db) and
set 'en' as default value on app startup.
TurboGears requires an (empty) translation for the source language which is
default for i18n.lang . The empty .mo for en is created as the 4 magic .mo
bytes followed by lengths of 0:
printf '\x95\x04\x12\xde\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0' > kallithea/i18n/en/LC_MESSAGES/kallithea.mo
Based on report and analysis by Wolfgang Scherer. Also discussed upstream on
https://github.com/TurboGears/tg2/pull/115 .
author | Mads Kiilerich <mads@kiilerich.com> |
---|---|
date | Sun, 05 Jan 2020 01:19:05 +0100 |
parents | 3ea66ef563f2 |
children | aa6f17a53b49 34846d33498d |
comparison
equal
deleted
inserted
replaced
8094:4e0442f914b9 | 8095:7c7d6b5c07c7 |
---|---|
88 | 88 |
89 full_stack = true | 89 full_stack = true |
90 static_files = true | 90 static_files = true |
91 | 91 |
92 ## Internationalization (see setup documentation for details) | 92 ## Internationalization (see setup documentation for details) |
93 ## By default, the language requested by the browser is used if available. | 93 ## By default, the languages requested by the browser are used if available, with English as default. |
94 #i18n.enabled = false | 94 ## Set i18n.enabled=false to disable automatic language choice. |
95 ## Fallback language, empty for English (valid values are the names of subdirectories in kallithea/i18n): | 95 #i18n.enabled = true |
96 i18n.lang = | 96 ## To Force a language, set i18n.enabled=false and specify the language in i18n.lang. |
97 ## Valid values are the names of subdirectories in kallithea/i18n with a LC_MESSAGES/kallithea.mo | |
98 #i18n.lang = en | |
97 | 99 |
98 cache_dir = %(here)s/data | 100 cache_dir = %(here)s/data |
99 index_dir = %(here)s/data/index | 101 index_dir = %(here)s/data/index |
100 | 102 |
101 ## uncomment and set this path to use archive download cache | 103 ## uncomment and set this path to use archive download cache |