Modify ↓
Opened 10 years ago
Closed 9 years ago
#12418 closed defect (fixed)
trac-admin should respect LC_ALL environment variable
| Reported by: | Jun Omae | Owned by: | Jun Omae |
|---|---|---|---|
| Priority: | normal | Milestone: | 1.0.13 |
| Component: | i18n | Version: | 1.0.10 |
| Severity: | normal | Keywords: | |
| Cc: | Branch: | ||
| Release Notes: |
Use locale environment variables to negotiate locale on console. |
||
| API Changes: | |||
| Internal Changes: | |||
Description
trac-admin command prints localized text by LANG environment.
$ LANG=fr_FR.UTF8 ~/venv/trac/1.0.10/bin/trac-admin help trac-admin - La console d'administration de Trac 1.0.10 Utilisation : trac-admin </chemin/vers/env_du_projet> [commande [sous-command] [option ...]] Le lancement de trac-admin sans commandes déclenche le mode interactif. help Show documentation initenv Create and initialize a new environment
However, it ignores when LC_ALL is used.
$ LC_ALL=fr_FR.UTF8 ~/venv/trac/1.0.10/bin/trac-admin help trac-admin - The Trac Administration Console 1.0.10 Usage: trac-admin </path/to/projenv> [command [subcommand] [option ...]] Invoking trac-admin without command starts interactive mode. help Show documentation initenv Create and initialize a new environment
It prints by LANG=de_DE.UTF8 even though LC_ALL=fr_FR.UTF8.
$ LC_ALL=fr_FR.UTF8 LANG=de_DE.UTF8 ~/venv/trac/1.0.10/bin/trac-admin help trac-admin - Die Administrations-Konsole von Trac 1.0.10 Aufruf: trac-admin </pfad/zur/projektumgebung> [Kommando [Subkommando] [Option ...]] Der Aufruf von trac-admin ohne Kommando startet den interaktiven Modus. help Show documentation initenv Create and initialize a new environment
Attachments (0)
Change History (7)
comment:1 by , 10 years ago
| Milestone: | → 1.0.11 |
|---|---|
| Owner: | set to |
| Status: | new → assigned |
comment:3 by , 10 years ago
| Milestone: | 1.0.11 → 1.0.12 |
|---|
comment:4 by , 9 years ago
| Milestone: | 1.0.12 → 1.0.13 |
|---|
comment:5 by , 9 years ago
comment:6 by , 9 years ago
Yeah, I'll push tonight. Also, I noticed default width of east asian ambiguous should respect locale environments. Updated jomae.git@t12418.
comment:7 by , 9 years ago
| Release Notes: | modified (diff) |
|---|---|
| Resolution: | → fixed |
| Status: | assigned → closed |
Committed to 1.0-stable in [15119-15120] and merged to 1.2-stable and trunk in [15121-15122].
Note:
See TracTickets
for help on using tickets.



According to GNU gettext utilities: Locale Environment Variables, the priority order is:
LANGUAGELC_ALLLC_xxx, according to selected locale category:LC_CTYPE,LC_NUMERIC,LC_TIME,LC_COLLATE,LC_MONETARY,LC_MESSAGES, …LANGSee also babel:source:/tags/0.9.6/babel/core.py@:633#L610.
trac/admin/api.py
I'll push it with unit tests.