Use BLF API to check whether translation is enabled, when possible!
This commit is contained in:
@@ -475,7 +475,7 @@ static const char *rna_ensure_property_description(PropertyRNA *prop)
|
|||||||
}
|
}
|
||||||
|
|
||||||
#ifdef WITH_INTERNATIONAL
|
#ifdef WITH_INTERNATIONAL
|
||||||
if(description && (U.transopts&USER_DOTRANSLATE) && (U.transopts&USER_TR_TOOLTIPS))
|
if(description && BLF_translate_tooltips())
|
||||||
description= BLF_gettext(description);
|
description= BLF_gettext(description);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@@ -492,7 +492,7 @@ static const char *rna_ensure_property_name(PropertyRNA *prop)
|
|||||||
name= ((IDProperty*)prop)->name;
|
name= ((IDProperty*)prop)->name;
|
||||||
|
|
||||||
#ifdef WITH_INTERNATIONAL
|
#ifdef WITH_INTERNATIONAL
|
||||||
if((U.transopts&USER_DOTRANSLATE) && (U.transopts&USER_TR_IFACE)) {
|
if(BLF_translate_iface()) {
|
||||||
if(prop->translation_context)
|
if(prop->translation_context)
|
||||||
name = BLF_pgettext(prop->translation_context, name);
|
name = BLF_pgettext(prop->translation_context, name);
|
||||||
else
|
else
|
||||||
@@ -1182,7 +1182,7 @@ void RNA_property_enum_items_gettexted(bContext *C, PointerRNA *ptr, PropertyRNA
|
|||||||
RNA_property_enum_items(C, ptr, prop, item, totitem, free);
|
RNA_property_enum_items(C, ptr, prop, item, totitem, free);
|
||||||
|
|
||||||
#ifdef WITH_INTERNATIONAL
|
#ifdef WITH_INTERNATIONAL
|
||||||
if((U.transopts&USER_DOTRANSLATE) && (U.transopts&USER_TR_IFACE)) {
|
if(BLF_translate_iface()) {
|
||||||
int i;
|
int i;
|
||||||
EnumPropertyItem *nitem;
|
EnumPropertyItem *nitem;
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user