project-navigation
Personal tools

Author Topic: Language list shows untranslated  (Read 4278 times)

Offline DarkRain

  • Project Coder
  • Captain
  • ***
  • Posts: 746
    • View Profile
Language list shows untranslated
« 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
« Last Edit: October 20, 2010, 09:01:25 pm by DarkRain »

Offline bayo

  • Professional loser
  • Project Coder
  • Captain
  • ***
  • Posts: 733
    • View Profile
Re: Language list shows untranslated
« Reply #1 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).


Offline DarkRain

  • Project Coder
  • Captain
  • ***
  • Posts: 746
    • View Profile
Re: Language list shows untranslated
« Reply #2 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)?

Offline bayo

  • Professional loser
  • Project Coder
  • Captain
  • ***
  • Posts: 733
    • View Profile
Re: Language list shows untranslated
« Reply #3 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.

Offline Duke

  • Administrator
  • PHALANX veteran
  • *****
  • Posts: 1037
    • View Profile
Re: Language list shows untranslated
« Reply #4 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 ?

Offline Mattn

  • Administrator
  • PHALANX Commander
  • *****
  • Posts: 4831
  • https://github.com/mgerhardy/vengi
    • View Profile
    • Vengi Voxel Tools
Re: Language list shows untranslated
« Reply #5 on: October 22, 2010, 06:51:23 am »
@duke: even after a restart?

Offline Duke

  • Administrator
  • PHALANX veteran
  • *****
  • Posts: 1037
    • View Profile
Re: Language list shows untranslated
« Reply #6 on: October 23, 2010, 01:52:02 am »
Yes :(

Offline bayo

  • Professional loser
  • Project Coder
  • Captain
  • ***
  • Posts: 733
    • View Profile
Re: Language list shows untranslated
« Reply #7 on: October 23, 2010, 03:29:11 am »
do you build your mo file?

Offline Duke

  • Administrator
  • PHALANX veteran
  • *****
  • Posts: 1037
    • View Profile
Re: Language list shows untranslated
« Reply #8 on: October 24, 2010, 01:03:08 am »
Yes.
Using CB, I can't even avoid that ;)

Offline Edi

  • Squad Leader
  • ****
  • Posts: 296
    • View Profile
Re: Language list shows untranslated
« Reply #9 on: November 02, 2010, 11:17:04 pm »
Would it be related to this? Because looks mightily like the same problem that has been there since forever and then some.

Offline norabbit

  • Cannon Fodder
  • **
  • Posts: 9
    • View Profile
Re: Language list shows untranslated
« Reply #10 on: January 30, 2011, 03:39:36 pm »
FYI: This is still present in 2.4-deev IA-32 jan 23 2011 Win DEBUG.