UFO:Alien Invasion

Archive => Bugs prior to release 2.4 => Topic started by: DarkRain on October 20, 2010, 08:56:28 pm

Title: Language list shows untranslated
Post by: DarkRain on October 20, 2010, 08:56:28 pm
Currently the language list in options is shown untranslated only the msgids are shown (at least they are in English) see image below

src/client/ui/node/ui_node_optionlist.c:141 (UI_OptionListNodeDraw):
Code: [Select]
        /* print the option label */
        label = OPTIONEXTRADATA(option).label;
        if (label[0] == '_')
            label = _(label + 1);
It expects an untrimmed translatable string but
src/client/cl_language.c:135 (CL_ParseLanguages)
Code: [Select]
            language->localeString = Mem_PoolStrDup(token + 1, cl_genericPool, 0);
will trim the leading underscore
this is no problem for transfer/aircraft equipment as the option list will be filled with already translated strings, but causes the language list to not be translated (actually only the msgids are shown but again at least they are in English)

Edit:
proposed patch (http://sourceforge.net/tracker/?func=detail&aid=3091464&group_id=157793&atid=805244)
Title: Re: Language list shows untranslated
Post by: bayo on October 20, 2010, 09:59:48 pm
Yes and no.

Yes, we should not use "_" and not translate it in the code. We call it a bug.

But i dont think the result will be better. Cause, i am sorry, but i dont know how we write "english" in chinese. Then it will be a mess if you click somewhere you should not. But i hope chinese people know how to right "chinese" in english (in msgid if you prefered). Then i dont know if we should apply this patch; but at least we should add a comment about the result of this "_" skip.

The real fix for languages should be to use languages name in this language itself. I mean chinese in chinese. i.e. wikipedia. I start a long time ago working on a script to create a small font file containing all characters need to display all language (chinese in chinese...) but i dont find a script based tool to extract and create font. If you know something like that, i am interesting to work on that. (idea is to use a few memory, and not generating all unicode page in memory, cause i think it will not be nice).

Title: Re: Language list shows untranslated
Post by: DarkRain on October 21, 2010, 04:28:17 am
Ah, that makes sense, so the idea is to have a font with the n character needed to write the names of all the languages in the world (or at least those available as translations)?
Title: Re: Language list shows untranslated
Post by: bayo on October 21, 2010, 08:11:19 pm
Yes, i think it is doable...

Your screenshot also show typo problem with lower/upper cases, and maybe "No languages" should be on top, or button, or excluded.
Title: Re: Language list shows untranslated
Post by: Duke on October 22, 2010, 01:28:52 am
My current prob is worse:
I select english and it shows german text (well, a mixture).

And it seems I can't even switch to a different language.
Any ideas ?
Title: Re: Language list shows untranslated
Post by: Mattn on October 22, 2010, 06:51:23 am
@duke: even after a restart?
Title: Re: Language list shows untranslated
Post by: Duke on October 23, 2010, 01:52:02 am
Yes :(
Title: Re: Language list shows untranslated
Post by: bayo on October 23, 2010, 03:29:11 am
do you build your mo file?
Title: Re: Language list shows untranslated
Post by: Duke on October 24, 2010, 01:03:08 am
Yes.
Using CB, I can't even avoid that ;)
Title: Re: Language list shows untranslated
Post by: Edi on November 02, 2010, 11:17:04 pm
Would it be related to this? (http://ufoai.ninex.info/forum/index.php?topic=4555.msg35010#msg35010) Because looks mightily like the same problem that has been there since forever and then some.
Title: Re: Language list shows untranslated
Post by: norabbit on January 30, 2011, 03:39:36 pm
FYI: This is still present in 2.4-deev IA-32 jan 23 2011 Win DEBUG.