[etoys-dev] Question about LocaleID>>#displayName

Ricardo Moran richi.moran at gmail.com
Tue May 25 00:53:57 EDT 2010


Maybe I'm missing something but the idea is fix the method #displayName to
look for the translation of "Language-Name" instead of the magic
phrase '<language
display name>' (which I don't know how it works... I guess that's why it's
calles "magic" :).

Anyway, I see that "Language-Name" is translated in some po files but in
latest dev images I execute

(LocaleID isoLanguage: 'es') displayName

and I get 'Spanish; Castilian' where it should be 'Español'. However, I
tried an old image (etoys4.0 of 9 October 2008 update 2340) and when I first
open Etoys I get the correct result. But, when I change the locale to "es",
it gives me the wrong result.
I know why this happens: newer images start up using the correct locale so I
guess the mo file is already loaded and it uses a GetTextTranslator (which,
as I said, doesn't work). In the old image the mo file is not loaded yet so
it uses InternalTranslator which holds the correct translation.

In a separate note, the spanish translation is wrong: it translates
"Language-Name" literally as "Nombre-Lenguaje". I don't know if the others
are right (because I don't know that many languages) but I think we should
warn the translators about that.

Cheers
Richo


On Wed, May 19, 2010 at 4:17 AM, Korakurider <korakurider at gmail.com> wrote:

> On Wed, May 19, 2010 at 3:50 AM, Bert Freudenberg <bert at freudenbergs.de>
> wrote:
> > On 18.05.2010, at 09:46, Ricardo Moran wrote:
> >
> > Hi,
> > I've found this method:
> > ----------------------------------------------------
> > LocaleID>>displayName
> > | magicPhrase translatedMagicPhrase |
> > magicPhrase := '<language display name>'.
> > translatedMagicPhrase := NaturalLanguageTranslator
> translateWithoutLoading:
> > magicPhrase toLocaleID: self.
> > ^ translatedMagicPhrase = magicPhrase
> > ifTrue: [self displayLanguage]
> > ifFalse: [translatedMagicPhrase]
> > ----------------------------------------------------
> > Shouldn't magicPhrase be 'Language-Name' as it is in the po file?
> >
> > Yes, we should fix that.
> >
> > Also, this string doesn't seem to be translated in any file, is that
> > correct?
> >
> > It is translated:
> > http://etoys.laptop.org/svn/trunk/etoys/po/etoys/de.po
> >
> > #: Language name as you'd like it to appear in the Languages menu
> > msgid "Language-Name"
> > msgstr "Deutsch"
>
> Some language needs additional font installed to draw string properly.
> So if we *naively fix* the translation, display of language name might
> be corrupted.
> Consideration on packaging will be required...
>
> /Korakurider
>
> >
> > - Bert -
> >
> >
> > _______________________________________________
> > etoys-dev mailing list
> > etoys-dev at squeakland.org
> > http://lists.squeakland.org/mailman/listinfo/etoys-dev
> >
> >
> _______________________________________________
> etoys-dev mailing list
> etoys-dev at squeakland.org
> http://lists.squeakland.org/mailman/listinfo/etoys-dev
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.squeakland.org/pipermail/etoys-dev/attachments/20100525/ac55a1c3/attachment.html


More information about the etoys-dev mailing list