Opened 7 years ago

Closed 6 years ago

Last modified 5 years ago

#12848 closed (duplicate)

language names should be kept native

Reported by: daonb Owned by: nobody
Component: Internationalization Version: master
Severity: Keywords:
Cc: jezdez Triage Stage: Unreviewed
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: UI/UX:

Description (last modified by ramiro)

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

    ('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)

native_languages_V1.diff (6.0 KB) - added by daonb 7 years ago.
native_languages_v2.diff (9.0 KB) - added by daonb 6 years ago.
A better fix - includes docs and tests

Download all attachments as: .zip

Change History (8)

Changed 7 years ago by daonb

comment:1 Changed 7 years ago by daonb

  • Needs documentation unset
  • Needs tests unset
  • Patch needs improvement unset

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.

comment:2 Changed 7 years ago by Alex

That's just what trac does, it's very special.

comment:3 Changed 7 years ago by ramiro

  • Description modified (diff)
  • Resolution set to duplicate
  • Status changed from new to closed

Duplicate of #4030, the patch attached there implements a more holistic solution.

Changed 6 years ago by daonb

A better fix - includes docs and tests

comment:4 Changed 6 years ago by daonb

  • Cc jezdez added
  • Has patch set
  • milestone changed from 1.2 to 1.3
  • Resolution duplicate deleted
  • Status changed from closed to reopened
  • Version changed from 1.2-alpha to SVN

Following discussions with Jezdez, I reopen the ticket and attach a new patch. The patch includes tests that pass when run alone:

python templates

when the entire suite is ran, the test fails. Haven't a clue.

comment:5 Changed 6 years ago by lrekucki

  • Resolution set to duplicate
  • Status changed from reopened to closed

As already noted, this is a duplicate of #4030. Please comment and submit any patches there.

comment:6 Changed 5 years ago by jacob

  • milestone 1.3 deleted

Milestone 1.3 deleted

Note: See TracTickets for help on using tickets.
Back to Top