#12848 closed (duplicate)
language names should be kept native
Reported by: | Benny Daon | Owned by: | nobody |
---|---|---|---|
Component: | Internationalization | Version: | dev |
Severity: | Keywords: | ||
Cc: | Jannis Leidel | Triage Stage: | Unreviewed |
Has patch: | yes | Needs documentation: | no |
Needs tests: | no | Patch needs improvement: | no |
Easy pickings: | no | UI/UX: | no |
Description (last modified by )
the LANGUAGES settings array holds tuples of language code and language name. This array is used in templates for language selection. By default, language names are not translated. The docs show a sample of how to translate the names into the current locale:
gettext = lambda s: s LANGUAGES = ( ('de', gettext('German')), ('en', gettext('English')), )
Which I think is wrong. If the locale is Chinese, I won't be able to choose between Hebrew and Russian.
The attached patch chages the i18n context process so it translats every language name to its native language. I couldn't think of a way to test it so I added a new view to the example site.
Attachments (2)
Change History (8)
by , 15 years ago
Attachment: | native_languages_V1.diff added |
---|
comment:1 by , 15 years ago
comment:3 by , 15 years ago
Description: | modified (diff) |
---|---|
Resolution: | → duplicate |
Status: | new → closed |
Duplicate of #4030, the patch attached there implements a more holistic solution.
by , 14 years ago
Attachment: | native_languages_v2.diff added |
---|
A better fix - includes docs and tests
comment:4 by , 14 years ago
Cc: | added |
---|---|
Has patch: | set |
milestone: | 1.2 → 1.3 |
Resolution: | duplicate |
Status: | closed → reopened |
Version: | 1.2-alpha → SVN |
Following discussions with Jezdez, I reopen the ticket and attach a new patch. The patch includes tests that pass when run alone:
python run_tests.py templates
when the entire suite is ran, the test fails. Haven't a clue.
comment:5 by , 14 years ago
Resolution: | → duplicate |
---|---|
Status: | reopened → closed |
As already noted, this is a duplicate of #4030. Please comment and submit any patches there.
seems like all the new translation files came up as /dev/null in the diff file, sorry. I'm using 'hg diff' and trying to find out what I'm doing wrong.