[Bf-committers] Cleaning i18n code
montagne29 at wanadoo.fr
Wed Oct 19 23:00:15 CEST 2011
I’ve spent the last days working on i18n stuff, both py tools (I’ll talk
about this on bf-translations-dev), and cleaning i18n usage in Blender code.
Here is the diff of my work: http://www.pasteall.org/25671/diff (it’s
quite big, due to many small lines editing...).
I intend to commit this very soon (likely tomorrow thursday), unless
some objections arise. :P
Right now, there are "memories" of the "old" (less than a month!)
* A few remaining calls to BLF_gettext() (only UI_translate_do_iface and
UI_translate_do_tooltip should be used).
* The _() macro still also calls BLF_gettext()!
Here are the changes made by the patch:
* Removing the N_() macro (which was the "no action" translation marker).
* Redefining the _() macro to become the "no action" translation marker.
* Removing most N_() and _() calls, only keeping the few needed ones
(i.e. strings that are in no other way findable by xgettext and/or
* Replacing all calls to BLF_gettext by relevant UI_translate_do_iface
or UI_translate_do_tooltip one
* Removed for now the macros like TIP_ and IFACE_ defined in a few
places. Imho, this should be done (defined) globally, or not at all.
All this somewhat clarifies and simplifies the code.
On the bf-translations scripts side, this only implies adding
UI_translate_do_iface and UI_translate_do_tooltip as detection markers
It also allows to reduce POTFILES.in quite notably (only 23 files
remaining in it).
I did not defined/used global macros like IFACE_ (for
UI_translate_do_iface) and TIP_ (UI_translate_do_tooltip), because I’m
not sure we would like to have them... Even though I’d personnaly would
find them most handy! But anyway, it’s easy to do it later (only
More information about the Bf-committers