On 19/02/11 16:16, Gabor Szabo wrote:
> Hi,
> 
> as it turns out the messages.pot file that contains all the strings 
> that need to be translated

Hi,

It's possible I broke it (and it's possible I didn't) while fixing --in
trunk-- a bug introduced when certains strings got translated:

http://padre.perlide.org/trac/changeset/13778

608:#return [ map { Wx::gettext( $MIME_TYPES{$_}{name} ) } @{
$self->get_mime_types } ]; # #BUG 1137
609:return [ map { $MIME_TYPES{$_}{name}  } @{ $self->get_mime_types }
]; # Need to be checked with non Western languages

The fix is related to bug 1137 (http://padre.perlide.org/trac/ticket/1137):

Description

The highlighter mime value (programming language name) is retrieved from
a *translated* Wx-widget. Because you normally don't translate names of
Programming languages, or rather: you "translate" the strings by
copy-pasting (and get 100% coverage), this causes no problems most of
the time.
In this particular case "Perl 5" was translated as "Perl 5 " (with an
extra space). Because this strings is used to look up the mime type and
later select the string, an unused values slips in Padre breaking the
Lexer selection in preferences for the specific language.
Could not find the MIME type of the display name 'Perl 5 '
Use of uninitialized value $name in string eq at
/home/claudio/Code/Padre/trunk/Padre/lib/Padre/MimeTypes.pm line 487.
Use of uninitialized value $name in string eq at
/home/claudio/Code/Padre/trunk/Padre/lib/Padre/MimeTypes.pm line 487.
Use of uninitialized value $name in string eq at
/home/claudio/Code/Padre/trunk/Padre/lib/Padre/MimeTypes.pm line 487.
Use of uninitialized value $name in concatenation (.) or string at
/home/claudio/Code/Padre/trunk/Padre/lib/Padre/MimeTypes.pm line 489.
Could not find highlighter for

Changed 18 hours ago by claudio

status changed from new to closed
resolution set to fixed
In this case (r13778), the bug is resolved without any disadvantages.
The solution is making the name of Programming languages
non-translatable. Before the fix the strings were marked as translatable
and, as a consequence, part of the po files. Nevertheless, *any* changes
to the string would result in a bug in Padre only for that specific
language.
Users knowledgeable of non Western languages (or native speakers) should
check if the "international" programming language names are acceptable.
If not, we need to change the way mime types are stored in Padre.

----

A workaround is reverting the change just for the release and making
sure the translation of strings with the names of programming languages
are identical (no extra spaces and such).

Claudio
_______________________________________________
Padre-dev mailing list
Padre-dev@perlide.org
http://mail.perlide.org/mailman/listinfo/padre-dev

Reply via email to