#13860 closed New feature (wontfix)
Translate the output of admin commands
Reported by: | Artem Skoretskiy | Owned by: | nobody |
---|---|---|---|
Component: | Internationalization | Version: | dev |
Severity: | Normal | Keywords: | |
Cc: | Artem Skoretskiy, <tonn81@…> | Triage Stage: | Accepted |
Has patch: | no | Needs documentation: | no |
Needs tests: | no | Patch needs improvement: | no |
Easy pickings: | no | UI/UX: | no |
Description
We need to enable i18n and actually translate admin commands (shell, syncdb, dbshell, reset, etc.).
That's surprising that having excellent i18n tool and all needed settings (settings.LANGUAGE_CODE) users still have to use Django in English in time they may use it in they native language.
That makes a big difference for users. That is fine to enter commands in English but texts must be in defined locale.
Change History (20)
comment:1 by , 14 years ago
Cc: | added |
---|
comment:2 by , 14 years ago
Component: | django-admin.py → Translations |
---|---|
milestone: | 1.3 |
Triage Stage: | Unreviewed → Someday/Maybe |
comment:3 by , 14 years ago
Cc: | added; removed |
---|
comment:4 by , 14 years ago
I think the OP was talking about the description and help text shown for management commands not the command names themselves.
comment:5 by , 14 years ago
Component: | Translations → Internationalization |
---|
comment:6 by , 14 years ago
Triage Stage: | Someday/Maybe → Accepted |
---|
I'll switch this to Accepted, because I think it's a good idea.
There is actually no need to read the settings.LANGUAGE_CODE - django-admin.py is command line tool, so it should probably just take the locale from environment. The OP did note that his fine with only translating help texts (and possibly error messages, but that's a bit of problem), but leaving command names in English.
follow-up: 8 comment:7 by , 14 years ago
Triage Stage: | Accepted → Design decision needed |
---|
Actually, I'm not so sure this is a good idea. Most command line utilities don't translate their arguments and I'm not sure we should either. Bring this up in the django developers group.
comment:8 by , 14 years ago
Replying to SmileyChris:
Most command line utilities don't translate their arguments.
You're probably wrong here. At least most of GNOME command line utilities are translating their 'usage' output.
comment:9 by , 14 years ago
Summary: | Translate admin commands → Translate the output of admin commands |
---|---|
Triage Stage: | Design decision needed → Accepted |
Oh, right - I think I got confused between translating the output and translating the commands themselves.
Yes, translating the output seems fine.
comment:10 by , 14 years ago
My suggestion was to translate output of ./manage.py XXX commands - without translating commands or arguments.
Using environment language is a great idea as I always may configure this for myself. However, in some environments it's not possible (shared hosting) - so we should use settings.LANGUAGE_CODE before trying to apply ENV language.
Maybe it makes sense to define another settings (ADMIN_LANGUAGE_CODE) or argument (--lang=ru) for this (let's say my site is in English but I want to admin it in Russian).
comment:11 by , 14 years ago
Severity: | → Normal |
---|---|
Type: | → New feature |
comment:14 by , 12 years ago
Resolution: | → wontfix |
---|---|
Status: | new → closed |
We've discussed this at the sprint and aaugustin, apollo13 and me all agreed that this is a bad idea. The translation in the admin is end user facing, while django-admin.py/manage.py is only for developers. We're also not translating the exception messages that are developer facing.
comment:15 by , 12 years ago
I must say that I strongly disagree, I don't know why we shouldn't be able to output messages in other languages than English. I also disagree on the fact that output of all commands are only for developers (most are, sure), and even then, why couldn't developper receive the output or help on commands in their own language if they like it (and if their project's default language is not English)?
I know this is always controversial, some thinks that being a developper implies to know English well, that language being the lingua franca of computing. I'm personally on the side of those thinking that everyone has the right to work in one's own language (unfortunately a minority).
comment:16 by , 12 years ago
I agree with claudep.
We should atleast be able to output messages based on the defined LANG
environment variable just like most *nix command do nowadays.
(django)simon@simon-laptop:~$ cd inexistant bash: cd: inexistant: Aucun fichier ou dossier de ce type
comment:17 by , 12 years ago
If you implement that, please provide a way to turn it off, and preferably turn it off by default.
100% of my coding activity is in English and it's horribly distracting when a command outputs French — all the more since many technical terms don't have reasonable translations.
FWIW, on OS X, I haven't encountered any command that translates its output. It would be very distracting if django-admin.py did.
comment:18 by , 12 years ago
We are not there yet, but I can imagine the language would be settings.LANGUAGE_CODE
, 'en-us' by default and overridable with custom settings.
follow-up: 20 comment:19 by , 12 years ago
For me, this isn't even related to the Django project's language. Python's syntax is in English, the stdlib is in English, >90% of the ecosystem is in English, virtually every relevant web page is in English. When I'm developing, I'm thinking in English, and seeing French is unexpected and disruptive.
Regarding Simon's example — sure, cd
's output is in French, but then why is the command still called cd
? Shouldn't it be cr
or cdr
for changer de répertoire?
comment:20 by , 12 years ago
I knew this was a hot topic :-), but...
Replying to aaugustin:
Regarding Simon's example — sure,
cd
's output is in French, but then why is the command still calledcd
? Shouldn't it becr
orcdr
for changer de répertoire?
You're mixing the language syntax with language output, but I'm sure you know that. No, we are not going to ask for a translated Python API :-)
Like it or not, there are people that don't know English well and yet they like programming. They buy programming books in their own language, and I think we should try to do our best to ease access to Django programming for those people as well.
There is a cart and horse issue. The language is in the settings.py file, which isn't read until the command is executed. The autocomplete code would get very messy trying to sort this out.
This would take someone to work up a generic approach for some sort of command alias lookup.