#8813 closed defect (fixed)
German documents of options is leaked when browser's locale is other than 'de'
Reported by: | Jun Omae | Owned by: | Steffen Hoffmann |
---|---|---|---|
Priority: | normal | Component: | AccountManagerPlugin |
Severity: | normal | Keywords: | i18n Python doc |
Cc: | Trac Release: | 0.12 |
Description
Reproduce
- Launch tracd.
- Add 'de' locale to the browser langauage settings. (
Accept-Language: de,ja,en;q=0.7,en-us;q=0.3
) - Access wiki:TracIni,
hash_method
's document isStandard-Hash-Typ für neue/aktualisierte Kennwörter
. - Remove 'de' locale from the browser languages settings. (
Accept-Language: ja,en;q=0.7,en-us;q=0.3
) - Reload the page of wiki:TracIni.
hash_method
's document is still German.
_
(gettext) method must not be used at the doc
keyword argument of Option
family.
In trunk, the documents of options can be translated.
Attachments (1)
Change History (11)
comment:1 follow-up: 2 Changed 14 years ago by
Keywords: | i18n Python doc added |
---|---|
Status: | new → assigned |
comment:2 Changed 13 years ago by
Replying to hasienda:
Thanks for the link. I was not aware of that development, but it's very good to know. So we'll need some special code for 0.13, since current stable doesn't know about
get_l10n_trac_cmdclass()
, right?
Right, However plugin's author never use get_l10n_trac_cmdclass()
, cause the function is only for tracini.pot
of Trac.
In plugins for Trac 0.13 and later, we'll need to change setup.py
to extract options' doc.
Index: setup.py =================================================================== @@ -16,7 +16,7 @@ if cmdclass: extra['cmdclass'] = cmdclass extractors = [ - ('**.py', 'python', None), + ('**.py', 'trac.dist:extract_python', None), ('**/templates/**.html', 'genshi', None), ] extra['message_extractors'] = {
The function trac.dist:extract_python
can extract the messages of keyword arguments and it extracts options' doc.
comment:3 Changed 13 years ago by
I just create a patch, t8813.diff.
In the patch, it uses N_
instead of _
in Options' doc keyword argument and translates Options' document using gettext
.
comment:4 Changed 13 years ago by
I didn't recognize, it's already Christmas. ;-)
I was about to start working on this issue. Thanks a bunch for your support. I'll test and commit this ASAP.
comment:5 Changed 13 years ago by
I've test this and it works well with existing translations.
You're always two steps ahead with i18n issues, I feel honored for your cooperation supporting this plugin (and others as well), and I enjoy it a lot.
comment:6 Changed 13 years ago by
(In [10332]) AccountManagerPlugin: Change translation method for password store docs, refs #8813.
And again I owe Jun Omae a grateful heart for contributing this solution.
comment:7 Changed 13 years ago by
(In [10339]) AccountManagerPlugin: Add another import missing from changeset [10332], refs #8813.
Some additional changes are added to propagate recent code style here too.
comment:9 Changed 13 years ago by
Replying to anonymous:
Trac is important
Fine (and the message is what?) - we wouldn't put such effort into it's plugins otherwise.
comment:10 Changed 13 years ago by
Resolution: | → fixed |
---|---|
Status: | assigned → closed |
(In [10393]) AccountManagerPlugin: Releasing version 0.3, pushing development to 0.4.
This new feature release finally propagates a number of solutions into an official release, after some time of testing with trunk, so explicitely closes #442, #816, #2966, #3989, #4160, #6821, #7111, #8534, #8549, #8663, #8813, #8892, #8925, #8936 and #8939.
Should have made this months ago, but felt so many pending issues were too bad for a new release. But it has been a tremendous ticket burndown since last year, so it's really worth considering an upgrade now. See fresh changelog
for details.
Replying to jun66j5:
Confirmed.
Thanks for the link. I was not aware of that development, but it's very good to know. So we'll need some special code for 0.13, since current stable doesn't know about
get_l10n_trac_cmdclass()
, right?There are some more occurances, that I'll correct as well on next occasion.