Opened 10 years ago
Closed 10 years ago
#11852 closed defect (fixed)
Translate exception messages in tracopt.versioncontrol.git
Reported by: | Ryan J Ollos | Owned by: | Ryan J Ollos |
---|---|---|---|
Priority: | normal | Milestone: | 1.0.3 |
Component: | plugin/git | Version: | |
Severity: | normal | Keywords: | i18n |
Cc: | Branch: | ||
Release Notes: |
Fixed untranslated |
||
API Changes: | |||
Internal Changes: |
Description
There are many untranslated exception messages in the package. In general we translate exception messages everywhere, but there are a few exceptions that are not translated:
- tags/trac-1.0.2/trac/core.py@:202,206#L174
- tags/trac-1.0.2/trac/env.py@:388,390#L382
- tags/trac-1.0.2/trac/admin/console.py@:552#L530
- tags/trac-1.0.2/trac/wiki/macros.py@:648#L645
I've only grepped for TracError
s, so there may be other exception types with untranslated messages.
If the message won't be translated for good reason, it could be useful to either add a comment in the code or change the message to the more generic Internal Error and instead log the more specific message.
Attachments (0)
Change History (5)
follow-up: 2 comment:1 by , 10 years ago
comment:2 by , 10 years ago
Replying to jomae:
Agreed. Another thing, I think we should translate the message and raise a
TracError
instead of anException
at tags/trac-1.0.2/trac/wiki/macros.py@:519#L511.
It doesn't appear that exception can ever be raised since calling split
even on an empty string would result in a list of length 1
. I propose to just remove the exception.
Python 2.7.6 (default, Mar 22 2014, 22:59:56) [GCC 4.8.2] on linux2 Type "help", "copyright", "credits" or "license" for more information. >>> ' '.split(',') [' '] >>> ''.split(',') ['']
comment:3 by , 10 years ago
Milestone: | next-stable-1.0.x → 1.0.3 |
---|---|
Release Notes: | modified (diff) |
Status: | new → assigned |
Proposed changes in log:rjollos.git:t11852-translate-exception-messages.
comment:4 by , 10 years ago
Committed to 1.0-stable in [13516:13517], merged to trunk in [13518].
New extraction on 1.0-stable in [13519], on trunk in [13521].
comment:5 by , 10 years ago
Resolution: | → fixed |
---|---|
Status: | assigned → closed |
Yes. We should show some translated messages in
tracopt.versioncontrol.git
, which are user-visible.Agreed. Another thing, I think we should translate the message and raise a
TracError
instead of anException
at tags/trac-1.0.2/trac/wiki/macros.py@:519#L511.