[Bf-committers] i18n branch (garlic) review

Sergey I. Sharybin g.ulairi at gmail.com
Thu Sep 8 14:41:24 CEST 2011


Made some code checks and collected all found questions/issues:

- .Blanguages file is no longer used?
- Unnecessary checks in BLF_gettext. msgid shouldn't be NULL here and 
msgid[0] != '\0' is faster than strlen(msgid)
- In BLF_lang_set(). I think setting locale to smth.UTF-8 should be 
called first. I.e. in my case locale ru_RU doesn't use UTF-8 codepage -- 
it uses ISO-8859-5. So i've got errors about invalid utf8 sequences in 
py scripts when setting locale to ru_RU.
- blenfont is added as dependency to all editors..
- Not sure about UI_GetStyle function. Looks liek something unfinished.
- Numbers+plurals
- RNA_enum_items_gettexted. Can't it be handles on more lower level?
- RNA_types_init_gettext. Dislike list of structures, maybe we already 
got list of structs somewhere?
- WM_read_homefile(). Is it still have to be splitted?
- Language is changing globally. So there's no way to translate only 
tooltips (like it was in 2.49)

Regarding to that _ and N_ macroses. I think it's easy to write operator 
which will ise kinda DFS and collect all strings used by operators and 
RNA. In this case BLF dependency would be avoided for editors and py 
scripts wouldn't be touched. And it can be helpful for case of instant 
language switch (i.e. Dalai told it can be helpful). But it'll need 
gettext stuff called on draw. Not sure how slow it'll be.

Didn't think much about ways of solving this issues yet, will let you 
know when got new thoughts on this.

With best regards, Sergey I. Sharybin

More information about the Bf-committers mailing list