diff options
author | Campbell Barton <ideasman42@gmail.com> | 2015-08-16 10:32:01 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2015-08-18 00:01:26 +0300 |
commit | 2e2dc9b9e32d104a0f7c3241ea0c11b57a37fd5b (patch) | |
tree | a6830032130d13dcbfa522ed6889fe6f141f99f3 /source/blender/makesrna/intern/rna_ui_api.c | |
parent | 3047b96eaa962fe45d2333f5ea4be809e02787cd (diff) |
Refactor translation code out of blenfont
- Add blentranslation `BLT_*` module.
- moved & split `BLF_translation.h` into (`BLT_translation.h`, `BLT_lang.h`).
- moved `BLF_*_unifont` functions from `blf_translation.c` to new source file `blf_font_i18n.c`.
Diffstat (limited to 'source/blender/makesrna/intern/rna_ui_api.c')
-rw-r--r-- | source/blender/makesrna/intern/rna_ui_api.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/source/blender/makesrna/intern/rna_ui_api.c b/source/blender/makesrna/intern/rna_ui_api.c index 395347ce047..81b6a77f683 100644 --- a/source/blender/makesrna/intern/rna_ui_api.c +++ b/source/blender/makesrna/intern/rna_ui_api.c @@ -34,7 +34,7 @@ #include "BLI_utildefines.h" -#include "BLF_translation.h" +#include "BLT_translation.h" #include "RNA_define.h" #include "RNA_enum_types.h" @@ -64,13 +64,13 @@ static const char *rna_translate_ui_text(const char *text, const char *text_ctxt int translate) { /* Also return text if UI labels translation is disabled. */ - if (!text || !text[0] || !translate || !BLF_translate_iface()) { + if (!text || !text[0] || !translate || !BLT_translate_iface()) { return text; } /* If a text_ctxt is specified, use it! */ if (text_ctxt && text_ctxt[0]) { - return BLF_pgettext(text_ctxt, text); + return BLT_pgettext(text_ctxt, text); } /* Else, if an RNA type or property is specified, use its context. */ @@ -82,17 +82,17 @@ static const char *rna_translate_ui_text(const char *text, const char *text_ctxt * if default context is not suitable. */ if (prop) { - return BLF_pgettext(RNA_property_translation_context(prop), text); + return BLT_pgettext(RNA_property_translation_context(prop), text); } #else (void)prop; #endif if (type) { - return BLF_pgettext(RNA_struct_translation_context(type), text); + return BLT_pgettext(RNA_struct_translation_context(type), text); } /* Else, default context! */ - return BLF_pgettext(BLF_I18NCONTEXT_DEFAULT, text); + return BLT_pgettext(BLT_I18NCONTEXT_DEFAULT, text); } static void rna_uiItemR(uiLayout *layout, PointerRNA *ptr, const char *propname, const char *name, const char *text_ctxt, |