i18n stuff: adds translation_context to RNA structs (used for there ui name), and a first default "Operator" one for all operators' label.

The fact is, operators' label are nearly always verbs, while properties labels are nearly always nouns. So this should already solve many translations' problems regarding noun/verb confusion.

This commit also simplifies a bit i18n usage:
*Now IFACE_ and TIP_ macros (or there context versions, CTX_IFACE_/TIP_) are used nearly everywhere (with one exception, where code is a bit complex and needs to manually test whether ui/tip translations is allowed, so no need to redo it later through those macros).
*Also, those macros are now defined to NOP in case WITH_INTERNATIONAL is false, which avoid testing that define everywhere in code!
This commit is contained in:
2012-03-16 15:39:25 +00:00
parent 4e6669cee3
commit 2caa507b7e
12 changed files with 87 additions and 44 deletions

View File

@@ -639,7 +639,10 @@ PointerRNA uiItemFullO_ptr(uiLayout *layout, wmOperatorType *ot, const char *nam
int w;
if(!name) {
name= IFACE_(ot->name);
if (ot && ot->srna)
name = RNA_struct_ui_name(ot->srna);
else
name = "";
}
if(layout->root->type == UI_LAYOUT_MENU && !icon)