Edgewall Software

Opened 9 years ago

Last modified 9 years ago

#11852 closed defect

Translate exception messages in tracopt.versioncontrol.git — at Version 3

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 TracError messages.

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:

I've only grepped for TracErrors, 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.

Change History (3)

in reply to:  description ; comment:1 by Jun Omae, 9 years ago

There are many untranslated exception messages in the package.

Yes. We should show some translated messages in tracopt.versioncontrol.git, which are user-visible.

In general we translate exception messages everywhere, but there are a few exceptions that are not translated: ….

Agreed. Another thing, I think we should translate the message and raise a TracError instead of an Exception at tags/trac-1.0.2/trac/wiki/macros.py@:519#L511.

in reply to:  1 comment:2 by Ryan J Ollos, 9 years ago

Replying to jomae:

Agreed. Another thing, I think we should translate the message and raise a TracError instead of an Exception 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 Ryan J Ollos, 9 years ago

Milestone: next-stable-1.0.x1.0.3
Release Notes: modified (diff)
Status: newassigned
Note: See TracTickets for help on using tickets.