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 | |
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`.
283 files changed, 1110 insertions, 883 deletions
diff --git a/build_files/cmake/macros.cmake b/build_files/cmake/macros.cmake index e7fc0ec0a6e..5a870aa2319 100644 --- a/build_files/cmake/macros.cmake +++ b/build_files/cmake/macros.cmake @@ -591,6 +591,7 @@ function(SETUP_BLENDER_SORTED_LIBS) ge_videotex bf_dna bf_blenfont + bf_blentranslation bf_intern_audaspace bf_intern_mikktspace bf_intern_dualcon diff --git a/source/blender/CMakeLists.txt b/source/blender/CMakeLists.txt index 9a73921bbc7..e36f9e2b43e 100644 --- a/source/blender/CMakeLists.txt +++ b/source/blender/CMakeLists.txt @@ -101,6 +101,7 @@ add_subdirectory(blenlib) add_subdirectory(bmesh) add_subdirectory(render) add_subdirectory(blenfont) +add_subdirectory(blentranslation) add_subdirectory(blenloader) add_subdirectory(depsgraph) add_subdirectory(ikplugin) diff --git a/source/blender/SConscript b/source/blender/SConscript index e987b6be779..c6f4994bb4f 100644 --- a/source/blender/SConscript +++ b/source/blender/SConscript @@ -33,6 +33,7 @@ SConscript(['avi/SConscript', 'blenkernel/SConscript', 'blenlib/SConscript', 'blenloader/SConscript', + 'blentranslation/SConscript', 'depsgraph/SConscript', 'gpu/SConscript', 'editors/SConscript', diff --git a/source/blender/blenfont/BLF_api.h b/source/blender/blenfont/BLF_api.h index 09734bd9754..d8dee7110a5 100644 --- a/source/blender/blenfont/BLF_api.h +++ b/source/blender/blenfont/BLF_api.h @@ -192,6 +192,12 @@ void BLF_thumb_preview( const float font_color[4], const int font_size, unsigned char *buf, int w, int h, int channels) ATTR_NONNULL(); +/* blf_font_i18.c */ +unsigned char *BLF_get_unifont(int *unifont_size); +void BLF_free_unifont(void); +unsigned char *BLF_get_unifont_mono(int *unifont_size); +void BLF_free_unifont_mono(void); + #ifdef DEBUG void BLF_state_print(int fontid); #endif diff --git a/source/blender/blenfont/BLF_translation.h b/source/blender/blenfont/BLF_translation.h deleted file mode 100644 index c9b0c253ed4..00000000000 --- a/source/blender/blenfont/BLF_translation.h +++ /dev/null @@ -1,240 +0,0 @@ -/* - * ***** BEGIN GPL LICENSE BLOCK ***** - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software Foundation, - * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - * - * The Original Code is Copyright (C) 2011 Blender Foundation. - * All rights reserved. - * - * - * Contributor(s): Blender Foundation, - * Sergey Sharybin - * - * ***** END GPL LICENSE BLOCK ***** - */ - -/** \file blender/blenfont/BLF_translation.h - * \ingroup blf - */ - - -#ifndef __BLF_TRANSLATION_H__ -#define __BLF_TRANSLATION_H__ - -#include "BLI_utildefines.h" /* for bool type */ - -#define TEXT_DOMAIN_NAME "blender" - -#ifdef __cplusplus -extern "C" { -#endif - -/* blf_lang.c */ - -/* Search the path directory to the locale files, this try all - * the case for Linux, Win and Mac. - * Also dynamically builds locales and locales' menu from "languages" text file. - */ -void BLF_lang_init(void); - -/* Free languages and locales_menu arrays created by BLF_lang_init. */ -void BLF_lang_free(void); - -/* Set the current locale. */ -void BLF_lang_set(const char *); -/* Get the current locale ([partial] ISO code, e.g. es_ES). */ -const char *BLF_lang_get(void); - -/* Get locale's elements (if relevant pointer is not NULL and element actually exists, e.g. if there is no variant, - * *variant and *language_variant will always be NULL). - * Non-null elements are always MEM_mallocN'ed, it's the caller's responsibility to free them. - * NOTE: Always available, even in non-WITH_INTERNATIONAL builds. - */ -void BLF_locale_explode(const char *locale, char **language, char **country, char **variant, - char **language_country, char **language_variant); - -/* Get EnumPropertyItem's for translations menu. */ -struct EnumPropertyItem *BLF_RNA_lang_enum_properties(void); - -/* blf_translation.c */ - -unsigned char *BLF_get_unifont(int *unifont_size); -void BLF_free_unifont(void); -unsigned char *BLF_get_unifont_mono(int *unifont_size); -void BLF_free_unifont_mono(void); - -bool BLF_is_default_context(const char *msgctxt); -const char *BLF_pgettext(const char *msgctxt, const char *msgid); - -/* translation */ -bool BLF_translate(void); -bool BLF_translate_iface(void); -bool BLF_translate_tooltips(void); -bool BLF_translate_new_dataname(void); -const char *BLF_translate_do(const char *msgctxt, const char *msgid); -const char *BLF_translate_do_iface(const char *msgctxt, const char *msgid); -const char *BLF_translate_do_tooltip(const char *msgctxt, const char *msgid); -const char *BLF_translate_do_new_dataname(const char *msgctxt, const char *msgid); - - -/* The "translation-marker" macro. */ -#define N_(msgid) msgid -#define CTX_N_(context, msgid) msgid - -/* Those macros should be used everywhere in UI code. */ -#ifdef WITH_INTERNATIONAL -/*# define _(msgid) BLF_gettext(msgid) */ -# define IFACE_(msgid) BLF_translate_do_iface(NULL, msgid) -# define TIP_(msgid) BLF_translate_do_tooltip(NULL, msgid) -# define DATA_(msgid) BLF_translate_do_new_dataname(NULL, msgid) -# define CTX_IFACE_(context, msgid) BLF_translate_do_iface(context, msgid) -# define CTX_TIP_(context, msgid) BLF_translate_do_tooltip(context, msgid) -# define CTX_DATA_(context, msgid) BLF_translate_do_new_dataname(context, msgid) -#else -/*# define _(msgid) msgid */ -# define IFACE_(msgid) msgid -# define TIP_(msgid) msgid -# define DATA_(msgid) msgid -# define CTX_IFACE_(context, msgid) msgid -# define CTX_TIP_(context, msgid) msgid -# define CTX_DATA_(context, msgid) msgid -#endif - -/* Helper macro, when we want to define a same msgid for multiple msgctxt... - * Does nothing in C, but is "parsed" by our i18n py tools. - * XXX Currently limited to at most 16 contexts at once - * (but you can call it several times with the same msgid, should you need more contexts!). - */ -#define BLF_I18N_MSGID_MULTI_CTXT(msgid, ...) - -/****************************************************************************** - * All i18n contexts must be defined here. - * This is a nice way to be sure not to use a context twice for different - * things, and limit the number of existing contexts! - * WARNING! Contexts should not be longer than BKE_ST_MAXNAME - 1! - */ - -/* Default, void context. - * WARNING! The "" context is not the same as no (NULL) context at mo/boost::locale level! - * NOTE: We translate BLF_I18NCONTEXT_DEFAULT as BLF_I18NCONTEXT_DEFAULT_BPY in Python, as we can't use "natural" - * None value in rna string properties... :/ - * The void string "" is also interpreted as BLF_I18NCONTEXT_DEFAULT. - * For perf reason, we only use the first char to detect this context, so other contexts should never start - * with the same char! - */ -#define BLF_I18NCONTEXT_DEFAULT NULL -#define BLF_I18NCONTEXT_DEFAULT_BPYRNA "*" - -/* Default context for operator names/labels. */ -#define BLF_I18NCONTEXT_OPERATOR_DEFAULT "Operator" - -/* Mark the msgid applies to several elements (needed in some cases, as english adjectives have no plural mark. :( */ -#define BLF_I18NCONTEXT_PLURAL "Plural" - -/* ID-types contexts. */ -/* WARNING! Keep it in sync with idtypes in blenkernel/intern/idcode.c */ -#define BLF_I18NCONTEXT_ID_ACTION "Action" -#define BLF_I18NCONTEXT_ID_ARMATURE "Armature" -#define BLF_I18NCONTEXT_ID_BRUSH "Brush" -#define BLF_I18NCONTEXT_ID_CAMERA "Camera" -#define BLF_I18NCONTEXT_ID_CURVE "Curve" -#define BLF_I18NCONTEXT_ID_FREESTYLELINESTYLE "FreestyleLineStyle" -#define BLF_I18NCONTEXT_ID_GPENCIL "GPencil" -#define BLF_I18NCONTEXT_ID_GROUP "Group" -#define BLF_I18NCONTEXT_ID_ID "ID" -#define BLF_I18NCONTEXT_ID_IMAGE "Image" -/*#define BLF_I18NCONTEXT_ID_IPO "Ipo"*/ /* Deprecated */ -#define BLF_I18NCONTEXT_ID_SHAPEKEY "Key" -#define BLF_I18NCONTEXT_ID_LAMP "Lamp" -#define BLF_I18NCONTEXT_ID_LIBRARY "Library" -#define BLF_I18NCONTEXT_ID_LATTICE "Lattice" -#define BLF_I18NCONTEXT_ID_MATERIAL "Material" -#define BLF_I18NCONTEXT_ID_METABALL "Metaball" -#define BLF_I18NCONTEXT_ID_MESH "Mesh" -#define BLF_I18NCONTEXT_ID_NODETREE "NodeTree" -#define BLF_I18NCONTEXT_ID_OBJECT "Object" -#define BLF_I18NCONTEXT_ID_PAINTCURVE "PaintCurve" -#define BLF_I18NCONTEXT_ID_PALETTE "Palette" -#define BLF_I18NCONTEXT_ID_PARTICLESETTINGS "ParticleSettings" -#define BLF_I18NCONTEXT_ID_SCENE "Scene" -#define BLF_I18NCONTEXT_ID_SCREEN "Screen" -#define BLF_I18NCONTEXT_ID_SEQUENCE "Sequence" -#define BLF_I18NCONTEXT_ID_SPEAKER "Speaker" -#define BLF_I18NCONTEXT_ID_SOUND "Sound" -#define BLF_I18NCONTEXT_ID_TEXTURE "Texture" -#define BLF_I18NCONTEXT_ID_TEXT "Text" -#define BLF_I18NCONTEXT_ID_VFONT "VFont" -#define BLF_I18NCONTEXT_ID_WORLD "World" -#define BLF_I18NCONTEXT_ID_WINDOWMANAGER "WindowManager" -#define BLF_I18NCONTEXT_ID_MOVIECLIP "MovieClip" -#define BLF_I18NCONTEXT_ID_MASK "Mask" - -/* Helper for bpy.app.i18n object... */ -typedef struct { - const char *c_id; - const char *py_id; - const char *value; -} BLF_i18n_contexts_descriptor; - -#define BLF_I18NCONTEXTS_ITEM(ctxt_id, py_id) {#ctxt_id, py_id, ctxt_id} - -#define BLF_I18NCONTEXTS_DESC { \ - BLF_I18NCONTEXTS_ITEM(BLF_I18NCONTEXT_DEFAULT, "default_real"), \ - BLF_I18NCONTEXTS_ITEM(BLF_I18NCONTEXT_DEFAULT_BPYRNA, "default"), \ - BLF_I18NCONTEXTS_ITEM(BLF_I18NCONTEXT_OPERATOR_DEFAULT, "operator_default"), \ - BLF_I18NCONTEXTS_ITEM(BLF_I18NCONTEXT_PLURAL, "plural"), \ - BLF_I18NCONTEXTS_ITEM(BLF_I18NCONTEXT_ID_ACTION, "id_action"), \ - BLF_I18NCONTEXTS_ITEM(BLF_I18NCONTEXT_ID_ARMATURE, "id_armature"), \ - BLF_I18NCONTEXTS_ITEM(BLF_I18NCONTEXT_ID_BRUSH, "id_brush"), \ - BLF_I18NCONTEXTS_ITEM(BLF_I18NCONTEXT_ID_CAMERA, "id_camera"), \ - BLF_I18NCONTEXTS_ITEM(BLF_I18NCONTEXT_ID_CURVE, "id_curve"), \ - BLF_I18NCONTEXTS_ITEM(BLF_I18NCONTEXT_ID_FREESTYLELINESTYLE, "id_fs_linestyle"), \ - BLF_I18NCONTEXTS_ITEM(BLF_I18NCONTEXT_ID_GPENCIL, "id_gpencil"), \ - BLF_I18NCONTEXTS_ITEM(BLF_I18NCONTEXT_ID_GROUP, "id_group"), \ - BLF_I18NCONTEXTS_ITEM(BLF_I18NCONTEXT_ID_ID, "id_id"), \ - BLF_I18NCONTEXTS_ITEM(BLF_I18NCONTEXT_ID_IMAGE, "id_image"), \ - /*BLF_I18NCONTEXTS_ITEM(BLF_I18NCONTEXT_ID_IPO, "id_ipo"),*/ \ - BLF_I18NCONTEXTS_ITEM(BLF_I18NCONTEXT_ID_SHAPEKEY, "id_shapekey"), \ - BLF_I18NCONTEXTS_ITEM(BLF_I18NCONTEXT_ID_LAMP, "id_lamp"), \ - BLF_I18NCONTEXTS_ITEM(BLF_I18NCONTEXT_ID_LIBRARY, "id_library"), \ - BLF_I18NCONTEXTS_ITEM(BLF_I18NCONTEXT_ID_LATTICE, "id_lattice"), \ - BLF_I18NCONTEXTS_ITEM(BLF_I18NCONTEXT_ID_MASK, "id_mask"), \ - BLF_I18NCONTEXTS_ITEM(BLF_I18NCONTEXT_ID_MATERIAL, "id_material"), \ - BLF_I18NCONTEXTS_ITEM(BLF_I18NCONTEXT_ID_METABALL, "id_metaball"), \ - BLF_I18NCONTEXTS_ITEM(BLF_I18NCONTEXT_ID_MESH, "id_mesh"), \ - BLF_I18NCONTEXTS_ITEM(BLF_I18NCONTEXT_ID_MOVIECLIP, "id_movieclip"), \ - BLF_I18NCONTEXTS_ITEM(BLF_I18NCONTEXT_ID_NODETREE, "id_nodetree"), \ - BLF_I18NCONTEXTS_ITEM(BLF_I18NCONTEXT_ID_OBJECT, "id_object"), \ - BLF_I18NCONTEXTS_ITEM(BLF_I18NCONTEXT_ID_PAINTCURVE, "id_paintcurve"), \ - BLF_I18NCONTEXTS_ITEM(BLF_I18NCONTEXT_ID_PALETTE, "id_palette"), \ - BLF_I18NCONTEXTS_ITEM(BLF_I18NCONTEXT_ID_PARTICLESETTINGS, "id_particlesettings"), \ - BLF_I18NCONTEXTS_ITEM(BLF_I18NCONTEXT_ID_SCENE, "id_scene"), \ - BLF_I18NCONTEXTS_ITEM(BLF_I18NCONTEXT_ID_SCREEN, "id_screen"), \ - BLF_I18NCONTEXTS_ITEM(BLF_I18NCONTEXT_ID_SEQUENCE, "id_sequence"), \ - BLF_I18NCONTEXTS_ITEM(BLF_I18NCONTEXT_ID_SPEAKER, "id_speaker"), \ - BLF_I18NCONTEXTS_ITEM(BLF_I18NCONTEXT_ID_SOUND, "id_sound"), \ - BLF_I18NCONTEXTS_ITEM(BLF_I18NCONTEXT_ID_TEXTURE, "id_texture"), \ - BLF_I18NCONTEXTS_ITEM(BLF_I18NCONTEXT_ID_TEXT, "id_text"), \ - BLF_I18NCONTEXTS_ITEM(BLF_I18NCONTEXT_ID_VFONT, "id_vfont"), \ - BLF_I18NCONTEXTS_ITEM(BLF_I18NCONTEXT_ID_WORLD, "id_world"), \ - BLF_I18NCONTEXTS_ITEM(BLF_I18NCONTEXT_ID_WINDOWMANAGER, "id_windowmanager"), \ - {NULL, NULL, NULL} \ -} - -#ifdef __cplusplus -}; -#endif - -#endif /* __BLF_TRANSLATION_H__ */ diff --git a/source/blender/blenfont/CMakeLists.txt b/source/blender/blenfont/CMakeLists.txt index 059e2cac680..36ad6fe03cf 100644 --- a/source/blender/blenfont/CMakeLists.txt +++ b/source/blender/blenfont/CMakeLists.txt @@ -25,6 +25,7 @@ set(INC . ../blenkernel ../blenlib + ../blentranslation ../editors/include ../gpu ../makesdna @@ -32,7 +33,6 @@ set(INC ../imbuf ../../../intern/guardedalloc ../../../intern/glew-mx - ../../../intern/locale ) set(INC_SYS @@ -44,14 +44,12 @@ set(SRC intern/blf.c intern/blf_dir.c intern/blf_font.c + intern/blf_font_i18n.c intern/blf_glyph.c - intern/blf_lang.c intern/blf_thumbs.c - intern/blf_translation.c intern/blf_util.c BLF_api.h - BLF_translation.h intern/blf_internal.h intern/blf_internal_types.h ) diff --git a/source/blender/blenfont/SConscript b/source/blender/blenfont/SConscript index fdb5f669597..6c3b5748011 100644 --- a/source/blender/blenfont/SConscript +++ b/source/blender/blenfont/SConscript @@ -34,11 +34,11 @@ incs = [ '.', 'intern', '#/intern/guardedalloc', - '#/intern/locale', env['BF_GLEW_INC'], '#/intern/glew-mx', '../blenkernel', '../blenlib', + '../blentranslation', '../editors/include', '../gpu', '../imbuf', diff --git a/source/blender/blenfont/intern/blf_font_i18n.c b/source/blender/blenfont/intern/blf_font_i18n.c new file mode 100644 index 00000000000..da7d2adcdf6 --- /dev/null +++ b/source/blender/blenfont/intern/blf_font_i18n.c @@ -0,0 +1,123 @@ +/* + * ***** BEGIN GPL LICENSE BLOCK ***** + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software Foundation, + * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + * + * The Original Code is Copyright (C) 2011 Blender Foundation. + * All rights reserved. + * + * Contributor(s): Blender Foundation, + * Sergey Sharybin + * + * ***** END GPL LICENSE BLOCK ***** + */ + +/** \file blender/blenfont/intern/blf_font_access.c + * \ingroup blf + * + * API for accessing font files. + */ + +#include <stdlib.h> +#include <string.h> + +#include "BLF_api.h" + +#include "MEM_guardedalloc.h" + +#include "BLI_fileops.h" +#include "BLI_path_util.h" +#include "BLI_string.h" + +#include "BKE_appdir.h" + +#ifdef WITH_INTERNATIONAL +static const char unifont_filename[] = "droidsans.ttf.gz"; +static unsigned char *unifont_ttf = NULL; +static int unifont_size = 0; +static const char unifont_mono_filename[] = "bmonofont-i18n.ttf.gz"; +static unsigned char *unifont_mono_ttf = NULL; +static int unifont_mono_size = 0; +#endif /* WITH_INTERNATIONAL */ + +unsigned char *BLF_get_unifont(int *r_unifont_size) +{ +#ifdef WITH_INTERNATIONAL + if (unifont_ttf == NULL) { + const char * const fontpath = BKE_appdir_folder_id(BLENDER_DATAFILES, "fonts"); + if (fontpath) { + char unifont_path[1024]; + + BLI_snprintf(unifont_path, sizeof(unifont_path), "%s/%s", fontpath, unifont_filename); + + unifont_ttf = (unsigned char *)BLI_file_ungzip_to_mem(unifont_path, &unifont_size); + } + else { + printf("%s: 'fonts' data path not found for international font, continuing\n", __func__); + } + } + + *r_unifont_size = unifont_size; + + return unifont_ttf; +#else + (void)r_unifont_size; + return NULL; +#endif +} + +void BLF_free_unifont(void) +{ +#ifdef WITH_INTERNATIONAL + if (unifont_ttf) + MEM_freeN(unifont_ttf); +#else +#endif +} + +unsigned char *BLF_get_unifont_mono(int *r_unifont_size) +{ +#ifdef WITH_INTERNATIONAL + if (unifont_mono_ttf == NULL) { + const char *fontpath = BKE_appdir_folder_id(BLENDER_DATAFILES, "fonts"); + if (fontpath) { + char unifont_path[1024]; + + BLI_snprintf(unifont_path, sizeof(unifont_path), "%s/%s", fontpath, unifont_mono_filename); + + unifont_mono_ttf = (unsigned char *)BLI_file_ungzip_to_mem(unifont_path, &unifont_mono_size); + } + else { + printf("%s: 'fonts' data path not found for international monospace font, continuing\n", __func__); + } + } + + *r_unifont_size = unifont_mono_size; + + return unifont_mono_ttf; +#else + (void)r_unifont_size; + return NULL; +#endif +} + +void BLF_free_unifont_mono(void) +{ +#ifdef WITH_INTERNATIONAL + if (unifont_mono_ttf) + MEM_freeN(unifont_mono_ttf); +#else +#endif +} diff --git a/source/blender/blenfont/intern/blf_thumbs.c b/source/blender/blenfont/intern/blf_thumbs.c index 4b7a568b8b0..4eea5d581d0 100644 --- a/source/blender/blenfont/intern/blf_thumbs.c +++ b/source/blender/blenfont/intern/blf_thumbs.c @@ -45,7 +45,7 @@ #include "blf_internal_types.h" #include "BLF_api.h" -#include "BLF_translation.h" +#include "BLT_translation.h" #include "BLI_strict_flags.h" @@ -90,7 +90,7 @@ void BLF_thumb_preview( font_size_curr = font_size; for (i = 0; i < draw_str_lines; i++) { - const char *draw_str_i18n = BLF_translate_do(BLF_I18NCONTEXT_DEFAULT, draw_str[i]); + const char *draw_str_i18n = BLT_translate_do(BLT_I18NCONTEXT_DEFAULT, draw_str[i]); const size_t draw_str_i18n_len = strlen(draw_str_i18n); int draw_str_i18n_nbr = 0; diff --git a/source/blender/blenkernel/CMakeLists.txt b/source/blender/blenkernel/CMakeLists.txt index 5a3fb492762..0865efb5ba7 100644 --- a/source/blender/blenkernel/CMakeLists.txt +++ b/source/blender/blenkernel/CMakeLists.txt @@ -28,6 +28,7 @@ set(INC ../blenfont ../blenlib ../blenloader + ../blentranslation ../depsgraph ../gpu ../ikplugin diff --git a/source/blender/blenkernel/SConscript b/source/blender/blenkernel/SConscript index 853e2b05433..edb2852d9ac 100644 --- a/source/blender/blenkernel/SConscript +++ b/source/blender/blenkernel/SConscript @@ -56,6 +56,7 @@ incs = [ '../blenfont', '../blenlib', '../blenloader', + '../blentranslation', '../bmesh', '../depsgraph', '../gpu', diff --git a/source/blender/blenkernel/intern/action.c b/source/blender/blenkernel/intern/action.c index 1b73978b524..5b1a6ea7a51 100644 --- a/source/blender/blenkernel/intern/action.c +++ b/source/blender/blenkernel/intern/action.c @@ -47,7 +47,7 @@ #include "BLI_utildefines.h" #include "BLI_ghash.h" -#include "BLF_translation.h" +#include "BLT_translation.h" #include "BKE_action.h" #include "BKE_anim.h" diff --git a/source/blender/blenkernel/intern/anim.c b/source/blender/blenkernel/intern/anim.c index b878dbe1f39..dff696863e9 100644 --- a/source/blender/blenkernel/intern/anim.c +++ b/source/blender/blenkernel/intern/anim.c @@ -36,7 +36,7 @@ #include "BLI_listbase.h" #include "BLI_math.h" -#include "BLF_translation.h" +#include "BLT_translation.h" #include "DNA_anim_types.h" #include "DNA_armature_types.h" diff --git a/source/blender/blenkernel/intern/anim_sys.c b/source/blender/blenkernel/intern/anim_sys.c index d5a8b8f857c..8010d3450cb 100644 --- a/source/blender/blenkernel/intern/anim_sys.c +++ b/source/blender/blenkernel/intern/anim_sys.c @@ -44,7 +44,7 @@ #include "BLI_dynstr.h" #include "BLI_listbase.h" -#include "BLF_translation.h" +#include "BLT_translation.h" #include "DNA_anim_types.h" #include "DNA_lamp_types.h" diff --git a/source/blender/blenkernel/intern/constraint.c b/source/blender/blenkernel/intern/constraint.c index be466c29a12..e7f6210fef4 100644 --- a/source/blender/blenkernel/intern/constraint.c +++ b/source/blender/blenkernel/intern/constraint.c @@ -43,7 +43,7 @@ #include "BLI_kdopbvh.h" #include "BLI_utildefines.h" -#include "BLF_translation.h" +#include "BLT_translation.h" #include "DNA_armature_types.h" #include "DNA_constraint_types.h" diff --git a/source/blender/blenkernel/intern/context.c b/source/blender/blenkernel/intern/context.c index 7142c092583..d223a3aff9e 100644 --- a/source/blender/blenkernel/intern/context.c +++ b/source/blender/blenkernel/intern/context.c @@ -44,7 +44,7 @@ #include "BLI_threads.h" #include "BLI_utildefines.h" -#include "BLF_translation.h" +#include "BLT_translation.h" #include "BKE_context.h" #include "BKE_main.h" diff --git a/source/blender/blenkernel/intern/customdata.c b/source/blender/blenkernel/intern/customdata.c index 6947e9c3644..2e377195d67 100644 --- a/source/blender/blenkernel/intern/customdata.c +++ b/source/blender/blenkernel/intern/customdata.c @@ -51,7 +51,7 @@ #include "BLI_math_color_blend.h" #include "BLI_mempool.h" -#include "BLF_translation.h" +#include "BLT_translation.h" #include "BKE_customdata.h" #include "BKE_customdata_file.h" diff --git a/source/blender/blenkernel/intern/deform.c b/source/blender/blenkernel/intern/deform.c index 6e5747ac9c9..6670c3359d7 100644 --- a/source/blender/blenkernel/intern/deform.c +++ b/source/blender/blenkernel/intern/deform.c @@ -49,7 +49,7 @@ #include "BLI_string.h" #include "BLI_utildefines.h" -#include "BLF_translation.h" +#include "BLT_translation.h" #include "BKE_customdata.h" #include "BKE_data_transfer.h" diff --git a/source/blender/blenkernel/intern/dynamicpaint.c b/source/blender/blenkernel/intern/dynamicpaint.c index 12d6bf72742..d97233aad90 100644 --- a/source/blender/blenkernel/intern/dynamicpaint.c +++ b/source/blender/blenkernel/intern/dynamicpaint.c @@ -35,7 +35,7 @@ #include "BLI_threads.h" #include "BLI_utildefines.h" -#include "BLF_translation.h" +#include "BLT_translation.h" #include "DNA_anim_types.h" #include "DNA_armature_types.h" @@ -1077,7 +1077,7 @@ DynamicPaintSurface *dynamicPaint_createNewSurface(DynamicPaintCanvasSettings *c modifier_path_init(surface->image_output_path, sizeof(surface->image_output_path), "cache_dynamicpaint"); /* Using ID_BRUSH i18n context, as we have no physics/dpaint one for now... */ - dynamicPaintSurface_setUniqueName(surface, CTX_DATA_(BLF_I18NCONTEXT_ID_BRUSH, "Surface")); + dynamicPaintSurface_setUniqueName(surface, CTX_DATA_(BLT_I18NCONTEXT_ID_BRUSH, "Surface")); surface->effector_weights = BKE_add_effector_weights(NULL); diff --git a/source/blender/blenkernel/intern/fcurve.c b/source/blender/blenkernel/intern/fcurve.c index 7f94ec1f8d9..a75711b311c 100644 --- a/source/blender/blenkernel/intern/fcurve.c +++ b/source/blender/blenkernel/intern/fcurve.c @@ -49,7 +49,7 @@ #include "BLI_threads.h" #include "BLI_utildefines.h" -#include "BLF_translation.h" +#include "BLT_translation.h" #include "BKE_fcurve.h" #include "BKE_animsys.h" @@ -1623,8 +1623,8 @@ DriverVar *driver_add_new_variable(ChannelDriver *driver) BLI_addtail(&driver->variables, dvar); /* give the variable a 'unique' name */ - strcpy(dvar->name, CTX_DATA_(BLF_I18NCONTEXT_ID_ACTION, "var")); - BLI_uniquename(&driver->variables, dvar, CTX_DATA_(BLF_I18NCONTEXT_ID_ACTION, "var"), '_', + strcpy(dvar->name, CTX_DATA_(BLT_I18NCONTEXT_ID_ACTION, "var")); + BLI_uniquename(&driver->variables, dvar, CTX_DATA_(BLT_I18NCONTEXT_ID_ACTION, "var"), '_', offsetof(DriverVar, name), sizeof(dvar->name)); /* set the default type to 'single prop' */ diff --git a/source/blender/blenkernel/intern/fmodifier.c b/source/blender/blenkernel/intern/fmodifier.c index 04c5ddd8ef3..2305ae89abd 100644 --- a/source/blender/blenkernel/intern/fmodifier.c +++ b/source/blender/blenkernel/intern/fmodifier.c @@ -37,7 +37,7 @@ #include "DNA_anim_types.h" -#include "BLF_translation.h" +#include "BLT_translation.h" #include "BLI_blenlib.h" #include "BLI_ghash.h" diff --git a/source/blender/blenkernel/intern/gpencil.c b/source/blender/blenkernel/intern/gpencil.c index 38a84296ca6..ee5c9192371 100644 --- a/source/blender/blenkernel/intern/gpencil.c +++ b/source/blender/blenkernel/intern/gpencil.c @@ -40,7 +40,7 @@ #include "BLI_utildefines.h" #include "BLI_math_vector.h" -#include "BLF_translation.h" +#include "BLT_translation.h" #include "DNA_gpencil_types.h" #include "DNA_userdef_types.h" diff --git a/source/blender/blenkernel/intern/idcode.c b/source/blender/blenkernel/intern/idcode.c index 3101d7874a6..cedaab4a9b3 100644 --- a/source/blender/blenkernel/intern/idcode.c +++ b/source/blender/blenkernel/intern/idcode.c @@ -37,7 +37,7 @@ #include "BLI_utildefines.h" -#include "BLF_translation.h" +#include "BLT_translation.h" #include "BKE_idcode.h" @@ -52,43 +52,43 @@ typedef struct { } IDType; /* plural need to match rna_main.c's MainCollectionDef */ -/* WARNING! Keep it in sync with i18n contexts in BLF_translation.h */ +/* WARNING! Keep it in sync with i18n contexts in BLT_translation.h */ static IDType idtypes[] = { - { ID_AC, "Action", "actions", BLF_I18NCONTEXT_ID_ACTION, IDTYPE_FLAGS_ISLINKABLE }, - { ID_AR, "Armature", "armatures", BLF_I18NCONTEXT_ID_ARMATURE, IDTYPE_FLAGS_ISLINKABLE }, - { ID_BR, "Brush", "brushes", BLF_I18NCONTEXT_ID_BRUSH, IDTYPE_FLAGS_ISLINKABLE }, - { ID_CA, "Camera", "cameras", BLF_I18NCONTEXT_ID_CAMERA, IDTYPE_FLAGS_ISLINKABLE }, - { ID_CU, "Curve", "curves", BLF_I18NCONTEXT_ID_CURVE, IDTYPE_FLAGS_ISLINKABLE }, - { ID_GD, "GPencil", "grease_pencil", BLF_I18NCONTEXT_ID_GPENCIL, IDTYPE_FLAGS_ISLINKABLE }, /* rename gpencil */ - { ID_GR, "Group", "groups", BLF_I18NCONTEXT_ID_GROUP, IDTYPE_FLAGS_ISLINKABLE }, - { ID_ID, "ID", "ids", BLF_I18NCONTEXT_ID_ID, 0 }, /* plural is fake */ - { ID_IM, "Image", "images", BLF_I18NCONTEXT_ID_IMAGE, IDTYPE_FLAGS_ISLINKABLE }, + { ID_AC, "Action", "actions", BLT_I18NCONTEXT_ID_ACTION, IDTYPE_FLAGS_ISLINKABLE }, + { ID_AR, "Armature", "armatures", BLT_I18NCONTEXT_ID_ARMATURE, IDTYPE_FLAGS_ISLINKABLE }, + { ID_BR, "Brush", "brushes", BLT_I18NCONTEXT_ID_BRUSH, IDTYPE_FLAGS_ISLINKABLE }, + { ID_CA, "Camera", "cameras", BLT_I18NCONTEXT_ID_CAMERA, IDTYPE_FLAGS_ISLINKABLE }, + { ID_CU, "Curve", "curves", BLT_I18NCONTEXT_ID_CURVE, IDTYPE_FLAGS_ISLINKABLE }, + { ID_GD, "GPencil", "grease_pencil", BLT_I18NCONTEXT_ID_GPENCIL, IDTYPE_FLAGS_ISLINKABLE }, /* rename gpencil */ + { ID_GR, "Group", "groups", BLT_I18NCONTEXT_ID_GROUP, IDTYPE_FLAGS_ISLINKABLE }, + { ID_ID, "ID", "ids", BLT_I18NCONTEXT_ID_ID, 0 }, /* plural is fake */ + { ID_IM, "Image", "images", BLT_I18NCONTEXT_ID_IMAGE, IDTYPE_FLAGS_ISLINKABLE }, { ID_IP, "Ipo", "ipos", "", IDTYPE_FLAGS_ISLINKABLE }, /* deprecated */ - { ID_KE, "Key", "shape_keys", BLF_I18NCONTEXT_ID_SHAPEKEY, 0 }, - { ID_LA, "Lamp", "lamps", BLF_I18NCONTEXT_ID_LAMP, IDTYPE_FLAGS_ISLINKABLE }, - { ID_LI, "Library", "libraries", BLF_I18NCONTEXT_ID_LIBRARY, 0 }, - { ID_LS, "FreestyleLineStyle", "linestyles", BLF_I18NCONTEXT_ID_FREESTYLELINESTYLE, IDTYPE_FLAGS_ISLINKABLE }, - { ID_LT, "Lattice", "lattices", BLF_I18NCONTEXT_ID_LATTICE, IDTYPE_FLAGS_ISLINKABLE }, - { ID_MA, "Material", "materials", BLF_I18NCONTEXT_ID_MATERIAL, IDTYPE_FLAGS_ISLINKABLE }, - { ID_MB, "Metaball", "metaballs", BLF_I18NCONTEXT_ID_METABALL, IDTYPE_FLAGS_ISLINKABLE }, - { ID_MC, "MovieClip", "movieclips", BLF_I18NCONTEXT_ID_MOVIECLIP, IDTYPE_FLAGS_ISLINKABLE }, - { ID_ME, "Mesh", "meshes", BLF_I18NCONTEXT_ID_MESH, IDTYPE_FLAGS_ISLINKABLE }, - { ID_MSK, "Mask", "masks", BLF_I18NCONTEXT_ID_MASK, IDTYPE_FLAGS_ISLINKABLE }, - { ID_NT, "NodeTree", "node_groups", BLF_I18NCONTEXT_ID_NODETREE, IDTYPE_FLAGS_ISLINKABLE }, - { ID_OB, "Object", "objects", BLF_I18NCONTEXT_ID_OBJECT, IDTYPE_FLAGS_ISLINKABLE }, - { ID_PA, "ParticleSettings", "particles", BLF_I18NCONTEXT_ID_PARTICLESETTINGS, 0 }, - { ID_PAL, "Palettes", "palettes", BLF_I18NCONTEXT_ID_PALETTE, IDTYPE_FLAGS_ISLINKABLE }, - { ID_PC, "PaintCurve", "paint_curves", BLF_I18NCONTEXT_ID_PAINTCURVE, IDTYPE_FLAGS_ISLINKABLE }, - { ID_SCE, "Scene", "scenes", BLF_I18NCONTEXT_ID_SCENE, IDTYPE_FLAGS_ISLINKABLE }, - { ID_SCR, "Screen", "screens", BLF_I18NCONTEXT_ID_SCREEN, 0 }, - { ID_SEQ, "Sequence", "sequences", BLF_I18NCONTEXT_ID_SEQUENCE, 0 }, /* not actually ID data */ - { ID_SPK, "Speaker", "speakers", BLF_I18NCONTEXT_ID_SPEAKER, IDTYPE_FLAGS_ISLINKABLE }, - { ID_SO, "Sound", "sounds", BLF_I18NCONTEXT_ID_SOUND, IDTYPE_FLAGS_ISLINKABLE }, - { ID_TE, "Texture", "textures", BLF_I18NCONTEXT_ID_TEXTURE, IDTYPE_FLAGS_ISLINKABLE }, - { ID_TXT, "Text", "texts", BLF_I18NCONTEXT_ID_TEXT, IDTYPE_FLAGS_ISLINKABLE }, - { ID_VF, "VFont", "fonts", BLF_I18NCONTEXT_ID_VFONT, IDTYPE_FLAGS_ISLINKABLE }, - { ID_WO, "World", "worlds", BLF_I18NCONTEXT_ID_WORLD, IDTYPE_FLAGS_ISLINKABLE }, - { ID_WM, "WindowManager", "window_managers", BLF_I18NCONTEXT_ID_WINDOWMANAGER, 0 }, + { ID_KE, "Key", "shape_keys", BLT_I18NCONTEXT_ID_SHAPEKEY, 0 }, + { ID_LA, "Lamp", "lamps", BLT_I18NCONTEXT_ID_LAMP, IDTYPE_FLAGS_ISLINKABLE }, + { ID_LI, "Library", "libraries", BLT_I18NCONTEXT_ID_LIBRARY, 0 }, + { ID_LS, "FreestyleLineStyle", "linestyles", BLT_I18NCONTEXT_ID_FREESTYLELINESTYLE, IDTYPE_FLAGS_ISLINKABLE }, + { ID_LT, "Lattice", "lattices", BLT_I18NCONTEXT_ID_LATTICE, IDTYPE_FLAGS_ISLINKABLE }, + { ID_MA, "Material", "materials", BLT_I18NCONTEXT_ID_MATERIAL, IDTYPE_FLAGS_ISLINKABLE }, + { ID_MB, "Metaball", "metaballs", BLT_I18NCONTEXT_ID_METABALL, IDTYPE_FLAGS_ISLINKABLE }, + { ID_MC, "MovieClip", "movieclips", BLT_I18NCONTEXT_ID_MOVIECLIP, IDTYPE_FLAGS_ISLINKABLE }, + { ID_ME, "Mesh", "meshes", BLT_I18NCONTEXT_ID_MESH, IDTYPE_FLAGS_ISLINKABLE }, + { ID_MSK, "Mask", "masks", BLT_I18NCONTEXT_ID_MASK, IDTYPE_FLAGS_ISLINKABLE }, + { ID_NT, "NodeTree", "node_groups", BLT_I18NCONTEXT_ID_NODETREE, IDTYPE_FLAGS_ISLINKABLE }, + { ID_OB, "Object", "objects", BLT_I18NCONTEXT_ID_OBJECT, IDTYPE_FLAGS_ISLINKABLE }, + { ID_PA, "ParticleSettings", "particles", BLT_I18NCONTEXT_ID_PARTICLESETTINGS, 0 }, + { ID_PAL, "Palettes", "palettes", BLT_I18NCONTEXT_ID_PALETTE, IDTYPE_FLAGS_ISLINKABLE }, + { ID_PC, "PaintCurve", "paint_curves", BLT_I18NCONTEXT_ID_PAINTCURVE, IDTYPE_FLAGS_ISLINKABLE }, + { ID_SCE, "Scene", "scenes", BLT_I18NCONTEXT_ID_SCENE, IDTYPE_FLAGS_ISLINKABLE }, + { ID_SCR, "Screen", "screens", BLT_I18NCONTEXT_ID_SCREEN, 0 }, + { ID_SEQ, "Sequence", "sequences", BLT_I18NCONTEXT_ID_SEQUENCE, 0 }, /* not actually ID data */ + { ID_SPK, "Speaker", "speakers", BLT_I18NCONTEXT_ID_SPEAKER, IDTYPE_FLAGS_ISLINKABLE }, + { ID_SO, "Sound", "sounds", BLT_I18NCONTEXT_ID_SOUND, IDTYPE_FLAGS_ISLINKABLE }, + { ID_TE, "Texture", "textures", BLT_I18NCONTEXT_ID_TEXTURE, IDTYPE_FLAGS_ISLINKABLE }, + { ID_TXT, "Text", "texts", BLT_I18NCONTEXT_ID_TEXT, IDTYPE_FLAGS_ISLINKABLE }, + { ID_VF, "VFont", "fonts", BLT_I18NCONTEXT_ID_VFONT, IDTYPE_FLAGS_ISLINKABLE }, + { ID_WO, "World", "worlds", BLT_I18NCONTEXT_ID_WORLD, IDTYPE_FLAGS_ISLINKABLE }, + { ID_WM, "WindowManager", "window_managers", BLT_I18NCONTEXT_ID_WINDOWMANAGER, 0 }, }; static IDType *idtype_from_name(const char *str) @@ -273,7 +273,7 @@ const char *BKE_idcode_to_translation_context(int code) { IDType *idt = idtype_from_code(code); BLI_assert(idt); - return idt ? idt->i18n_context : BLF_I18NCONTEXT_DEFAULT; + return idt ? idt->i18n_context : BLT_I18NCONTEXT_DEFAULT; } /** diff --git a/source/blender/blenkernel/intern/ipo.c b/source/blender/blenkernel/intern/ipo.c index 6d37f3ae006..0c3fd48628f 100644 --- a/source/blender/blenkernel/intern/ipo.c +++ b/source/blender/blenkernel/intern/ipo.c @@ -64,7 +64,7 @@ #include "BLI_dynstr.h" #include "BLI_utildefines.h" -#include "BLF_translation.h" +#include "BLT_translation.h" #include "BKE_ipo.h" #include "BKE_animsys.h" diff --git a/source/blender/blenkernel/intern/key.c b/source/blender/blenkernel/intern/key.c index 8427b17c01a..b591dc19685 100644 --- a/source/blender/blenkernel/intern/key.c +++ b/source/blender/blenkernel/intern/key.c @@ -40,7 +40,7 @@ #include "BLI_math_vector.h" #include "BLI_utildefines.h" -#include "BLF_translation.h" +#include "BLT_translation.h" #include "DNA_anim_types.h" #include "DNA_key_types.h" diff --git a/source/blender/blenkernel/intern/library.c b/source/blender/blenkernel/intern/library.c index b4bb07f0d3a..8bb2864a604 100644 --- a/source/blender/blenkernel/intern/library.c +++ b/source/blender/blenkernel/intern/library.c @@ -72,7 +72,7 @@ #include "BLI_utildefines.h" #include "BLI_threads.h" -#include "BLF_translation.h" +#include "BLT_translation.h" #include "BKE_action.h" #include "BKE_animsys.h" diff --git a/source/blender/blenkernel/intern/mask.c b/source/blender/blenkernel/intern/mask.c index dd179ff91d2..141597e859c 100644 --- a/source/blender/blenkernel/intern/mask.c +++ b/source/blender/blenkernel/intern/mask.c @@ -41,7 +41,7 @@ #include "BLI_listbase.h" #include "BLI_math.h" -#include "BLF_translation.h" +#include "BLT_translation.h" #include "DNA_mask_types.h" #include "DNA_node_types.h" diff --git a/source/blender/blenkernel/intern/modifier.c b/source/blender/blenkernel/intern/modifier.c index 1f6d40dafa3..b2c0c6d6d0a 100644 --- a/source/blender/blenkernel/intern/modifier.c +++ b/source/blender/blenkernel/intern/modifier.c @@ -54,7 +54,7 @@ #include "BLI_linklist.h" #include "BLI_string.h" -#include "BLF_translation.h" +#include "BLT_translation.h" #include "BKE_appdir.h" #include "BKE_key.h" diff --git a/source/blender/blenkernel/intern/nla.c b/source/blender/blenkernel/intern/nla.c index 037b44e0d8c..a04eb9bd611 100644 --- a/source/blender/blenkernel/intern/nla.c +++ b/source/blender/blenkernel/intern/nla.c @@ -45,7 +45,7 @@ #include "BLI_string.h" #include "BLI_ghash.h" -#include "BLF_translation.h" +#include "BLT_translation.h" #include "DNA_anim_types.h" #include "DNA_scene_types.h" diff --git a/source/blender/blenkernel/intern/node.c b/source/blender/blenkernel/intern/node.c index d91d06e9706..3bcdb93729f 100644 --- a/source/blender/blenkernel/intern/node.c +++ b/source/blender/blenkernel/intern/node.c @@ -52,7 +52,7 @@ #include "BLI_path_util.h" #include "BLI_utildefines.h" -#include "BLF_translation.h" +#include "BLT_translation.h" #include "BKE_animsys.h" #include "BKE_global.h" diff --git a/source/blender/blenkernel/intern/object.c b/source/blender/blenkernel/intern/object.c index 12346ab15c6..352999c96da 100644 --- a/source/blender/blenkernel/intern/object.c +++ b/source/blender/blenkernel/intern/object.c @@ -67,7 +67,7 @@ #include "BLI_linklist.h" #include "BLI_kdtree.h" -#include "BLF_translation.h" +#include "BLT_translation.h" #include "BKE_pbvh.h" #include "BKE_main.h" diff --git a/source/blender/blenkernel/intern/object_deform.c b/source/blender/blenkernel/intern/object_deform.c index bf668ef56b4..e823f87468d 100644 --- a/source/blender/blenkernel/intern/object_deform.c +++ b/source/blender/blenkernel/intern/object_deform.c @@ -27,7 +27,7 @@ #include "MEM_guardedalloc.h" -#include "BLF_translation.h" +#include "BLT_translation.h" #include "BLI_utildefines.h" #include "BLI_ghash.h" diff --git a/source/blender/blenkernel/intern/particle.c b/source/blender/blenkernel/intern/particle.c index 6c354c59d7a..9aacba8d02e 100644 --- a/source/blender/blenkernel/intern/particle.c +++ b/source/blender/blenkernel/intern/particle.c @@ -57,7 +57,7 @@ #include "BLI_threads.h" #include "BLI_linklist.h" -#include "BLF_translation.h" +#include "BLT_translation.h" #include "BKE_anim.h" #include "BKE_animsys.h" diff --git a/source/blender/blenkernel/intern/pointcache.c b/source/blender/blenkernel/intern/pointcache.c index c6ea9e0f4f8..9054ecc7c3f 100644 --- a/source/blender/blenkernel/intern/pointcache.c +++ b/source/blender/blenkernel/intern/pointcache.c @@ -51,7 +51,7 @@ #include "BLI_math.h" #include "BLI_utildefines.h" -#include "BLF_translation.h" +#include "BLT_translation.h" #include "PIL_time.h" diff --git a/source/blender/blenkernel/intern/report.c b/source/blender/blenkernel/intern/report.c index b2178fe69b3..3b371ce1e2f 100644 --- a/source/blender/blenkernel/intern/report.c +++ b/source/blender/blenkernel/intern/report.c @@ -38,7 +38,7 @@ #include "BLI_dynstr.h" #include "BLI_utildefines.h" -#include "BLF_translation.h" +#include "BLT_translation.h" #include "BKE_report.h" #include "BKE_global.h" /* G.background only */ diff --git a/source/blender/blenkernel/intern/scene.c b/source/blender/blenkernel/intern/scene.c index 14cb5859918..701483af43f 100644 --- a/source/blender/blenkernel/intern/scene.c +++ b/source/blender/blenkernel/intern/scene.c @@ -58,7 +58,7 @@ #include "BLI_threads.h" #include "BLI_task.h" -#include "BLF_translation.h" +#include "BLT_translation.h" #include "BKE_anim.h" #include "BKE_animsys.h" diff --git a/source/blender/blenkernel/intern/seqmodifier.c b/source/blender/blenkernel/intern/seqmodifier.c index f543a9f4c65..07242aa2f6e 100644 --- a/source/blender/blenkernel/intern/seqmodifier.c +++ b/source/blender/blenkernel/intern/seqmodifier.c @@ -39,7 +39,7 @@ #include "BLI_utildefines.h" #include "BLI_math.h" -#include "BLF_translation.h" +#include "BLT_translation.h" #include "DNA_sequence_types.h" @@ -164,7 +164,7 @@ static void colorBalance_apply(SequenceModifierData *smd, ImBuf *ibuf, ImBuf *ma } static SequenceModifierTypeInfo seqModifier_ColorBalance = { - CTX_N_(BLF_I18NCONTEXT_ID_SEQUENCE, "Color Balance"), /* name */ + CTX_N_(BLT_I18NCONTEXT_ID_SEQUENCE, "Color Balance"), /* name */ "ColorBalanceModifierData", /* struct_name */ sizeof(ColorBalanceModifierData), /* struct_size */ colorBalance_init_data, /* init_data */ @@ -273,7 +273,7 @@ static void curves_apply(struct SequenceModifierData *smd, ImBuf *ibuf, ImBuf *m } static SequenceModifierTypeInfo seqModifier_Curves = { - CTX_N_(BLF_I18NCONTEXT_ID_SEQUENCE, "Curves"), /* name */ + CTX_N_(BLT_I18NCONTEXT_ID_SEQUENCE, "Curves"), /* name */ "CurvesModifierData", /* struct_name */ sizeof(CurvesModifierData), /* struct_size */ curves_init_data, /* init_data */ @@ -381,7 +381,7 @@ static void hue_correct_apply(struct SequenceModifierData *smd, ImBuf *ibuf, ImB } static SequenceModifierTypeInfo seqModifier_HueCorrect = { - CTX_N_(BLF_I18NCONTEXT_ID_SEQUENCE, "Hue Correct"), /* name */ + CTX_N_(BLT_I18NCONTEXT_ID_SEQUENCE, "Hue Correct"), /* name */ "HueCorrectModifierData", /* struct_name */ sizeof(HueCorrectModifierData), /* struct_size */ hue_correct_init_data, /* init_data */ @@ -478,7 +478,7 @@ static void brightcontrast_apply(struct SequenceModifierData *smd, ImBuf *ibuf, } static SequenceModifierTypeInfo seqModifier_BrightContrast = { - CTX_N_(BLF_I18NCONTEXT_ID_SEQUENCE, "Bright/Contrast"), /* name */ + CTX_N_(BLT_I18NCONTEXT_ID_SEQUENCE, "Bright/Contrast"), /* name */ "BrightContrastModifierData", /* struct_name */ sizeof(BrightContrastModifierData), /* struct_size */ NULL, /* init_data */ @@ -539,7 +539,7 @@ static void maskmodifier_apply(struct SequenceModifierData *UNUSED(smd), ImBuf * } static SequenceModifierTypeInfo seqModifier_Mask = { - CTX_N_(BLF_I18NCONTEXT_ID_SEQUENCE, "Mask"), /* name */ + CTX_N_(BLT_I18NCONTEXT_ID_SEQUENCE, "Mask"), /* name */ "SequencerMaskModifierData", /* struct_name */ sizeof(SequencerMaskModifierData), /* struct_size */ NULL, /* init_data */ @@ -636,7 +636,7 @@ void BKE_sequence_modifier_unique_name(Sequence *seq, SequenceModifierData *smd) { const SequenceModifierTypeInfo *smti = BKE_sequence_modifier_type_info_get(smd->type); - BLI_uniquename(&seq->modifiers, smd, CTX_DATA_(BLF_I18NCONTEXT_ID_SEQUENCE, smti->name), '.', + BLI_uniquename(&seq->modifiers, smd, CTX_DATA_(BLT_I18NCONTEXT_ID_SEQUENCE, smti->name), '.', offsetof(SequenceModifierData, name), sizeof(smd->name)); } diff --git a/source/blender/blenkernel/intern/sequencer.c b/source/blender/blenkernel/intern/sequencer.c index 628546846ba..aa0e13124b8 100644 --- a/source/blender/blenkernel/intern/sequencer.c +++ b/source/blender/blenkernel/intern/sequencer.c @@ -59,7 +59,7 @@ # include <unistd.h> #endif -#include "BLF_translation.h" +#include "BLT_translation.h" #include "BKE_animsys.h" #include "BKE_depsgraph.h" diff --git a/source/blender/blenkernel/intern/tracking.c b/source/blender/blenkernel/intern/tracking.c index c5ccaa63992..9368e58d467 100644 --- a/source/blender/blenkernel/intern/tracking.c +++ b/source/blender/blenkernel/intern/tracking.c @@ -51,7 +51,7 @@ #include "BLI_string.h" #include "BLI_threads.h" -#include "BLF_translation.h" +#include "BLT_translation.h" #include "BKE_fcurve.h" #include "BKE_tracking.h" @@ -468,7 +468,7 @@ MovieTrackingTrack *BKE_tracking_track_duplicate(MovieTrackingTrack *track) */ void BKE_tracking_track_unique_name(ListBase *tracksbase, MovieTrackingTrack *track) { - BLI_uniquename(tracksbase, track, CTX_DATA_(BLF_I18NCONTEXT_ID_MOVIECLIP, "Track"), '.', + BLI_uniquename(tracksbase, track, CTX_DATA_(BLT_I18NCONTEXT_ID_MOVIECLIP, "Track"), '.', offsetof(MovieTrackingTrack, name), sizeof(track->name)); } @@ -1238,7 +1238,7 @@ MovieTrackingPlaneTrack *BKE_tracking_plane_track_add(MovieTracking *tracking, L void BKE_tracking_plane_track_unique_name(ListBase *plane_tracks_base, MovieTrackingPlaneTrack *plane_track) { - BLI_uniquename(plane_tracks_base, plane_track, CTX_DATA_(BLF_I18NCONTEXT_ID_MOVIECLIP, "Plane Track"), '.', + BLI_uniquename(plane_tracks_base, plane_track, CTX_DATA_(BLT_I18NCONTEXT_ID_MOVIECLIP, "Plane Track"), '.', offsetof(MovieTrackingPlaneTrack, name), sizeof(plane_track->name)); } diff --git a/source/blender/blenkernel/intern/tracking_solver.c b/source/blender/blenkernel/intern/tracking_solver.c index fbabda89f2a..c21883c6eb8 100644 --- a/source/blender/blenkernel/intern/tracking_solver.c +++ b/source/blender/blenkernel/intern/tracking_solver.c @@ -43,7 +43,7 @@ #include "BLI_listbase.h" #include "BLI_string.h" -#include "BLF_translation.h" +#include "BLT_translation.h" #include "BKE_fcurve.h" #include "BKE_tracking.h" diff --git a/source/blender/blenkernel/intern/tracking_util.c b/source/blender/blenkernel/intern/tracking_util.c index 56119b732fc..1cbfc5eb834 100644 --- a/source/blender/blenkernel/intern/tracking_util.c +++ b/source/blender/blenkernel/intern/tracking_util.c @@ -45,7 +45,7 @@ #include "BLI_path_util.h" #include "BLI_string.h" -#include "BLF_translation.h" +#include "BLT_translation.h" #include "BKE_movieclip.h" #include "BKE_tracking.h" @@ -196,7 +196,7 @@ void tracks_map_merge(TracksMap *map, MovieTracking *tracking) track->next = track->prev = NULL; BLI_addtail(&new_tracks, track); - BLI_uniquename(&new_tracks, track, CTX_DATA_(BLF_I18NCONTEXT_ID_MOVIECLIP, "Track"), '.', + BLI_uniquename(&new_tracks, track, CTX_DATA_(BLT_I18NCONTEXT_ID_MOVIECLIP, "Track"), '.', offsetof(MovieTrackingTrack, name), sizeof(track->name)); track = next; diff --git a/source/blender/blenloader/CMakeLists.txt b/source/blender/blenloader/CMakeLists.txt index 7f557d3de22..8364df38208 100644 --- a/source/blender/blenloader/CMakeLists.txt +++ b/source/blender/blenloader/CMakeLists.txt @@ -28,6 +28,7 @@ set(INC ../blenfont ../blenkernel ../blenlib + ../blentranslation ../imbuf ../makesdna ../makesrna diff --git a/source/blender/blenloader/SConscript b/source/blender/blenloader/SConscript index 31dfc71ac73..7f2a1e0723c 100644 --- a/source/blender/blenloader/SConscript +++ b/source/blender/blenloader/SConscript @@ -35,6 +35,7 @@ incs = [ '../blenfont', '../blenkernel', '../blenlib', + '../blentranslation', '../imbuf', '../makesdna', '../makesrna', diff --git a/source/blender/blenloader/intern/readfile.c b/source/blender/blenloader/intern/readfile.c index 51d25b463a3..ccb389bdcb2 100644 --- a/source/blender/blenloader/intern/readfile.c +++ b/source/blender/blenloader/intern/readfile.c @@ -109,7 +109,7 @@ #include "BLI_threads.h" #include "BLI_mempool.h" -#include "BLF_translation.h" +#include "BLT_translation.h" #include "BKE_action.h" #include "BKE_armature.h" diff --git a/source/blender/blenloader/intern/versioning_260.c b/source/blender/blenloader/intern/versioning_260.c index c66b9d1fae9..25074effaab 100644 --- a/source/blender/blenloader/intern/versioning_260.c +++ b/source/blender/blenloader/intern/versioning_260.c @@ -57,7 +57,7 @@ #include "BLI_blenlib.h" #include "BLI_math.h" -#include "BLF_translation.h" +#include "BLT_translation.h" #include "BKE_anim.h" #include "BKE_image.h" diff --git a/source/blender/blentranslation/BLT_lang.h b/source/blender/blentranslation/BLT_lang.h new file mode 100644 index 00000000000..0f9bac936c3 --- /dev/null +++ b/source/blender/blentranslation/BLT_lang.h @@ -0,0 +1,69 @@ +/* + * ***** BEGIN GPL LICENSE BLOCK ***** + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software Foundation, + * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + * + * The Original Code is Copyright (C) 2011 Blender Foundation. + * All rights reserved. + * + * + * Contributor(s): Blender Foundation, + * Sergey Sharybin + * + * ***** END GPL LICENSE BLOCK ***** + */ + +/** \file blender/blenfont/BLT_lang.h + * \ingroup blt + */ + +#ifndef __BLT_LANG_H__ +#define __BLT_LANG_H__ + +#ifdef __cplusplus +extern "C" { +#endif + +/* Search the path directory to the locale files, this try all + * the case for Linux, Win and Mac. + * Also dynamically builds locales and locales' menu from "languages" text file. + */ +void BLT_lang_init(void); + +/* Free languages and locales_menu arrays created by BLT_lang_init. */ +void BLT_lang_free(void); + +/* Set the current locale. */ +void BLT_lang_set(const char *); +/* Get the current locale ([partial] ISO code, e.g. es_ES). */ +const char *BLT_lang_get(void); + +/* Get locale's elements (if relevant pointer is not NULL and element actually exists, e.g. if there is no variant, + * *variant and *language_variant will always be NULL). + * Non-null elements are always MEM_mallocN'ed, it's the caller's responsibility to free them. + * NOTE: Always available, even in non-WITH_INTERNATIONAL builds. + */ +void BLT_lang_locale_explode( + const char *locale, char **language, char **country, char **variant, + char **language_country, char **language_variant); + +/* Get EnumPropertyItem's for translations menu. */ +struct EnumPropertyItem *BLT_lang_RNA_enum_properties(void); + +#ifdef __cplusplus +}; +#endif + +#endif /* __BLT_LANG_H__ */ diff --git a/source/blender/blentranslation/BLT_translation.h b/source/blender/blentranslation/BLT_translation.h new file mode 100644 index 00000000000..66993d79709 --- /dev/null +++ b/source/blender/blentranslation/BLT_translation.h @@ -0,0 +1,206 @@ +/* + * ***** BEGIN GPL LICENSE BLOCK ***** + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software Foundation, + * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + * + * The Original Code is Copyright (C) 2011 Blender Foundation. + * All rights reserved. + * + * + * Contributor(s): Blender Foundation, + * Sergey Sharybin + * + * ***** END GPL LICENSE BLOCK ***** + */ + +/** \file blender/blenfont/BLT_translation.h + * \ingroup blt + */ + + +#ifndef __BLT_TRANSLATION_H__ +#define __BLT_TRANSLATION_H__ + +#include "BLI_utildefines.h" /* for bool type */ + +#define TEXT_DOMAIN_NAME "blender" + +#ifdef __cplusplus +extern "C" { +#endif + +bool BLT_is_default_context(const char *msgctxt); +const char *BLT_pgettext(const char *msgctxt, const char *msgid); + +/* translation */ +bool BLT_translate(void); +bool BLT_translate_iface(void); +bool BLT_translate_tooltips(void); +bool BLT_translate_new_dataname(void); +const char *BLT_translate_do(const char *msgctxt, const char *msgid); +const char *BLT_translate_do_iface(const char *msgctxt, const char *msgid); +const char *BLT_translate_do_tooltip(const char *msgctxt, const char *msgid); +const char *BLT_translate_do_new_dataname(const char *msgctxt, const char *msgid); + + +/* The "translation-marker" macro. */ +#define N_(msgid) msgid +#define CTX_N_(context, msgid) msgid + +/* Those macros should be used everywhere in UI code. */ +#ifdef WITH_INTERNATIONAL +/*# define _(msgid) BLT_gettext(msgid) */ +# define IFACE_(msgid) BLT_translate_do_iface(NULL, msgid) +# define TIP_(msgid) BLT_translate_do_tooltip(NULL, msgid) +# define DATA_(msgid) BLT_translate_do_new_dataname(NULL, msgid) +# define CTX_IFACE_(context, msgid) BLT_translate_do_iface(context, msgid) +# define CTX_TIP_(context, msgid) BLT_translate_do_tooltip(context, msgid) +# define CTX_DATA_(context, msgid) BLT_translate_do_new_dataname(context, msgid) +#else +/*# define _(msgid) msgid */ +# define IFACE_(msgid) msgid +# define TIP_(msgid) msgid +# define DATA_(msgid) msgid +# define CTX_IFACE_(context, msgid) msgid +# define CTX_TIP_(context, msgid) msgid +# define CTX_DATA_(context, msgid) msgid +#endif + +/* Helper macro, when we want to define a same msgid for multiple msgctxt... + * Does nothing in C, but is "parsed" by our i18n py tools. + * XXX Currently limited to at most 16 contexts at once + * (but you can call it several times with the same msgid, should you need more contexts!). + */ +#define BLT_I18N_MSGID_MULTI_CTXT(msgid, ...) + +/****************************************************************************** + * All i18n contexts must be defined here. + * This is a nice way to be sure not to use a context twice for different + * things, and limit the number of existing contexts! + * WARNING! Contexts should not be longer than BKE_ST_MAXNAME - 1! + */ + +/* Default, void context. + * WARNING! The "" context is not the same as no (NULL) context at mo/boost::locale level! + * NOTE: We translate BLT_I18NCONTEXT_DEFAULT as BLT_I18NCONTEXT_DEFAULT_BPY in Python, as we can't use "natural" + * None value in rna string properties... :/ + * The void string "" is also interpreted as BLT_I18NCONTEXT_DEFAULT. + * For perf reason, we only use the first char to detect this context, so other contexts should never start + * with the same char! + */ +#define BLT_I18NCONTEXT_DEFAULT NULL +#define BLT_I18NCONTEXT_DEFAULT_BPYRNA "*" + +/* Default context for operator names/labels. */ +#define BLT_I18NCONTEXT_OPERATOR_DEFAULT "Operator" + +/* Mark the msgid applies to several elements (needed in some cases, as english adjectives have no plural mark. :( */ +#define BLT_I18NCONTEXT_PLURAL "Plural" + +/* ID-types contexts. */ +/* WARNING! Keep it in sync with idtypes in blenkernel/intern/idcode.c */ +#define BLT_I18NCONTEXT_ID_ACTION "Action" +#define BLT_I18NCONTEXT_ID_ARMATURE "Armature" +#define BLT_I18NCONTEXT_ID_BRUSH "Brush" +#define BLT_I18NCONTEXT_ID_CAMERA "Camera" +#define BLT_I18NCONTEXT_ID_CURVE "Curve" +#define BLT_I18NCONTEXT_ID_FREESTYLELINESTYLE "FreestyleLineStyle" +#define BLT_I18NCONTEXT_ID_GPENCIL "GPencil" +#define BLT_I18NCONTEXT_ID_GROUP "Group" +#define BLT_I18NCONTEXT_ID_ID "ID" +#define BLT_I18NCONTEXT_ID_IMAGE "Image" +/*#define BLT_I18NCONTEXT_ID_IPO "Ipo"*/ /* Deprecated */ +#define BLT_I18NCONTEXT_ID_SHAPEKEY "Key" +#define BLT_I18NCONTEXT_ID_LAMP "Lamp" +#define BLT_I18NCONTEXT_ID_LIBRARY "Library" +#define BLT_I18NCONTEXT_ID_LATTICE "Lattice" +#define BLT_I18NCONTEXT_ID_MATERIAL "Material" +#define BLT_I18NCONTEXT_ID_METABALL "Metaball" +#define BLT_I18NCONTEXT_ID_MESH "Mesh" +#define BLT_I18NCONTEXT_ID_NODETREE "NodeTree" +#define BLT_I18NCONTEXT_ID_OBJECT "Object" +#define BLT_I18NCONTEXT_ID_PAINTCURVE "PaintCurve" +#define BLT_I18NCONTEXT_ID_PALETTE "Palette" +#define BLT_I18NCONTEXT_ID_PARTICLESETTINGS "ParticleSettings" +#define BLT_I18NCONTEXT_ID_SCENE "Scene" +#define BLT_I18NCONTEXT_ID_SCREEN "Screen" +#define BLT_I18NCONTEXT_ID_SEQUENCE "Sequence" +#define BLT_I18NCONTEXT_ID_SPEAKER "Speaker" +#define BLT_I18NCONTEXT_ID_SOUND "Sound" +#define BLT_I18NCONTEXT_ID_TEXTURE "Texture" +#define BLT_I18NCONTEXT_ID_TEXT "Text" +#define BLT_I18NCONTEXT_ID_VFONT "VFont" +#define BLT_I18NCONTEXT_ID_WORLD "World" +#define BLT_I18NCONTEXT_ID_WINDOWMANAGER "WindowManager" +#define BLT_I18NCONTEXT_ID_MOVIECLIP "MovieClip" +#define BLT_I18NCONTEXT_ID_MASK "Mask" + +/* Helper for bpy.app.i18n object... */ +typedef struct { + const char *c_id; + const char *py_id; + const char *value; +} BLT_i18n_contexts_descriptor; + +#define BLT_I18NCONTEXTS_ITEM(ctxt_id, py_id) {#ctxt_id, py_id, ctxt_id} + +#define BLT_I18NCONTEXTS_DESC { \ + BLT_I18NCONTEXTS_ITEM(BLT_I18NCONTEXT_DEFAULT, "default_real"), \ + BLT_I18NCONTEXTS_ITEM(BLT_I18NCONTEXT_DEFAULT_BPYRNA, "default"), \ + BLT_I18NCONTEXTS_ITEM(BLT_I18NCONTEXT_OPERATOR_DEFAULT, "operator_default"), \ + BLT_I18NCONTEXTS_ITEM(BLT_I18NCONTEXT_PLURAL, "plural"), \ + BLT_I18NCONTEXTS_ITEM(BLT_I18NCONTEXT_ID_ACTION, "id_action"), \ + BLT_I18NCONTEXTS_ITEM(BLT_I18NCONTEXT_ID_ARMATURE, "id_armature"), \ + BLT_I18NCONTEXTS_ITEM(BLT_I18NCONTEXT_ID_BRUSH, "id_brush"), \ + BLT_I18NCONTEXTS_ITEM(BLT_I18NCONTEXT_ID_CAMERA, "id_camera"), \ + BLT_I18NCONTEXTS_ITEM(BLT_I18NCONTEXT_ID_CURVE, "id_curve"), \ + BLT_I18NCONTEXTS_ITEM(BLT_I18NCONTEXT_ID_FREESTYLELINESTYLE, "id_fs_linestyle"), \ + BLT_I18NCONTEXTS_ITEM(BLT_I18NCONTEXT_ID_GPENCIL, "id_gpencil"), \ + BLT_I18NCONTEXTS_ITEM(BLT_I18NCONTEXT_ID_GROUP, "id_group"), \ + BLT_I18NCONTEXTS_ITEM(BLT_I18NCONTEXT_ID_ID, "id_id"), \ + BLT_I18NCONTEXTS_ITEM(BLT_I18NCONTEXT_ID_IMAGE, "id_image"), \ + /*BLT_I18NCONTEXTS_ITEM(BLT_I18NCONTEXT_ID_IPO, "id_ipo"),*/ \ + BLT_I18NCONTEXTS_ITEM(BLT_I18NCONTEXT_ID_SHAPEKEY, "id_shapekey"), \ + BLT_I18NCONTEXTS_ITEM(BLT_I18NCONTEXT_ID_LAMP, "id_lamp"), \ + BLT_I18NCONTEXTS_ITEM(BLT_I18NCONTEXT_ID_LIBRARY, "id_library"), \ + BLT_I18NCONTEXTS_ITEM(BLT_I18NCONTEXT_ID_LATTICE, "id_lattice"), \ + BLT_I18NCONTEXTS_ITEM(BLT_I18NCONTEXT_ID_MASK, "id_mask"), \ + BLT_I18NCONTEXTS_ITEM(BLT_I18NCONTEXT_ID_MATERIAL, "id_material"), \ + BLT_I18NCONTEXTS_ITEM(BLT_I18NCONTEXT_ID_METABALL, "id_metaball"), \ + BLT_I18NCONTEXTS_ITEM(BLT_I18NCONTEXT_ID_MESH, "id_mesh"), \ + BLT_I18NCONTEXTS_ITEM(BLT_I18NCONTEXT_ID_MOVIECLIP, "id_movieclip"), \ + BLT_I18NCONTEXTS_ITEM(BLT_I18NCONTEXT_ID_NODETREE, "id_nodetree"), \ + BLT_I18NCONTEXTS_ITEM(BLT_I18NCONTEXT_ID_OBJECT, "id_object"), \ + BLT_I18NCONTEXTS_ITEM(BLT_I18NCONTEXT_ID_PAINTCURVE, "id_paintcurve"), \ + BLT_I18NCONTEXTS_ITEM(BLT_I18NCONTEXT_ID_PALETTE, "id_palette"), \ + BLT_I18NCONTEXTS_ITEM(BLT_I18NCONTEXT_ID_PARTICLESETTINGS, "id_particlesettings"), \ + BLT_I18NCONTEXTS_ITEM(BLT_I18NCONTEXT_ID_SCENE, "id_scene"), \ + BLT_I18NCONTEXTS_ITEM(BLT_I18NCONTEXT_ID_SCREEN, "id_screen"), \ + BLT_I18NCONTEXTS_ITEM(BLT_I18NCONTEXT_ID_SEQUENCE, "id_sequence"), \ + BLT_I18NCONTEXTS_ITEM(BLT_I18NCONTEXT_ID_SPEAKER, "id_speaker"), \ + BLT_I18NCONTEXTS_ITEM(BLT_I18NCONTEXT_ID_SOUND, "id_sound"), \ + BLT_I18NCONTEXTS_ITEM(BLT_I18NCONTEXT_ID_TEXTURE, "id_texture"), \ + BLT_I18NCONTEXTS_ITEM(BLT_I18NCONTEXT_ID_TEXT, "id_text"), \ + BLT_I18NCONTEXTS_ITEM(BLT_I18NCONTEXT_ID_VFONT, "id_vfont"), \ + BLT_I18NCONTEXTS_ITEM(BLT_I18NCONTEXT_ID_WORLD, "id_world"), \ + BLT_I18NCONTEXTS_ITEM(BLT_I18NCONTEXT_ID_WINDOWMANAGER, "id_windowmanager"), \ + {NULL, NULL, NULL} \ +} + +#ifdef __cplusplus +}; +#endif + +#endif /* __BLT_TRANSLATION_H__ */ diff --git a/source/blender/blentranslation/CMakeLists.txt b/source/blender/blentranslation/CMakeLists.txt new file mode 100644 index 00000000000..59bd7f0adfa --- /dev/null +++ b/source/blender/blentranslation/CMakeLists.txt @@ -0,0 +1,56 @@ +# ***** BEGIN GPL LICENSE BLOCK ***** +# +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License +# as published by the Free Software Foundation; either version 2 +# of the License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software Foundation, +# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. +# +# The Original Code is Copyright (C) 2008, Blender Foundation +# All rights reserved. +# +# The Original Code is: all of this file. +# +# ***** END GPL LICENSE BLOCK ***** + +set(INC + . + ../blenkernel + ../blenlib + ../makesdna + ../makesrna + ../../../intern/guardedalloc + ../../../intern/locale +) + +set(INC_SYS +) + +set(SRC + intern/blt_lang.c + intern/blt_translation.c + + BLT_lang.h + BLT_translation.h +) + +if(WITH_INTERNATIONAL) + add_definitions(-DWITH_INTERNATIONAL) +endif() + +if(WITH_PYTHON) + add_definitions(-DWITH_PYTHON) + list(APPEND INC + ../python + ) +endif() + +blender_add_lib(bf_blentranslation "${SRC}" "${INC}" "${INC_SYS}") diff --git a/source/blender/blentranslation/SConscript b/source/blender/blentranslation/SConscript new file mode 100644 index 00000000000..c7e9853618c --- /dev/null +++ b/source/blender/blentranslation/SConscript @@ -0,0 +1,46 @@ +#!/usr/bin/env python +# +# ***** BEGIN GPL LICENSE BLOCK ***** +# +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License +# as published by the Free Software Foundation; either version 2 +# of the License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software Foundation, +# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. +# +# ***** END GPL LICENSE BLOCK ***** + +import sys +Import ('env') + +sources = env.Glob('intern/*.c') + +incs = [ + '.', + '#/intern/guardedalloc', + '#/intern/locale', + '../blenkernel', + '../blenlib', + '../blentranslation', + '../makesdna', + '../makesrna', + ] + +defs = [] + +if env['WITH_BF_INTERNATIONAL']: + defs.append('WITH_INTERNATIONAL') + +if env['WITH_BF_PYTHON']: + defs.append('WITH_PYTHON') + incs.append('../python') + +env.BlenderLib('bf_blentranslation', sources, incs, defines=defs, libtype=['core', 'player'], priority=[211, 211]) diff --git a/source/blender/blenfont/intern/blf_lang.c b/source/blender/blentranslation/intern/blt_lang.c index 4683081a1ed..a0e1fe67268 100644 --- a/source/blender/blenfont/intern/blf_lang.c +++ b/source/blender/blentranslation/intern/blt_lang.c @@ -23,8 +23,8 @@ * ***** END GPL LICENSE BLOCK ***** */ -/** \file blender/blenfont/intern/blf_lang.c - * \ingroup blf +/** \file blender/blenfont/intern/blt_lang.c + * \ingroup blt * * Main internationalization functions to set the locale and query available languages. */ @@ -39,7 +39,8 @@ #include "RNA_types.h" -#include "BLF_translation.h" /* own include */ +#include "BLT_translation.h" +#include "BLT_lang.h" /* own include */ #include "BLI_fileops.h" #include "BLI_linklist.h" @@ -180,7 +181,7 @@ static void fill_locales(void) } #endif /* WITH_INTERNATIONAL */ -EnumPropertyItem *BLF_RNA_lang_enum_properties(void) +EnumPropertyItem *BLT_lang_RNA_enum_properties(void) { #ifdef WITH_INTERNATIONAL return locales_menu; @@ -189,7 +190,7 @@ EnumPropertyItem *BLF_RNA_lang_enum_properties(void) #endif } -void BLF_lang_init(void) +void BLT_lang_init(void) { #ifdef WITH_INTERNATIONAL const char * const messagepath = BKE_appdir_folder_id(BLENDER_DATAFILES, "locale"); @@ -234,7 +235,7 @@ void BLF_lang_init(void) #endif } -void BLF_lang_free(void) +void BLT_lang_free(void) { #ifdef WITH_INTERNATIONAL free_locales(); @@ -247,7 +248,7 @@ void BLF_lang_free(void) # define LOCALE(_id) (locales ? locales[(_id)] : "") #endif -void BLF_lang_set(const char *str) +void BLT_lang_set(const char *str) { #ifdef WITH_INTERNATIONAL int ulang = ULANGUAGE; @@ -281,10 +282,10 @@ void BLF_lang_set(const char *str) } /* Get the current locale (short code, e.g. es_ES). */ -const char *BLF_lang_get(void) +const char *BLT_lang_get(void) { #ifdef WITH_INTERNATIONAL - if (BLF_translate()) { + if (BLT_translate()) { const char *locale = LOCALE(ULANGUAGE); if (locale[0] == '\0') { /* Default locale, we have to find which one we are actually using! */ @@ -306,8 +307,9 @@ const char *BLF_lang_get(void) * Non-null elements are always MEM_mallocN'ed, it's the caller's responsibility to free them. * NOTE: Keep that one always available, you never know, may become useful even in no-WITH_INTERNATIONAL context... */ -void BLF_locale_explode(const char *locale, char **language, char **country, char **variant, - char **language_country, char **language_variant) +void BLT_lang_locale_explode( + const char *locale, char **language, char **country, char **variant, + char **language_country, char **language_variant) { char *m1, *m2, *_t = NULL; diff --git a/source/blender/blenfont/intern/blf_translation.c b/source/blender/blentranslation/intern/blt_translation.c index 5d828d9b7be..2651fbbe1f0 100644 --- a/source/blender/blenfont/intern/blf_translation.c +++ b/source/blender/blentranslation/intern/blt_translation.c @@ -24,8 +24,8 @@ * ***** END GPL LICENSE BLOCK ***** */ -/** \file blender/blenfont/intern/blf_translation.c - * \ingroup blf +/** \file blender/blenfont/intern/blt_translation.c + * \ingroup blt * * Manages translation files and provides translation functions. * (which are optional and can be disabled as a preference). @@ -34,7 +34,7 @@ #include <stdlib.h> #include <string.h> -#include "BLF_translation.h" +#include "BLT_translation.h" #include "MEM_guardedalloc.h" @@ -42,8 +42,6 @@ #include "BLI_path_util.h" #include "BLI_string.h" -#include "BKE_appdir.h" - #include "DNA_userdef_types.h" /* For user settings. */ #ifdef WITH_PYTHON @@ -51,104 +49,26 @@ #endif #ifdef WITH_INTERNATIONAL - #include "boost_locale_wrapper.h" - -static const char unifont_filename[] = "droidsans.ttf.gz"; -static unsigned char *unifont_ttf = NULL; -static int unifont_size = 0; -static const char unifont_mono_filename[] = "bmonofont-i18n.ttf.gz"; -static unsigned char *unifont_mono_ttf = NULL; -static int unifont_mono_size = 0; #endif /* WITH_INTERNATIONAL */ -unsigned char *BLF_get_unifont(int *r_unifont_size) -{ -#ifdef WITH_INTERNATIONAL - if (unifont_ttf == NULL) { - const char * const fontpath = BKE_appdir_folder_id(BLENDER_DATAFILES, "fonts"); - if (fontpath) { - char unifont_path[1024]; - - BLI_snprintf(unifont_path, sizeof(unifont_path), "%s/%s", fontpath, unifont_filename); - - unifont_ttf = (unsigned char *)BLI_file_ungzip_to_mem(unifont_path, &unifont_size); - } - else { - printf("%s: 'fonts' data path not found for international font, continuing\n", __func__); - } - } - - *r_unifont_size = unifont_size; - - return unifont_ttf; -#else - (void)r_unifont_size; - return NULL; -#endif -} - -void BLF_free_unifont(void) -{ -#ifdef WITH_INTERNATIONAL - if (unifont_ttf) - MEM_freeN(unifont_ttf); -#else -#endif -} - -unsigned char *BLF_get_unifont_mono(int *r_unifont_size) -{ -#ifdef WITH_INTERNATIONAL - if (unifont_mono_ttf == NULL) { - const char *fontpath = BKE_appdir_folder_id(BLENDER_DATAFILES, "fonts"); - if (fontpath) { - char unifont_path[1024]; - - BLI_snprintf(unifont_path, sizeof(unifont_path), "%s/%s", fontpath, unifont_mono_filename); - - unifont_mono_ttf = (unsigned char *)BLI_file_ungzip_to_mem(unifont_path, &unifont_mono_size); - } - else { - printf("%s: 'fonts' data path not found for international monospace font, continuing\n", __func__); - } - } - - *r_unifont_size = unifont_mono_size; - - return unifont_mono_ttf; -#else - (void)r_unifont_size; - return NULL; -#endif -} - -void BLF_free_unifont_mono(void) -{ -#ifdef WITH_INTERNATIONAL - if (unifont_mono_ttf) - MEM_freeN(unifont_mono_ttf); -#else -#endif -} - -bool BLF_is_default_context(const char *msgctxt) +bool BLT_is_default_context(const char *msgctxt) { /* We use the "short" test, a more complete one could be: - * return (!msgctxt || !msgctxt[0] || STREQ(msgctxt, BLF_I18NCONTEXT_DEFAULT_BPYRNA)) + * return (!msgctxt || !msgctxt[0] || STREQ(msgctxt, BLT_I18NCONTEXT_DEFAULT_BPYRNA)) */ /* Note: trying without the void string check for now, it *should* not be necessary... */ - return (!msgctxt || msgctxt[0] == BLF_I18NCONTEXT_DEFAULT_BPYRNA[0]); + return (!msgctxt || msgctxt[0] == BLT_I18NCONTEXT_DEFAULT_BPYRNA[0]); } -const char *BLF_pgettext(const char *msgctxt, const char *msgid) +const char *BLT_pgettext(const char *msgctxt, const char *msgid) { #ifdef WITH_INTERNATIONAL const char *ret = msgid; if (msgid && msgid[0]) { - if (BLF_is_default_context(msgctxt)) { - msgctxt = BLF_I18NCONTEXT_DEFAULT; + if (BLT_is_default_context(msgctxt)) { + msgctxt = BLT_I18NCONTEXT_DEFAULT; } ret = bl_locale_pgettext(msgctxt, msgid); /* We assume if the returned string is the same (memory level) as the msgid, no translation was found, @@ -168,7 +88,7 @@ const char *BLF_pgettext(const char *msgctxt, const char *msgid) #endif } -bool BLF_translate(void) +bool BLT_translate(void) { #ifdef WITH_INTERNATIONAL return (U.transopts & USER_DOTRANSLATE) != 0; @@ -177,7 +97,7 @@ bool BLF_translate(void) #endif } -bool BLF_translate_iface(void) +bool BLT_translate_iface(void) { #ifdef WITH_INTERNATIONAL return (U.transopts & USER_DOTRANSLATE) && (U.transopts & USER_TR_IFACE); @@ -186,7 +106,7 @@ bool BLF_translate_iface(void) #endif } -bool BLF_translate_tooltips(void) +bool BLT_translate_tooltips(void) { #ifdef WITH_INTERNATIONAL return (U.transopts & USER_DOTRANSLATE) && (U.transopts & USER_TR_TOOLTIPS); @@ -195,7 +115,7 @@ bool BLF_translate_tooltips(void) #endif } -bool BLF_translate_new_dataname(void) +bool BLT_translate_new_dataname(void) { #ifdef WITH_INTERNATIONAL return (U.transopts & USER_DOTRANSLATE) && (U.transopts & USER_TR_NEWDATANAME); @@ -204,11 +124,11 @@ bool BLF_translate_new_dataname(void) #endif } -const char *BLF_translate_do(const char *msgctxt, const char *msgid) +const char *BLT_translate_do(const char *msgctxt, const char *msgid) { #ifdef WITH_INTERNATIONAL - if (BLF_translate()) { - return BLF_pgettext(msgctxt, msgid); + if (BLT_translate()) { + return BLT_pgettext(msgctxt, msgid); } else { return msgid; @@ -219,11 +139,11 @@ const char *BLF_translate_do(const char *msgctxt, const char *msgid) #endif } -const char *BLF_translate_do_iface(const char *msgctxt, const char *msgid) +const char *BLT_translate_do_iface(const char *msgctxt, const char *msgid) { #ifdef WITH_INTERNATIONAL - if (BLF_translate_iface()) { - return BLF_pgettext(msgctxt, msgid); + if (BLT_translate_iface()) { + return BLT_pgettext(msgctxt, msgid); } else { return msgid; @@ -234,11 +154,11 @@ const char *BLF_translate_do_iface(const char *msgctxt, const char *msgid) #endif } -const char *BLF_translate_do_tooltip(const char *msgctxt, const char *msgid) +const char *BLT_translate_do_tooltip(const char *msgctxt, const char *msgid) { #ifdef WITH_INTERNATIONAL - if (BLF_translate_tooltips()) { - return BLF_pgettext(msgctxt, msgid); + if (BLT_translate_tooltips()) { + return BLT_pgettext(msgctxt, msgid); } else { return msgid; @@ -249,11 +169,11 @@ const char *BLF_translate_do_tooltip(const char *msgctxt, const char *msgid) #endif } -const char *BLF_translate_do_new_dataname(const char *msgctxt, const char *msgid) +const char *BLT_translate_do_new_dataname(const char *msgctxt, const char *msgid) { #ifdef WITH_INTERNATIONAL - if (BLF_translate_new_dataname()) { - return BLF_pgettext(msgctxt, msgid); + if (BLT_translate_new_dataname()) { + return BLT_pgettext(msgctxt, msgid); } else { return msgid; diff --git a/source/blender/bmesh/CMakeLists.txt b/source/blender/bmesh/CMakeLists.txt index 66ee184a5bc..257768b0ac8 100644 --- a/source/blender/bmesh/CMakeLists.txt +++ b/source/blender/bmesh/CMakeLists.txt @@ -25,9 +25,9 @@ set(INC . - ../blenfont ../blenkernel ../blenlib + ../blentranslation ../makesdna ../../../intern/guardedalloc ../../../extern/rangetree diff --git a/source/blender/bmesh/SConscript b/source/blender/bmesh/SConscript index de839f7f6a6..c53974be1a7 100644 --- a/source/blender/bmesh/SConscript +++ b/source/blender/bmesh/SConscript @@ -35,8 +35,8 @@ sources += env.Glob('tools/*.c') incs = [ './', - '../blenfont', '../blenlib', + '../blentranslation', '../makesdna', '../blenkernel', '#/intern/guardedalloc', diff --git a/source/blender/bmesh/intern/bmesh_core.c b/source/blender/bmesh/intern/bmesh_core.c index 4c09a35bdd1..5bb418a5102 100644 --- a/source/blender/bmesh/intern/bmesh_core.c +++ b/source/blender/bmesh/intern/bmesh_core.c @@ -34,7 +34,7 @@ #include "BLI_linklist_stack.h" #include "BLI_stackdefines.h" -#include "BLF_translation.h" +#include "BLT_translation.h" #include "BKE_DerivedMesh.h" diff --git a/source/blender/bmesh/intern/bmesh_operators.c b/source/blender/bmesh/intern/bmesh_operators.c index dda1f2fe30a..e65f3e38900 100644 --- a/source/blender/bmesh/intern/bmesh_operators.c +++ b/source/blender/bmesh/intern/bmesh_operators.c @@ -35,7 +35,7 @@ #include "BLI_mempool.h" #include "BLI_listbase.h" -#include "BLF_translation.h" +#include "BLT_translation.h" #include "bmesh.h" #include "intern/bmesh_private.h" diff --git a/source/blender/collada/AnimationImporter.cpp b/source/blender/collada/AnimationImporter.cpp index 7e937e42787..e5f7bb2eb89 100644 --- a/source/blender/collada/AnimationImporter.cpp +++ b/source/blender/collada/AnimationImporter.cpp @@ -38,7 +38,7 @@ #include "BLI_path_util.h" #include "BLI_string.h" -#include "BLF_translation.h" +#include "BLT_translation.h" #include "BKE_action.h" #include "BKE_armature.h" @@ -219,7 +219,7 @@ void AnimationImporter::add_fcurves_to_object(Object *ob, std::vector<FCurve *>& BLI_strncpy(grp->name, bone_name, sizeof(grp->name)); BLI_addtail(&act->groups, grp); - BLI_uniquename(&act->groups, grp, CTX_DATA_(BLF_I18NCONTEXT_ID_ACTION, "Group"), '.', + BLI_uniquename(&act->groups, grp, CTX_DATA_(BLT_I18NCONTEXT_ID_ACTION, "Group"), '.', offsetof(bActionGroup, name), 64); } @@ -1994,7 +1994,7 @@ void AnimationImporter::add_bone_fcurve(Object *ob, COLLADAFW::Node *node, FCurv BLI_strncpy(grp->name, bone_name, sizeof(grp->name)); BLI_addtail(&act->groups, grp); - BLI_uniquename(&act->groups, grp, CTX_DATA_(BLF_I18NCONTEXT_ID_ACTION, "Group"), '.', + BLI_uniquename(&act->groups, grp, CTX_DATA_(BLT_I18NCONTEXT_ID_ACTION, "Group"), '.', offsetof(bActionGroup, name), 64); } diff --git a/source/blender/collada/CMakeLists.txt b/source/blender/collada/CMakeLists.txt index 24daa41201d..293049a1a05 100644 --- a/source/blender/collada/CMakeLists.txt +++ b/source/blender/collada/CMakeLists.txt @@ -29,7 +29,7 @@ set(INC . ../blenkernel ../blenlib - ../blenfont + ../blentranslation ../editors/include ../makesdna ../makesrna diff --git a/source/blender/collada/SConscript b/source/blender/collada/SConscript index 1bd3947ff49..7853769a0f8 100644 --- a/source/blender/collada/SConscript +++ b/source/blender/collada/SConscript @@ -36,8 +36,8 @@ incs = [ '../ikplugin', '#/intern/iksolver/extern', '../blenlib', - '../blenfont', '../blenkernel', + '../blentranslation', '../windowmanager', '../makesdna', '../makesrna', diff --git a/source/blender/editors/animation/CMakeLists.txt b/source/blender/editors/animation/CMakeLists.txt index b9f50a6cdf1..473b0e6bc5a 100644 --- a/source/blender/editors/animation/CMakeLists.txt +++ b/source/blender/editors/animation/CMakeLists.txt @@ -20,9 +20,9 @@ set(INC ../include - ../../blenfont ../../blenkernel ../../blenlib + ../../blentranslation ../../gpu ../../makesdna ../../makesrna diff --git a/source/blender/editors/animation/SConscript b/source/blender/editors/animation/SConscript index 11eea4dc4f2..fb5ff53cf16 100644 --- a/source/blender/editors/animation/SConscript +++ b/source/blender/editors/animation/SConscript @@ -34,9 +34,9 @@ incs = [ env['BF_GLEW_INC'], '#/intern/glew-mx', '../include', - '../../blenfont', '../../blenkernel', '../../blenlib', + '../../blentranslation', '../../gpu', '../../makesdna', '../../makesrna', diff --git a/source/blender/editors/animation/anim_channels_defines.c b/source/blender/editors/animation/anim_channels_defines.c index acc3c9c2a33..6979850c21a 100644 --- a/source/blender/editors/animation/anim_channels_defines.c +++ b/source/blender/editors/animation/anim_channels_defines.c @@ -36,7 +36,7 @@ #include "BLI_math.h" #include "BLI_utildefines.h" -#include "BLF_translation.h" +#include "BLT_translation.h" #include "DNA_anim_types.h" #include "DNA_armature_types.h" diff --git a/source/blender/editors/animation/anim_ipo_utils.c b/source/blender/editors/animation/anim_ipo_utils.c index 57df6d32f03..ae6894ac546 100644 --- a/source/blender/editors/animation/anim_ipo_utils.c +++ b/source/blender/editors/animation/anim_ipo_utils.c @@ -42,7 +42,7 @@ #include "BLI_math.h" #include "BLI_utildefines.h" -#include "BLF_translation.h" +#include "BLT_translation.h" #include "DNA_anim_types.h" diff --git a/source/blender/editors/animation/fmodifier_ui.c b/source/blender/editors/animation/fmodifier_ui.c index 2c0018b000d..91705d63286 100644 --- a/source/blender/editors/animation/fmodifier_ui.c +++ b/source/blender/editors/animation/fmodifier_ui.c @@ -45,7 +45,7 @@ #include "MEM_guardedalloc.h" -#include "BLF_translation.h" +#include "BLT_translation.h" #include "BLI_blenlib.h" #include "BLI_utildefines.h" diff --git a/source/blender/editors/animation/keyframing.c b/source/blender/editors/animation/keyframing.c index 46997f96dc7..479b4272755 100644 --- a/source/blender/editors/animation/keyframing.c +++ b/source/blender/editors/animation/keyframing.c @@ -42,7 +42,7 @@ #include "BLI_math.h" #include "BLI_utildefines.h" -#include "BLF_translation.h" +#include "BLT_translation.h" #include "DNA_anim_types.h" #include "DNA_armature_types.h" diff --git a/source/blender/editors/armature/CMakeLists.txt b/source/blender/editors/armature/CMakeLists.txt index fc211f0e60b..1ed70b3cd98 100644 --- a/source/blender/editors/armature/CMakeLists.txt +++ b/source/blender/editors/armature/CMakeLists.txt @@ -20,9 +20,9 @@ set(INC ../include - ../../blenfont ../../blenkernel ../../blenlib + ../../blentranslation ../../gpu ../../makesdna ../../makesrna diff --git a/source/blender/editors/armature/SConscript b/source/blender/editors/armature/SConscript index 8249dc00c17..9c3959ecb5b 100644 --- a/source/blender/editors/armature/SConscript +++ b/source/blender/editors/armature/SConscript @@ -35,9 +35,9 @@ incs = [ '#/intern/glew-mx', '#/intern/opennl/extern', '../include', - '../../blenfont', '../../blenkernel', '../../blenlib', + '../../blentranslation', '../../gpu', '../../makesdna', '../../makesrna', diff --git a/source/blender/editors/armature/armature_edit.c b/source/blender/editors/armature/armature_edit.c index 1b9a09bd2c5..5a0e70dc5dd 100644 --- a/source/blender/editors/armature/armature_edit.c +++ b/source/blender/editors/armature/armature_edit.c @@ -38,7 +38,7 @@ #include "MEM_guardedalloc.h" -#include "BLF_translation.h" +#include "BLT_translation.h" #include "BLI_blenlib.h" #include "BLI_math.h" diff --git a/source/blender/editors/armature/armature_naming.c b/source/blender/editors/armature/armature_naming.c index eedff896315..56dbdb3a639 100644 --- a/source/blender/editors/armature/armature_naming.c +++ b/source/blender/editors/armature/armature_naming.c @@ -38,7 +38,7 @@ #include "BLI_blenlib.h" #include "BLI_ghash.h" -#include "BLF_translation.h" +#include "BLT_translation.h" #include "BKE_animsys.h" #include "BKE_action.h" diff --git a/source/blender/editors/armature/armature_relations.c b/source/blender/editors/armature/armature_relations.c index 8cda6f6db77..1c342657eec 100644 --- a/source/blender/editors/armature/armature_relations.c +++ b/source/blender/editors/armature/armature_relations.c @@ -41,7 +41,7 @@ #include "BLI_ghash.h" #include "BLI_math.h" -#include "BLF_translation.h" +#include "BLT_translation.h" #include "BKE_action.h" #include "BKE_animsys.h" @@ -813,7 +813,7 @@ static int armature_parent_set_exec(bContext *C, wmOperator *op) static int armature_parent_set_invoke(bContext *C, wmOperator *UNUSED(op), const wmEvent *UNUSED(event)) { EditBone *actbone = CTX_data_active_bone(C); - uiPopupMenu *pup = UI_popup_menu_begin(C, CTX_IFACE_(BLF_I18NCONTEXT_OPERATOR_DEFAULT, "Make Parent"), ICON_NONE); + uiPopupMenu *pup = UI_popup_menu_begin(C, CTX_IFACE_(BLT_I18NCONTEXT_OPERATOR_DEFAULT, "Make Parent"), ICON_NONE); uiLayout *layout = UI_popup_menu_layout(pup); int allchildbones = 0; diff --git a/source/blender/editors/armature/meshlaplacian.c b/source/blender/editors/armature/meshlaplacian.c index 66490dabba5..543874b44d0 100644 --- a/source/blender/editors/armature/meshlaplacian.c +++ b/source/blender/editors/armature/meshlaplacian.c @@ -37,7 +37,7 @@ #include "BLI_string.h" #include "BLI_alloca.h" -#include "BLF_translation.h" +#include "BLT_translation.h" #include "BKE_DerivedMesh.h" #include "BKE_modifier.h" diff --git a/source/blender/editors/armature/pose_lib.c b/source/blender/editors/armature/pose_lib.c index 3ced37dcfb2..31e6c8c2bb8 100644 --- a/source/blender/editors/armature/pose_lib.c +++ b/source/blender/editors/armature/pose_lib.c @@ -35,7 +35,7 @@ #include "BLI_blenlib.h" #include "BLI_dlrbTree.h" -#include "BLF_translation.h" +#include "BLT_translation.h" #include "DNA_anim_types.h" #include "DNA_armature_types.h" diff --git a/source/blender/editors/curve/CMakeLists.txt b/source/blender/editors/curve/CMakeLists.txt index 66c281df5fa..83346e9550c 100644 --- a/source/blender/editors/curve/CMakeLists.txt +++ b/source/blender/editors/curve/CMakeLists.txt @@ -20,9 +20,9 @@ set(INC ../include - ../../blenfont ../../blenkernel ../../blenlib + ../../blentranslation ../../makesdna ../../makesrna ../../windowmanager diff --git a/source/blender/editors/curve/SConscript b/source/blender/editors/curve/SConscript index 4760a212a8a..eadec4f65b6 100644 --- a/source/blender/editors/curve/SConscript +++ b/source/blender/editors/curve/SConscript @@ -34,9 +34,9 @@ defs = [] incs = [ '#/intern/guardedalloc', '../include', - '../../blenfont', '../../blenkernel', '../../blenlib', + '../../blentranslation', '../../makesdna', '../../makesrna', '../../render/extern/include', diff --git a/source/blender/editors/curve/editcurve.c b/source/blender/editors/curve/editcurve.c index d410111b16d..f7dab0c0935 100644 --- a/source/blender/editors/curve/editcurve.c +++ b/source/blender/editors/curve/editcurve.c @@ -40,7 +40,7 @@ #include "BLI_math.h" #include "BLI_ghash.h" -#include "BLF_translation.h" +#include "BLT_translation.h" #include "BKE_context.h" #include "BKE_curve.h" diff --git a/source/blender/editors/curve/editcurve_add.c b/source/blender/editors/curve/editcurve_add.c index 555a53ae532..5347ef05105 100644 --- a/source/blender/editors/curve/editcurve_add.c +++ b/source/blender/editors/curve/editcurve_add.c @@ -38,7 +38,7 @@ #include "BLI_blenlib.h" #include "BLI_math.h" -#include "BLF_translation.h" +#include "BLT_translation.h" #include "BKE_context.h" #include "BKE_curve.h" @@ -71,20 +71,20 @@ static const char *get_curve_defname(int type) if ((type & CU_TYPE) == CU_BEZIER) { switch (stype) { - case CU_PRIM_CURVE: return CTX_DATA_(BLF_I18NCONTEXT_ID_CURVE, "BezierCurve"); - case CU_PRIM_CIRCLE: return CTX_DATA_(BLF_I18NCONTEXT_ID_CURVE, "BezierCircle"); - case CU_PRIM_PATH: return CTX_DATA_(BLF_I18NCONTEXT_ID_CURVE, "CurvePath"); + case CU_PRIM_CURVE: return CTX_DATA_(BLT_I18NCONTEXT_ID_CURVE, "BezierCurve"); + case CU_PRIM_CIRCLE: return CTX_DATA_(BLT_I18NCONTEXT_ID_CURVE, "BezierCircle"); + case CU_PRIM_PATH: return CTX_DATA_(BLT_I18NCONTEXT_ID_CURVE, "CurvePath"); default: - return CTX_DATA_(BLF_I18NCONTEXT_ID_CURVE, "Curve"); + return CTX_DATA_(BLT_I18NCONTEXT_ID_CURVE, "Curve"); } } else { switch (stype) { - case CU_PRIM_CURVE: return CTX_DATA_(BLF_I18NCONTEXT_ID_CURVE, "NurbsCurve"); - case CU_PRIM_CIRCLE: return CTX_DATA_(BLF_I18NCONTEXT_ID_CURVE, "NurbsCircle"); - case CU_PRIM_PATH: return CTX_DATA_(BLF_I18NCONTEXT_ID_CURVE, "NurbsPath"); + case CU_PRIM_CURVE: return CTX_DATA_(BLT_I18NCONTEXT_ID_CURVE, "NurbsCurve"); + case CU_PRIM_CIRCLE: return CTX_DATA_(BLT_I18NCONTEXT_ID_CURVE, "NurbsCircle"); + case CU_PRIM_PATH: return CTX_DATA_(BLT_I18NCONTEXT_ID_CURVE, "NurbsPath"); default: - return CTX_DATA_(BLF_I18NCONTEXT_ID_CURVE, "Curve"); + return CTX_DATA_(BLT_I18NCONTEXT_ID_CURVE, "Curve"); } } } @@ -94,13 +94,13 @@ static const char *get_surf_defname(int type) int stype = type & CU_PRIMITIVE; switch (stype) { - case CU_PRIM_CURVE: return CTX_DATA_(BLF_I18NCONTEXT_ID_CURVE, "SurfCurve"); - case CU_PRIM_CIRCLE: return CTX_DATA_(BLF_I18NCONTEXT_ID_CURVE, "SurfCircle"); - case CU_PRIM_PATCH: return CTX_DATA_(BLF_I18NCONTEXT_ID_CURVE, "SurfPatch"); - case CU_PRIM_SPHERE: return CTX_DATA_(BLF_I18NCONTEXT_ID_CURVE, "SurfSphere"); - case CU_PRIM_DONUT: return CTX_DATA_(BLF_I18NCONTEXT_ID_CURVE, "SurfTorus"); + case CU_PRIM_CURVE: return CTX_DATA_(BLT_I18NCONTEXT_ID_CURVE, "SurfCurve"); + case CU_PRIM_CIRCLE: return CTX_DATA_(BLT_I18NCONTEXT_ID_CURVE, "SurfCircle"); + case CU_PRIM_PATCH: return CTX_DATA_(BLT_I18NCONTEXT_ID_CURVE, "SurfPatch"); + case CU_PRIM_SPHERE: return CTX_DATA_(BLT_I18NCONTEXT_ID_CURVE, "SurfSphere"); + case CU_PRIM_DONUT: return CTX_DATA_(BLT_I18NCONTEXT_ID_CURVE, "SurfTorus"); default: - return CTX_DATA_(BLF_I18NCONTEXT_ID_CURVE, "Surface"); + return CTX_DATA_(BLT_I18NCONTEXT_ID_CURVE, "Surface"); } } diff --git a/source/blender/editors/gpencil/CMakeLists.txt b/source/blender/editors/gpencil/CMakeLists.txt index 56b8d284386..83a13abb33f 100644 --- a/source/blender/editors/gpencil/CMakeLists.txt +++ b/source/blender/editors/gpencil/CMakeLists.txt @@ -23,6 +23,7 @@ set(INC ../../blenfont ../../blenkernel ../../blenlib + ../../blentranslation ../../imbuf ../../gpu ../../makesdna diff --git a/source/blender/editors/gpencil/SConscript b/source/blender/editors/gpencil/SConscript index 8e2ac5dc61e..3830a164b7b 100644 --- a/source/blender/editors/gpencil/SConscript +++ b/source/blender/editors/gpencil/SConscript @@ -38,6 +38,7 @@ incs = [ '../../blenfont', '../../blenkernel', '../../blenlib', + '../../blentranslation', '../../bmesh', '../../gpu', '../../imbuf', diff --git a/source/blender/editors/gpencil/drawgpencil.c b/source/blender/editors/gpencil/drawgpencil.c index b28c948db9f..ff8984ae329 100644 --- a/source/blender/editors/gpencil/drawgpencil.c +++ b/source/blender/editors/gpencil/drawgpencil.c @@ -41,7 +41,7 @@ #include "BLI_utildefines.h" #include "BLF_api.h" -#include "BLF_translation.h" +#include "BLT_translation.h" #include "DNA_gpencil_types.h" #include "DNA_scene_types.h" diff --git a/source/blender/editors/gpencil/gpencil_convert.c b/source/blender/editors/gpencil/gpencil_convert.c index 2c8f86423a5..e8d73eaffdf 100644 --- a/source/blender/editors/gpencil/gpencil_convert.c +++ b/source/blender/editors/gpencil/gpencil_convert.c @@ -44,7 +44,7 @@ #include "BLI_rand.h" #include "BLI_utildefines.h" -#include "BLF_translation.h" +#include "BLT_translation.h" #include "DNA_anim_types.h" #include "DNA_curve_types.h" diff --git a/source/blender/editors/gpencil/gpencil_data.c b/source/blender/editors/gpencil/gpencil_data.c index fa76029bb2e..de966776645 100644 --- a/source/blender/editors/gpencil/gpencil_data.c +++ b/source/blender/editors/gpencil/gpencil_data.c @@ -41,7 +41,7 @@ #include "BLI_blenlib.h" #include "BLI_utildefines.h" -#include "BLF_translation.h" +#include "BLT_translation.h" #include "DNA_scene_types.h" #include "DNA_screen_types.h" diff --git a/source/blender/editors/gpencil/gpencil_edit.c b/source/blender/editors/gpencil/gpencil_edit.c index cc7cb902520..5c37a0a5b60 100644 --- a/source/blender/editors/gpencil/gpencil_edit.c +++ b/source/blender/editors/gpencil/gpencil_edit.c @@ -42,7 +42,7 @@ #include "BLI_blenlib.h" #include "BLI_utildefines.h" -#include "BLF_translation.h" +#include "BLT_translation.h" #include "DNA_scene_types.h" #include "DNA_screen_types.h" diff --git a/source/blender/editors/gpencil/gpencil_paint.c b/source/blender/editors/gpencil/gpencil_paint.c index cccb958153b..184482eeacb 100644 --- a/source/blender/editors/gpencil/gpencil_paint.c +++ b/source/blender/editors/gpencil/gpencil_paint.c @@ -40,7 +40,7 @@ #include "BLI_math.h" #include "BLI_utildefines.h" -#include "BLF_translation.h" +#include "BLT_translation.h" #include "PIL_time.h" diff --git a/source/blender/editors/interface/CMakeLists.txt b/source/blender/editors/interface/CMakeLists.txt index 972eca747b9..3efb4921bbe 100644 --- a/source/blender/editors/interface/CMakeLists.txt +++ b/source/blender/editors/interface/CMakeLists.txt @@ -23,6 +23,7 @@ set(INC ../../blenfont ../../blenkernel ../../blenlib + ../../blentranslation ../../gpu ../../imbuf ../../makesdna diff --git a/source/blender/editors/interface/SConscript b/source/blender/editors/interface/SConscript index 7584fd8ad46..ea6f35c54e6 100644 --- a/source/blender/editors/interface/SConscript +++ b/source/blender/editors/interface/SConscript @@ -37,6 +37,7 @@ incs = [ '../../blenfont', '../../blenkernel', '../../blenlib', + '../../blentranslation', '../../gpu', '../../imbuf', '../../makesdna', diff --git a/source/blender/editors/interface/interface.c b/source/blender/editors/interface/interface.c index 31976c7b78a..8efa14a5358 100644 --- a/source/blender/editors/interface/interface.c +++ b/source/blender/editors/interface/interface.c @@ -59,7 +59,7 @@ #include "BIF_gl.h" #include "BLF_api.h" -#include "BLF_translation.h" +#include "BLT_translation.h" #include "UI_interface.h" @@ -4568,7 +4568,7 @@ void UI_but_string_info_get(bContext *C, uiBut *but, ...) } } else if (type == BUT_GET_RNA_LABEL_CONTEXT) { - const char *_tmp = BLF_I18NCONTEXT_DEFAULT; + const char *_tmp = BLT_I18NCONTEXT_DEFAULT; if (but->rnaprop) _tmp = RNA_property_translation_context(but->rnaprop); else if (but->optype) @@ -4578,8 +4578,8 @@ void UI_but_string_info_get(bContext *C, uiBut *but, ...) if (mt) _tmp = RNA_struct_translation_context(mt->ext.srna); } - if (BLF_is_default_context(_tmp)) { - _tmp = BLF_I18NCONTEXT_DEFAULT_BPYRNA; + if (BLT_is_default_context(_tmp)) { + _tmp = BLT_I18NCONTEXT_DEFAULT_BPYRNA; } tmp = BLI_strdup(_tmp); } diff --git a/source/blender/editors/interface/interface_eyedropper.c b/source/blender/editors/interface/interface_eyedropper.c index 97aa865c287..ceea4ff42d9 100644 --- a/source/blender/editors/interface/interface_eyedropper.c +++ b/source/blender/editors/interface/interface_eyedropper.c @@ -36,7 +36,7 @@ #include "BLI_blenlib.h" #include "BLI_math_vector.h" -#include "BLF_translation.h" +#include "BLT_translation.h" #include "BKE_context.h" #include "BKE_screen.h" diff --git a/source/blender/editors/interface/interface_handlers.c b/source/blender/editors/interface/interface_handlers.c index 4adc866d3a7..231ba03000b 100644 --- a/source/blender/editors/interface/interface_handlers.c +++ b/source/blender/editors/interface/interface_handlers.c @@ -56,7 +56,7 @@ #include "BLI_rect.h" #include "BLI_utildefines.h" -#include "BLF_translation.h" +#include "BLT_translation.h" #include "PIL_time.h" @@ -2849,7 +2849,7 @@ static bool ui_textedit_copypaste(uiBut *but, uiHandleButtonData *data, const in * avoid weird character drawing if IME inputs non-ascii chars */ static bool ui_ime_is_lang_supported(void) { - const char *uilng = BLF_lang_get(); + const char *uilng = BLT_lang_get(); const bool is_lang_supported = STREQ(uilng, "zh_CN") || STREQ(uilng, "zh_TW") || STREQ(uilng, "ja_JP"); @@ -6508,19 +6508,19 @@ static bool ui_but_menu(bContext *C, uiBut *but) if (but->flag & UI_BUT_ANIMATED_KEY) { /* replace/delete keyfraemes */ if (is_array_component) { - uiItemBooleanO(layout, CTX_IFACE_(BLF_I18NCONTEXT_OPERATOR_DEFAULT, "Replace Keyframes"), + uiItemBooleanO(layout, CTX_IFACE_(BLT_I18NCONTEXT_OPERATOR_DEFAULT, "Replace Keyframes"), ICON_NONE, "ANIM_OT_keyframe_insert_button", "all", 1); - uiItemBooleanO(layout, CTX_IFACE_(BLF_I18NCONTEXT_OPERATOR_DEFAULT, "Replace Single Keyframe"), + uiItemBooleanO(layout, CTX_IFACE_(BLT_I18NCONTEXT_OPERATOR_DEFAULT, "Replace Single Keyframe"), ICON_NONE, "ANIM_OT_keyframe_insert_button", "all", 0); - uiItemBooleanO(layout, CTX_IFACE_(BLF_I18NCONTEXT_OPERATOR_DEFAULT, "Delete Keyframes"), + uiItemBooleanO(layout, CTX_IFACE_(BLT_I18NCONTEXT_OPERATOR_DEFAULT, "Delete Keyframes"), ICON_NONE, "ANIM_OT_keyframe_delete_button", "all", 1); - uiItemBooleanO(layout, CTX_IFACE_(BLF_I18NCONTEXT_OPERATOR_DEFAULT, "Delete Single Keyframe"), + uiItemBooleanO(layout, CTX_IFACE_(BLT_I18NCONTEXT_OPERATOR_DEFAULT, "Delete Single Keyframe"), ICON_NONE, "ANIM_OT_keyframe_delete_button", "all", 0); } else { - uiItemBooleanO(layout, CTX_IFACE_(BLF_I18NCONTEXT_OPERATOR_DEFAULT, "Replace Keyframe"), + uiItemBooleanO(layout, CTX_IFACE_(BLT_I18NCONTEXT_OPERATOR_DEFAULT, "Replace Keyframe"), ICON_NONE, "ANIM_OT_keyframe_insert_button", "all", 1); - uiItemBooleanO(layout, CTX_IFACE_(BLF_I18NCONTEXT_OPERATOR_DEFAULT, "Delete Keyframe"), + uiItemBooleanO(layout, CTX_IFACE_(BLT_I18NCONTEXT_OPERATOR_DEFAULT, "Delete Keyframe"), ICON_NONE, "ANIM_OT_keyframe_delete_button", "all", 1); } @@ -6534,26 +6534,26 @@ static bool ui_but_menu(bContext *C, uiBut *but) } else if (is_anim) { if (is_array_component) { - uiItemBooleanO(layout, CTX_IFACE_(BLF_I18NCONTEXT_OPERATOR_DEFAULT, "Insert Keyframes"), + uiItemBooleanO(layout, CTX_IFACE_(BLT_I18NCONTEXT_OPERATOR_DEFAULT, "Insert Keyframes"), ICON_NONE, "ANIM_OT_keyframe_insert_button", "all", 1); - uiItemBooleanO(layout, CTX_IFACE_(BLF_I18NCONTEXT_OPERATOR_DEFAULT, "Insert Single Keyframe"), + uiItemBooleanO(layout, CTX_IFACE_(BLT_I18NCONTEXT_OPERATOR_DEFAULT, "Insert Single Keyframe"), ICON_NONE, "ANIM_OT_keyframe_insert_button", "all", 0); } else { - uiItemBooleanO(layout, CTX_IFACE_(BLF_I18NCONTEXT_OPERATOR_DEFAULT, "Insert Keyframe"), + uiItemBooleanO(layout, CTX_IFACE_(BLT_I18NCONTEXT_OPERATOR_DEFAULT, "Insert Keyframe"), ICON_NONE, "ANIM_OT_keyframe_insert_button", "all", 1); } } if ((but->flag & UI_BUT_ANIMATED) && (but->rnapoin.type != &RNA_NlaStrip)) { if (is_array_component) { - uiItemBooleanO(layout, CTX_IFACE_(BLF_I18NCONTEXT_OPERATOR_DEFAULT, "Clear Keyframes"), + uiItemBooleanO(layout, CTX_IFACE_(BLT_I18NCONTEXT_OPERATOR_DEFAULT, "Clear Keyframes"), ICON_NONE, "ANIM_OT_keyframe_clear_button", "all", 1); - uiItemBooleanO(layout, CTX_IFACE_(BLF_I18NCONTEXT_OPERATOR_DEFAULT, "Clear Single Keyframes"), + uiItemBooleanO(layout, CTX_IFACE_(BLT_I18NCONTEXT_OPERATOR_DEFAULT, "Clear Single Keyframes"), ICON_NONE, "ANIM_OT_keyframe_clear_button", "all", 0); } else { - uiItemBooleanO(layout, CTX_IFACE_(BLF_I18NCONTEXT_OPERATOR_DEFAULT, "Clear Keyframes"), + uiItemBooleanO(layout, CTX_IFACE_(BLT_I18NCONTEXT_OPERATOR_DEFAULT, "Clear Keyframes"), ICON_NONE, "ANIM_OT_keyframe_clear_button", "all", 1); } } @@ -6563,20 +6563,20 @@ static bool ui_but_menu(bContext *C, uiBut *but) uiItemS(layout); if (is_array_component) { - uiItemBooleanO(layout, CTX_IFACE_(BLF_I18NCONTEXT_OPERATOR_DEFAULT, "Delete Drivers"), + uiItemBooleanO(layout, CTX_IFACE_(BLT_I18NCONTEXT_OPERATOR_DEFAULT, "Delete Drivers"), ICON_NONE, "ANIM_OT_driver_button_remove", "all", 1); - uiItemBooleanO(layout, CTX_IFACE_(BLF_I18NCONTEXT_OPERATOR_DEFAULT, "Delete Single Driver"), + uiItemBooleanO(layout, CTX_IFACE_(BLT_I18NCONTEXT_OPERATOR_DEFAULT, "Delete Single Driver"), ICON_NONE, "ANIM_OT_driver_button_remove", "all", 0); } else { - uiItemBooleanO(layout, CTX_IFACE_(BLF_I18NCONTEXT_OPERATOR_DEFAULT, "Delete Driver"), + uiItemBooleanO(layout, CTX_IFACE_(BLT_I18NCONTEXT_OPERATOR_DEFAULT, "Delete Driver"), ICON_NONE, "ANIM_OT_driver_button_remove", "all", 1); } - uiItemO(layout, CTX_IFACE_(BLF_I18NCONTEXT_OPERATOR_DEFAULT, "Copy Driver"), + uiItemO(layout, CTX_IFACE_(BLT_I18NCONTEXT_OPERATOR_DEFAULT, "Copy Driver"), ICON_NONE, "ANIM_OT_copy_driver_button"); if (ANIM_driver_can_paste()) { - uiItemO(layout, CTX_IFACE_(BLF_I18NCONTEXT_OPERATOR_DEFAULT, "Paste Driver"), + uiItemO(layout, CTX_IFACE_(BLT_I18NCONTEXT_OPERATOR_DEFAULT, "Paste Driver"), ICON_NONE, "ANIM_OT_paste_driver_button"); } } @@ -6587,18 +6587,18 @@ static bool ui_but_menu(bContext *C, uiBut *but) uiItemS(layout); if (is_array_component) { - uiItemBooleanO(layout, CTX_IFACE_(BLF_I18NCONTEXT_OPERATOR_DEFAULT, "Add Drivers"), + uiItemBooleanO(layout, CTX_IFACE_(BLT_I18NCONTEXT_OPERATOR_DEFAULT, "Add Drivers"), ICON_NONE, "ANIM_OT_driver_button_add", "all", 1); - uiItemBooleanO(layout, CTX_IFACE_(BLF_I18NCONTEXT_OPERATOR_DEFAULT, "Add Single Driver"), + uiItemBooleanO(layout, CTX_IFACE_(BLT_I18NCONTEXT_OPERATOR_DEFAULT, "Add Single Driver"), ICON_NONE, "ANIM_OT_driver_button_add", "all", 0); } else { - uiItemBooleanO(layout, CTX_IFACE_(BLF_I18NCONTEXT_OPERATOR_DEFAULT, "Add Driver"), + uiItemBooleanO(layout, CTX_IFACE_(BLT_I18NCONTEXT_OPERATOR_DEFAULT, "Add Driver"), ICON_NONE, "ANIM_OT_driver_button_add", "all", 1); } if (ANIM_driver_can_paste()) { - uiItemO(layout, CTX_IFACE_(BLF_I18NCONTEXT_OPERATOR_DEFAULT, "Paste Driver"), + uiItemO(layout, CTX_IFACE_(BLT_I18NCONTEXT_OPERATOR_DEFAULT, "Paste Driver"), ICON_NONE, "ANIM_OT_paste_driver_button"); } } @@ -6609,17 +6609,17 @@ static bool ui_but_menu(bContext *C, uiBut *but) uiItemS(layout); if (is_array_component) { - uiItemBooleanO(layout, CTX_IFACE_(BLF_I18NCONTEXT_OPERATOR_DEFAULT, "Add All to Keying Set"), + uiItemBooleanO(layout, CTX_IFACE_(BLT_I18NCONTEXT_OPERATOR_DEFAULT, "Add All to Keying Set"), ICON_NONE, "ANIM_OT_keyingset_button_add", "all", 1); - uiItemBooleanO(layout, CTX_IFACE_(BLF_I18NCONTEXT_OPERATOR_DEFAULT, "Add Single to Keying Set"), + uiItemBooleanO(layout, CTX_IFACE_(BLT_I18NCONTEXT_OPERATOR_DEFAULT, "Add Single to Keying Set"), ICON_NONE, "ANIM_OT_keyingset_button_add", "all", 0); - uiItemO(layout, CTX_IFACE_(BLF_I18NCONTEXT_OPERATOR_DEFAULT, "Remove from Keying Set"), + uiItemO(layout, CTX_IFACE_(BLT_I18NCONTEXT_OPERATOR_DEFAULT, "Remove from Keying Set"), ICON_NONE, "ANIM_OT_keyingset_button_remove"); } else { - uiItemBooleanO(layout, CTX_IFACE_(BLF_I18NCONTEXT_OPERATOR_DEFAULT, "Add to Keying Set"), + uiItemBooleanO(layout, CTX_IFACE_(BLT_I18NCONTEXT_OPERATOR_DEFAULT, "Add to Keying Set"), ICON_NONE, "ANIM_OT_keyingset_button_add", "all", 1); - uiItemO(layout, CTX_IFACE_(BLF_I18NCONTEXT_OPERATOR_DEFAULT, "Remove from Keying Set"), + uiItemO(layout, CTX_IFACE_(BLT_I18NCONTEXT_OPERATOR_DEFAULT, "Remove from Keying Set"), ICON_NONE, "ANIM_OT_keyingset_button_remove"); } } @@ -6632,23 +6632,23 @@ static bool ui_but_menu(bContext *C, uiBut *but) * Paste Property Value */ if (is_array_component) { - uiItemBooleanO(layout, CTX_IFACE_(BLF_I18NCONTEXT_OPERATOR_DEFAULT, "Reset All to Default Values"), + uiItemBooleanO(layout, CTX_IFACE_(BLT_I18NCONTEXT_OPERATOR_DEFAULT, "Reset All to Default Values"), ICON_NONE, "UI_OT_reset_default_button", "all", 1); - uiItemBooleanO(layout, CTX_IFACE_(BLF_I18NCONTEXT_OPERATOR_DEFAULT, "Reset Single to Default Value"), + uiItemBooleanO(layout, CTX_IFACE_(BLT_I18NCONTEXT_OPERATOR_DEFAULT, "Reset Single to Default Value"), ICON_NONE, "UI_OT_reset_default_button", "all", 0); } else { - uiItemBooleanO(layout, CTX_IFACE_(BLF_I18NCONTEXT_OPERATOR_DEFAULT, "Reset to Default Value"), + uiItemBooleanO(layout, CTX_IFACE_(BLT_I18NCONTEXT_OPERATOR_DEFAULT, "Reset to Default Value"), ICON_NONE, "UI_OT_reset_default_button", "all", 1); } if (is_editable /*&& is_idprop*/ && is_set) { - uiItemO(layout, CTX_IFACE_(BLF_I18NCONTEXT_OPERATOR_DEFAULT, "Unset"), + uiItemO(layout, CTX_IFACE_(BLT_I18NCONTEXT_OPERATOR_DEFAULT, "Unset"), ICON_NONE, "UI_OT_unset_property_button"); } - uiItemO(layout, CTX_IFACE_(BLF_I18NCONTEXT_OPERATOR_DEFAULT, "Copy Data Path"), + uiItemO(layout, CTX_IFACE_(BLT_I18NCONTEXT_OPERATOR_DEFAULT, "Copy Data Path"), ICON_NONE, "UI_OT_copy_data_path_button"); - uiItemO(layout, CTX_IFACE_(BLF_I18NCONTEXT_OPERATOR_DEFAULT, "Copy To Selected"), + uiItemO(layout, CTX_IFACE_(BLT_I18NCONTEXT_OPERATOR_DEFAULT, "Copy To Selected"), ICON_NONE, "UI_OT_copy_to_selected_button"); uiItemS(layout); @@ -6673,17 +6673,17 @@ static bool ui_but_menu(bContext *C, uiBut *but) /* would rather use a block but, but gets weirdly positioned... */ //uiDefBlockBut(block, menu_change_shortcut, but, "Change Shortcut", 0, 0, uiLayoutGetWidth(layout), UI_UNIT_Y, ""); - but2 = uiDefIconTextBut(block, UI_BTYPE_BUT, 0, 0, CTX_IFACE_(BLF_I18NCONTEXT_OPERATOR_DEFAULT, "Change Shortcut"), + but2 = uiDefIconTextBut(block, UI_BTYPE_BUT, 0, 0, CTX_IFACE_(BLT_I18NCONTEXT_OPERATOR_DEFAULT, "Change Shortcut"), 0, 0, w, UI_UNIT_Y, NULL, 0, 0, 0, 0, ""); UI_but_func_set(but2, popup_change_shortcut_func, but, NULL); - but2 = uiDefIconTextBut(block, UI_BTYPE_BUT, 0, 0, CTX_IFACE_(BLF_I18NCONTEXT_OPERATOR_DEFAULT, "Remove Shortcut"), + but2 = uiDefIconTextBut(block, UI_BTYPE_BUT, 0, 0, CTX_IFACE_(BLT_I18NCONTEXT_OPERATOR_DEFAULT, "Remove Shortcut"), 0, 0, w, UI_UNIT_Y, NULL, 0, 0, 0, 0, ""); UI_but_func_set(but2, remove_shortcut_func, but, NULL); } /* only show 'add' if there's a suitable key map for it to go in */ else if (WM_keymap_guess_opname(C, but->optype->idname)) { - but2 = uiDefIconTextBut(block, UI_BTYPE_BUT, 0, 0, CTX_IFACE_(BLF_I18NCONTEXT_OPERATOR_DEFAULT, "Add Shortcut"), + but2 = uiDefIconTextBut(block, UI_BTYPE_BUT, 0, 0, CTX_IFACE_(BLT_I18NCONTEXT_OPERATOR_DEFAULT, "Add Shortcut"), 0, 0, w, UI_UNIT_Y, NULL, 0, 0, 0, 0, ""); UI_but_func_set(but2, popup_add_shortcut_func, but, NULL); } @@ -6705,12 +6705,12 @@ static bool ui_but_menu(bContext *C, uiBut *but) PointerRNA ptr_props; if (UI_but_online_manual_id(but, buf, sizeof(buf))) { - uiItemO(layout, CTX_IFACE_(BLF_I18NCONTEXT_OPERATOR_DEFAULT, "Online Manual"), + uiItemO(layout, CTX_IFACE_(BLT_I18NCONTEXT_OPERATOR_DEFAULT, "Online Manual"), ICON_NONE, "WM_OT_doc_view_manual_ui_context"); WM_operator_properties_create(&ptr_props, "WM_OT_doc_view"); RNA_string_set(&ptr_props, "doc_id", buf); - uiItemFullO(layout, "WM_OT_doc_view", CTX_IFACE_(BLF_I18NCONTEXT_OPERATOR_DEFAULT, "Online Python Reference"), + uiItemFullO(layout, "WM_OT_doc_view", CTX_IFACE_(BLT_I18NCONTEXT_OPERATOR_DEFAULT, "Online Python Reference"), ICON_NONE, ptr_props.data, WM_OP_EXEC_DEFAULT, 0); /* XXX inactive option, not for public! */ diff --git a/source/blender/editors/interface/interface_layout.c b/source/blender/editors/interface/interface_layout.c index 6b16bc95d7f..d746acc14a1 100644 --- a/source/blender/editors/interface/interface_layout.c +++ b/source/blender/editors/interface/interface_layout.c @@ -43,7 +43,7 @@ #include "BLI_utildefines.h" #include "BLI_math.h" -#include "BLF_translation.h" +#include "BLT_translation.h" #include "BKE_context.h" #include "BKE_global.h" diff --git a/source/blender/editors/interface/interface_ops.c b/source/blender/editors/interface/interface_ops.c index c3f178d9ef2..6ac657fa7a3 100644 --- a/source/blender/editors/interface/interface_ops.c +++ b/source/blender/editors/interface/interface_ops.c @@ -39,7 +39,7 @@ #include "BLI_math_color.h" #include "BLF_api.h" -#include "BLF_translation.h" +#include "BLT_lang.h" #include "BKE_context.h" #include "BKE_screen.h" @@ -830,7 +830,7 @@ static int edittranslation_exec(bContext *C, wmOperator *op) PointerRNA ptr; char popath[FILE_MAX]; const char *root = U.i18ndir; - const char *uilng = BLF_lang_get(); + const char *uilng = BLT_lang_get(); uiStringInfo but_label = {BUT_GET_LABEL, NULL}; uiStringInfo rna_label = {BUT_GET_RNA_LABEL, NULL}; @@ -925,9 +925,9 @@ static void UI_OT_edittranslation_init(wmOperatorType *ot) static int reloadtranslation_exec(bContext *UNUSED(C), wmOperator *UNUSED(op)) { - BLF_lang_init(); + BLT_lang_init(); BLF_cache_clear(); - BLF_lang_set(NULL); + BLT_lang_set(NULL); UI_reinit_font(); return OPERATOR_FINISHED; } diff --git a/source/blender/editors/interface/interface_panel.c b/source/blender/editors/interface/interface_panel.c index c69aed76b22..f4970ceb35e 100644 --- a/source/blender/editors/interface/interface_panel.c +++ b/source/blender/editors/interface/interface_panel.c @@ -43,7 +43,7 @@ #include "BLI_math.h" #include "BLI_utildefines.h" -#include "BLF_translation.h" +#include "BLT_translation.h" #include "DNA_userdef_types.h" diff --git a/source/blender/editors/interface/interface_regions.c b/source/blender/editors/interface/interface_regions.c index 6552625c911..c9b15f05519 100644 --- a/source/blender/editors/interface/interface_regions.c +++ b/source/blender/editors/interface/interface_regions.c @@ -62,7 +62,7 @@ #include "UI_view2d.h" #include "BLF_api.h" -#include "BLF_translation.h" +#include "BLT_translation.h" #include "ED_screen.h" diff --git a/source/blender/editors/interface/interface_style.c b/source/blender/editors/interface/interface_style.c index 10575fcbc54..8dca148ffe6 100644 --- a/source/blender/editors/interface/interface_style.c +++ b/source/blender/editors/interface/interface_style.c @@ -49,7 +49,7 @@ #include "BLF_api.h" #ifdef WITH_INTERNATIONAL -# include "BLF_translation.h" +# include "BLT_translation.h" #endif #include "UI_interface.h" diff --git a/source/blender/editors/interface/interface_templates.c b/source/blender/editors/interface/interface_templates.c index 80e098cfdc9..6b2f12eef45 100644 --- a/source/blender/editors/interface/interface_templates.c +++ b/source/blender/editors/interface/interface_templates.c @@ -47,7 +47,7 @@ #include "BLI_fnmatch.h" #include "BLF_api.h" -#include "BLF_translation.h" +#include "BLT_translation.h" #include "BKE_colortools.h" #include "BKE_context.h" @@ -372,7 +372,7 @@ static const char *template_id_context(StructRNA *type) if (type) { return BKE_idcode_to_translation_context(RNA_type_to_ID_code(type)); } - return BLF_I18NCONTEXT_DEFAULT; + return BLT_I18NCONTEXT_DEFAULT; } #endif @@ -485,31 +485,31 @@ static void template_ID( int w = id ? UI_UNIT_X : (flag & UI_ID_OPEN) ? UI_UNIT_X * 3 : UI_UNIT_X * 6; /* i18n markup, does nothing! */ - BLF_I18N_MSGID_MULTI_CTXT("New", BLF_I18NCONTEXT_DEFAULT, - BLF_I18NCONTEXT_ID_SCENE, - BLF_I18NCONTEXT_ID_OBJECT, - BLF_I18NCONTEXT_ID_MESH, - BLF_I18NCONTEXT_ID_CURVE, - BLF_I18NCONTEXT_ID_METABALL, - BLF_I18NCONTEXT_ID_MATERIAL, - BLF_I18NCONTEXT_ID_TEXTURE, - BLF_I18NCONTEXT_ID_IMAGE, - BLF_I18NCONTEXT_ID_LATTICE, - BLF_I18NCONTEXT_ID_LAMP, - BLF_I18NCONTEXT_ID_CAMERA, - BLF_I18NCONTEXT_ID_WORLD, - BLF_I18NCONTEXT_ID_SCREEN, - BLF_I18NCONTEXT_ID_TEXT, + BLT_I18N_MSGID_MULTI_CTXT("New", BLT_I18NCONTEXT_DEFAULT, + BLT_I18NCONTEXT_ID_SCENE, + BLT_I18NCONTEXT_ID_OBJECT, + BLT_I18NCONTEXT_ID_MESH, + BLT_I18NCONTEXT_ID_CURVE, + BLT_I18NCONTEXT_ID_METABALL, + BLT_I18NCONTEXT_ID_MATERIAL, + BLT_I18NCONTEXT_ID_TEXTURE, + BLT_I18NCONTEXT_ID_IMAGE, + BLT_I18NCONTEXT_ID_LATTICE, + BLT_I18NCONTEXT_ID_LAMP, + BLT_I18NCONTEXT_ID_CAMERA, + BLT_I18NCONTEXT_ID_WORLD, + BLT_I18NCONTEXT_ID_SCREEN, + BLT_I18NCONTEXT_ID_TEXT, ); - BLF_I18N_MSGID_MULTI_CTXT("New", BLF_I18NCONTEXT_ID_SPEAKER, - BLF_I18NCONTEXT_ID_SOUND, - BLF_I18NCONTEXT_ID_ARMATURE, - BLF_I18NCONTEXT_ID_ACTION, - BLF_I18NCONTEXT_ID_NODETREE, - BLF_I18NCONTEXT_ID_BRUSH, - BLF_I18NCONTEXT_ID_PARTICLESETTINGS, - BLF_I18NCONTEXT_ID_GPENCIL, - BLF_I18NCONTEXT_ID_FREESTYLELINESTYLE, + BLT_I18N_MSGID_MULTI_CTXT("New", BLT_I18NCONTEXT_ID_SPEAKER, + BLT_I18NCONTEXT_ID_SOUND, + BLT_I18NCONTEXT_ID_ARMATURE, + BLT_I18NCONTEXT_ID_ACTION, + BLT_I18NCONTEXT_ID_NODETREE, + BLT_I18NCONTEXT_ID_BRUSH, + BLT_I18NCONTEXT_ID_PARTICLESETTINGS, + BLT_I18NCONTEXT_ID_GPENCIL, + BLT_I18NCONTEXT_ID_FREESTYLELINESTYLE, ); if (newop) { @@ -943,21 +943,21 @@ static uiLayout *draw_modifier( if (!(ob->mode & OB_MODE_PARTICLE_EDIT)) { if (ELEM(psys->part->ren_as, PART_DRAW_GR, PART_DRAW_OB)) - uiItemO(row, CTX_IFACE_(BLF_I18NCONTEXT_OPERATOR_DEFAULT, "Convert"), ICON_NONE, + uiItemO(row, CTX_IFACE_(BLT_I18NCONTEXT_OPERATOR_DEFAULT, "Convert"), ICON_NONE, "OBJECT_OT_duplicates_make_real"); else if (psys->part->ren_as == PART_DRAW_PATH && psys->pathcache) - uiItemO(row, CTX_IFACE_(BLF_I18NCONTEXT_OPERATOR_DEFAULT, "Convert"), ICON_NONE, + uiItemO(row, CTX_IFACE_(BLT_I18NCONTEXT_OPERATOR_DEFAULT, "Convert"), ICON_NONE, "OBJECT_OT_modifier_convert"); } } else { uiLayoutSetOperatorContext(row, WM_OP_INVOKE_DEFAULT); - uiItemEnumO(row, "OBJECT_OT_modifier_apply", CTX_IFACE_(BLF_I18NCONTEXT_OPERATOR_DEFAULT, "Apply"), + uiItemEnumO(row, "OBJECT_OT_modifier_apply", CTX_IFACE_(BLT_I18NCONTEXT_OPERATOR_DEFAULT, "Apply"), 0, "apply_as", MODIFIER_APPLY_DATA); if (modifier_isSameTopology(md) && !modifier_isNonGeometrical(md)) { uiItemEnumO(row, "OBJECT_OT_modifier_apply", - CTX_IFACE_(BLF_I18NCONTEXT_OPERATOR_DEFAULT, "Apply as Shape Key"), + CTX_IFACE_(BLT_I18NCONTEXT_OPERATOR_DEFAULT, "Apply as Shape Key"), 0, "apply_as", MODIFIER_APPLY_SHAPE); } } @@ -968,7 +968,7 @@ static uiLayout *draw_modifier( if (!ELEM(md->type, eModifierType_Fluidsim, eModifierType_Softbody, eModifierType_ParticleSystem, eModifierType_Cloth, eModifierType_Smoke)) { - uiItemO(row, CTX_IFACE_(BLF_I18NCONTEXT_OPERATOR_DEFAULT, "Copy"), ICON_NONE, + uiItemO(row, CTX_IFACE_(BLT_I18NCONTEXT_OPERATOR_DEFAULT, "Copy"), ICON_NONE, "OBJECT_OT_modifier_copy"); } } diff --git a/source/blender/editors/interface/interface_utils.c b/source/blender/editors/interface/interface_utils.c index 0823238fcb1..1d51c0588b6 100644 --- a/source/blender/editors/interface/interface_utils.c +++ b/source/blender/editors/interface/interface_utils.c @@ -41,7 +41,7 @@ #include "BLI_string.h" #include "BLI_listbase.h" -#include "BLF_translation.h" +#include "BLT_translation.h" #include "BKE_report.h" diff --git a/source/blender/editors/io/CMakeLists.txt b/source/blender/editors/io/CMakeLists.txt index f331dea5c5c..828cb494eab 100644 --- a/source/blender/editors/io/CMakeLists.txt +++ b/source/blender/editors/io/CMakeLists.txt @@ -20,9 +20,9 @@ set(INC ../include - ../../blenfont ../../blenkernel ../../blenlib + ../../blentranslation ../../bmesh ../../makesdna ../../makesrna diff --git a/source/blender/editors/io/SConscript b/source/blender/editors/io/SConscript index 0facb24e2c3..2b1a638b891 100644 --- a/source/blender/editors/io/SConscript +++ b/source/blender/editors/io/SConscript @@ -33,9 +33,9 @@ defs = [] incs = [ '../include', - '../../blenfont', '../../blenkernel', '../../blenlib', + '../../blentranslation', '../../collada', '../../makesrna', '../../windowmanager', diff --git a/source/blender/editors/io/io_collada.c b/source/blender/editors/io/io_collada.c index 93e9a204704..63147b542e7 100644 --- a/source/blender/editors/io/io_collada.c +++ b/source/blender/editors/io/io_collada.c @@ -30,7 +30,7 @@ #ifdef WITH_COLLADA #include "DNA_scene_types.h" -#include "BLF_translation.h" +#include "BLT_translation.h" #include "BLI_blenlib.h" #include "BLI_utildefines.h" diff --git a/source/blender/editors/mesh/CMakeLists.txt b/source/blender/editors/mesh/CMakeLists.txt index db20d42f39d..0280f662a26 100644 --- a/source/blender/editors/mesh/CMakeLists.txt +++ b/source/blender/editors/mesh/CMakeLists.txt @@ -21,9 +21,9 @@ set(INC ../include ../uvedit - ../../blenfont ../../blenkernel ../../blenlib + ../../blentranslation ../../bmesh ../../gpu ../../imbuf diff --git a/source/blender/editors/mesh/SConscript b/source/blender/editors/mesh/SConscript index 8b41241cea1..df58b2a90b3 100644 --- a/source/blender/editors/mesh/SConscript +++ b/source/blender/editors/mesh/SConscript @@ -38,9 +38,9 @@ incs = [ '#/intern/glew-mx', '../include', '../uvedit', - '../../blenfont', '../../blenkernel', '../../blenlib', + '../../blentranslation', '../../bmesh', '../../gpu', '../../imbuf', diff --git a/source/blender/editors/mesh/editmesh_add.c b/source/blender/editors/mesh/editmesh_add.c index 7af6c59adab..e073a255f73 100644 --- a/source/blender/editors/mesh/editmesh_add.c +++ b/source/blender/editors/mesh/editmesh_add.c @@ -34,7 +34,7 @@ #include "BLI_math.h" -#include "BLF_translation.h" +#include "BLT_translation.h" #include "BKE_context.h" #include "BKE_library.h" @@ -108,7 +108,7 @@ static int add_primitive_plane_exec(bContext *C, wmOperator *op) WM_operator_view3d_unit_defaults(C, op); ED_object_add_generic_get_opts(C, op, 'Z', loc, rot, &enter_editmode, &layer, NULL); - obedit = make_prim_init(C, CTX_DATA_(BLF_I18NCONTEXT_ID_MESH, "Plane"), &dia, mat, &was_editmode, loc, rot, layer); + obedit = make_prim_init(C, CTX_DATA_(BLT_I18NCONTEXT_ID_MESH, "Plane"), &dia, mat, &was_editmode, loc, rot, layer); em = BKE_editmesh_from_object(obedit); if (!EDBM_op_call_and_selectf( @@ -153,7 +153,7 @@ static int add_primitive_cube_exec(bContext *C, wmOperator *op) WM_operator_view3d_unit_defaults(C, op); ED_object_add_generic_get_opts(C, op, 'Z', loc, rot, &enter_editmode, &layer, NULL); - obedit = make_prim_init(C, CTX_DATA_(BLF_I18NCONTEXT_ID_MESH, "Cube"), &dia, mat, &was_editmode, loc, rot, layer); + obedit = make_prim_init(C, CTX_DATA_(BLT_I18NCONTEXT_ID_MESH, "Cube"), &dia, mat, &was_editmode, loc, rot, layer); em = BKE_editmesh_from_object(obedit); if (!EDBM_op_call_and_selectf( @@ -209,7 +209,7 @@ static int add_primitive_circle_exec(bContext *C, wmOperator *op) WM_operator_view3d_unit_defaults(C, op); ED_object_add_generic_get_opts(C, op, 'Z', loc, rot, &enter_editmode, &layer, NULL); - obedit = make_prim_init(C, CTX_DATA_(BLF_I18NCONTEXT_ID_MESH, "Circle"), &dia, mat, &was_editmode, loc, rot, layer); + obedit = make_prim_init(C, CTX_DATA_(BLT_I18NCONTEXT_ID_MESH, "Circle"), &dia, mat, &was_editmode, loc, rot, layer); em = BKE_editmesh_from_object(obedit); if (!EDBM_op_call_and_selectf( @@ -262,7 +262,7 @@ static int add_primitive_cylinder_exec(bContext *C, wmOperator *op) WM_operator_view3d_unit_defaults(C, op); ED_object_add_generic_get_opts(C, op, 'Z', loc, rot, &enter_editmode, &layer, NULL); - obedit = make_prim_init(C, CTX_DATA_(BLF_I18NCONTEXT_ID_MESH, "Cylinder"), &dia, mat, &was_editmode, loc, rot, layer); + obedit = make_prim_init(C, CTX_DATA_(BLT_I18NCONTEXT_ID_MESH, "Cylinder"), &dia, mat, &was_editmode, loc, rot, layer); em = BKE_editmesh_from_object(obedit); if (!EDBM_op_call_and_selectf( @@ -322,7 +322,7 @@ static int add_primitive_cone_exec(bContext *C, wmOperator *op) WM_operator_view3d_unit_defaults(C, op); ED_object_add_generic_get_opts(C, op, 'Z', loc, rot, &enter_editmode, &layer, NULL); - obedit = make_prim_init(C, CTX_DATA_(BLF_I18NCONTEXT_ID_MESH, "Cone"), &dia, mat, &was_editmode, loc, rot, layer); + obedit = make_prim_init(C, CTX_DATA_(BLT_I18NCONTEXT_ID_MESH, "Cone"), &dia, mat, &was_editmode, loc, rot, layer); em = BKE_editmesh_from_object(obedit); if (!EDBM_op_call_and_selectf( @@ -379,7 +379,7 @@ static int add_primitive_grid_exec(bContext *C, wmOperator *op) WM_operator_view3d_unit_defaults(C, op); ED_object_add_generic_get_opts(C, op, 'Z', loc, rot, &enter_editmode, &layer, NULL); - obedit = make_prim_init(C, CTX_DATA_(BLF_I18NCONTEXT_ID_MESH, "Grid"), &dia, mat, &was_editmode, loc, rot, layer); + obedit = make_prim_init(C, CTX_DATA_(BLT_I18NCONTEXT_ID_MESH, "Grid"), &dia, mat, &was_editmode, loc, rot, layer); em = BKE_editmesh_from_object(obedit); if (!EDBM_op_call_and_selectf( @@ -435,7 +435,7 @@ static int add_primitive_monkey_exec(bContext *C, wmOperator *op) WM_operator_view3d_unit_defaults(C, op); ED_object_add_generic_get_opts(C, op, 'Y', loc, rot, &enter_editmode, &layer, NULL); - obedit = make_prim_init(C, CTX_DATA_(BLF_I18NCONTEXT_ID_MESH, "Suzanne"), &dia, mat, &was_editmode, loc, rot, layer); + obedit = make_prim_init(C, CTX_DATA_(BLT_I18NCONTEXT_ID_MESH, "Suzanne"), &dia, mat, &was_editmode, loc, rot, layer); dia = RNA_float_get(op->ptr, "radius"); mul_mat3_m4_fl(mat, dia); @@ -482,7 +482,7 @@ static int add_primitive_uvsphere_exec(bContext *C, wmOperator *op) WM_operator_view3d_unit_defaults(C, op); ED_object_add_generic_get_opts(C, op, 'Z', loc, rot, &enter_editmode, &layer, NULL); - obedit = make_prim_init(C, CTX_DATA_(BLF_I18NCONTEXT_ID_MESH, "Sphere"), &dia, mat, &was_editmode, loc, rot, layer); + obedit = make_prim_init(C, CTX_DATA_(BLT_I18NCONTEXT_ID_MESH, "Sphere"), &dia, mat, &was_editmode, loc, rot, layer); em = BKE_editmesh_from_object(obedit); if (!EDBM_op_call_and_selectf( @@ -535,7 +535,7 @@ static int add_primitive_icosphere_exec(bContext *C, wmOperator *op) WM_operator_view3d_unit_defaults(C, op); ED_object_add_generic_get_opts(C, op, 'Z', loc, rot, &enter_editmode, &layer, NULL); - obedit = make_prim_init(C, CTX_DATA_(BLF_I18NCONTEXT_ID_MESH, "Icosphere"), &dia, mat, &was_editmode, loc, rot, layer); + obedit = make_prim_init(C, CTX_DATA_(BLT_I18NCONTEXT_ID_MESH, "Icosphere"), &dia, mat, &was_editmode, loc, rot, layer); em = BKE_editmesh_from_object(obedit); if (!EDBM_op_call_and_selectf( diff --git a/source/blender/editors/mesh/editmesh_bevel.c b/source/blender/editors/mesh/editmesh_bevel.c index dda21b39264..ce6856321d2 100644 --- a/source/blender/editors/mesh/editmesh_bevel.c +++ b/source/blender/editors/mesh/editmesh_bevel.c @@ -31,7 +31,7 @@ #include "BLI_string.h" #include "BLI_math.h" -#include "BLF_translation.h" +#include "BLT_translation.h" #include "BKE_context.h" #include "BKE_global.h" diff --git a/source/blender/editors/mesh/editmesh_bisect.c b/source/blender/editors/mesh/editmesh_bisect.c index db4b0c16d9d..08d0697e0f1 100644 --- a/source/blender/editors/mesh/editmesh_bisect.c +++ b/source/blender/editors/mesh/editmesh_bisect.c @@ -33,7 +33,7 @@ #include "BLI_math.h" -#include "BLF_translation.h" +#include "BLT_translation.h" #include "BKE_global.h" #include "BKE_context.h" diff --git a/source/blender/editors/mesh/editmesh_inset.c b/source/blender/editors/mesh/editmesh_inset.c index a5874b94edf..c037b0c6b0f 100644 --- a/source/blender/editors/mesh/editmesh_inset.c +++ b/source/blender/editors/mesh/editmesh_inset.c @@ -31,7 +31,7 @@ #include "BLI_string.h" #include "BLI_math.h" -#include "BLF_translation.h" +#include "BLT_translation.h" #include "BKE_context.h" #include "BKE_global.h" diff --git a/source/blender/editors/mesh/editmesh_knife.c b/source/blender/editors/mesh/editmesh_knife.c index caee5d44254..930dba229d4 100644 --- a/source/blender/editors/mesh/editmesh_knife.c +++ b/source/blender/editors/mesh/editmesh_knife.c @@ -46,7 +46,7 @@ #include "BLI_smallhash.h" #include "BLI_memarena.h" -#include "BLF_translation.h" +#include "BLT_translation.h" #include "BKE_DerivedMesh.h" #include "BKE_context.h" diff --git a/source/blender/editors/mesh/editmesh_loopcut.c b/source/blender/editors/mesh/editmesh_loopcut.c index 74a40a23fe1..50257d250dc 100644 --- a/source/blender/editors/mesh/editmesh_loopcut.c +++ b/source/blender/editors/mesh/editmesh_loopcut.c @@ -36,7 +36,7 @@ #include "BLI_string.h" #include "BLI_math.h" -#include "BLF_translation.h" +#include "BLT_translation.h" #include "BKE_context.h" #include "BKE_modifier.h" @@ -856,7 +856,7 @@ void MESH_OT_loopcut(wmOperatorType *ot) RNA_def_property_enum_items(prop, proportional_falloff_curve_only_items); RNA_def_property_enum_default(prop, PROP_INVSQUARE); RNA_def_property_ui_text(prop, "Falloff", "Falloff type the feather"); - RNA_def_property_translation_context(prop, BLF_I18NCONTEXT_ID_CURVE); /* Abusing id_curve :/ */ + RNA_def_property_translation_context(prop, BLT_I18NCONTEXT_ID_CURVE); /* Abusing id_curve :/ */ prop = RNA_def_int(ot->srna, "edge_index", -1, -1, INT_MAX, "Edge Index", "", 0, INT_MAX); RNA_def_property_flag(prop, PROP_HIDDEN); diff --git a/source/blender/editors/mesh/editmesh_tools.c b/source/blender/editors/mesh/editmesh_tools.c index ca1ce42db5a..d3937188358 100644 --- a/source/blender/editors/mesh/editmesh_tools.c +++ b/source/blender/editors/mesh/editmesh_tools.c @@ -55,7 +55,7 @@ #include "BKE_main.h" #include "BKE_editmesh.h" -#include "BLF_translation.h" +#include "BLT_translation.h" #include "RNA_define.h" #include "RNA_access.h" @@ -194,7 +194,7 @@ static void mesh_operator_edgering_props(wmOperatorType *ot, const int cuts_defa RNA_def_property_enum_items(prop, proportional_falloff_curve_only_items); RNA_def_property_enum_default(prop, PROP_SMOOTH); RNA_def_property_ui_text(prop, "Profile Shape", "Shape of the profile"); - RNA_def_property_translation_context(prop, BLF_I18NCONTEXT_ID_CURVE); /* Abusing id_curve :/ */ + RNA_def_property_translation_context(prop, BLT_I18NCONTEXT_ID_CURVE); /* Abusing id_curve :/ */ } static void mesh_operator_edgering_props_get(wmOperator *op, struct EdgeRingOpSubdProps *op_props) diff --git a/source/blender/editors/object/CMakeLists.txt b/source/blender/editors/object/CMakeLists.txt index 79437bb05b9..b3d02d45e13 100644 --- a/source/blender/editors/object/CMakeLists.txt +++ b/source/blender/editors/object/CMakeLists.txt @@ -20,9 +20,9 @@ set(INC ../include - ../../blenfont ../../blenkernel ../../blenlib + ../../blentranslation ../../bmesh ../../gpu ../../ikplugin diff --git a/source/blender/editors/object/SConscript b/source/blender/editors/object/SConscript index db30fae1f84..914ffa3061c 100644 --- a/source/blender/editors/object/SConscript +++ b/source/blender/editors/object/SConscript @@ -33,9 +33,9 @@ incs = [ '#/extern/recastnavigation', '#/intern/guardedalloc', '../include', - '../../blenfont', '../../blenkernel', '../../blenlib', + '../../blentranslation', '../../bmesh', '../../gpu', '../../ikplugin', diff --git a/source/blender/editors/object/object_add.c b/source/blender/editors/object/object_add.c index 075e382f628..615fbb527b3 100644 --- a/source/blender/editors/object/object_add.c +++ b/source/blender/editors/object/object_add.c @@ -55,7 +55,7 @@ #include "BLI_math.h" #include "BLI_string.h" -#include "BLF_translation.h" +#include "BLT_translation.h" #include "BKE_action.h" #include "BKE_anim.h" @@ -509,7 +509,7 @@ static int effector_add_exec(bContext *C, wmOperator *op) if (type == PFIELD_GUIDE) { Curve *cu; - const char *name = CTX_DATA_(BLF_I18NCONTEXT_ID_OBJECT, "CurveGuide"); + const char *name = CTX_DATA_(BLT_I18NCONTEXT_ID_OBJECT, "CurveGuide"); ob = ED_object_add_type(C, OB_CURVE, name, loc, rot, false, layer); cu = ob->data; @@ -521,7 +521,7 @@ static int effector_add_exec(bContext *C, wmOperator *op) ED_object_editmode_exit(C, EM_FREEDATA); } else { - const char *name = CTX_DATA_(BLF_I18NCONTEXT_ID_OBJECT, "Field"); + const char *name = CTX_DATA_(BLT_I18NCONTEXT_ID_OBJECT, "Field"); ob = ED_object_add_type(C, OB_EMPTY, name, loc, rot, false, layer); BKE_object_obdata_size_init(ob, dia); if (ELEM(type, PFIELD_WIND, PFIELD_VORTEX)) @@ -898,13 +898,13 @@ void OBJECT_OT_drop_named_image(wmOperatorType *ot) static const char *get_lamp_defname(int type) { switch (type) { - case LA_LOCAL: return CTX_DATA_(BLF_I18NCONTEXT_ID_LAMP, "Point"); - case LA_SUN: return CTX_DATA_(BLF_I18NCONTEXT_ID_LAMP, "Sun"); - case LA_SPOT: return CTX_DATA_(BLF_I18NCONTEXT_ID_LAMP, "Spot"); - case LA_HEMI: return CTX_DATA_(BLF_I18NCONTEXT_ID_LAMP, "Hemi"); - case LA_AREA: return CTX_DATA_(BLF_I18NCONTEXT_ID_LAMP, "Area"); + case LA_LOCAL: return CTX_DATA_(BLT_I18NCONTEXT_ID_LAMP, "Point"); + case LA_SUN: return CTX_DATA_(BLT_I18NCONTEXT_ID_LAMP, "Sun"); + case LA_SPOT: return CTX_DATA_(BLT_I18NCONTEXT_ID_LAMP, "Spot"); + case LA_HEMI: return CTX_DATA_(BLT_I18NCONTEXT_ID_LAMP, "Hemi"); + case LA_AREA: return CTX_DATA_(BLT_I18NCONTEXT_ID_LAMP, "Area"); default: - return CTX_DATA_(BLF_I18NCONTEXT_ID_LAMP, "Lamp"); + return CTX_DATA_(BLT_I18NCONTEXT_ID_LAMP, "Lamp"); } } @@ -952,7 +952,7 @@ void OBJECT_OT_lamp_add(wmOperatorType *ot) /* properties */ ot->prop = RNA_def_enum(ot->srna, "type", lamp_type_items, 0, "Type", ""); - RNA_def_property_translation_context(ot->prop, BLF_I18NCONTEXT_ID_LAMP); + RNA_def_property_translation_context(ot->prop, BLT_I18NCONTEXT_ID_LAMP); ED_object_add_unit_props(ot); ED_object_add_generic_props(ot, false); diff --git a/source/blender/editors/object/object_constraint.c b/source/blender/editors/object/object_constraint.c index e14674ef517..2697a5e5fb1 100644 --- a/source/blender/editors/object/object_constraint.c +++ b/source/blender/editors/object/object_constraint.c @@ -40,7 +40,7 @@ #include "BLI_dynstr.h" #include "BLI_utildefines.h" -#include "BLF_translation.h" +#include "BLT_translation.h" #include "DNA_anim_types.h" #include "DNA_constraint_types.h" diff --git a/source/blender/editors/object/object_edit.c b/source/blender/editors/object/object_edit.c index 3499a3cc364..67edf0db2d7 100644 --- a/source/blender/editors/object/object_edit.c +++ b/source/blender/editors/object/object_edit.c @@ -42,7 +42,7 @@ #include "BLI_utildefines.h" #include "BLI_ghash.h" -#include "BLF_translation.h" +#include "BLT_translation.h" #include "DNA_armature_types.h" #include "DNA_curve_types.h" diff --git a/source/blender/editors/object/object_relations.c b/source/blender/editors/object/object_relations.c index 8da535315b2..e21f58d8a38 100644 --- a/source/blender/editors/object/object_relations.c +++ b/source/blender/editors/object/object_relations.c @@ -56,7 +56,7 @@ #include "BLI_kdtree.h" #include "BLI_utildefines.h" -#include "BLF_translation.h" +#include "BLT_translation.h" #include "BKE_action.h" #include "BKE_animsys.h" diff --git a/source/blender/editors/object/object_select.c b/source/blender/editors/object/object_select.c index a8e4eec640b..83334e4e6a3 100644 --- a/source/blender/editors/object/object_select.c +++ b/source/blender/editors/object/object_select.c @@ -47,7 +47,7 @@ #include "BLI_rand.h" #include "BLI_utildefines.h" -#include "BLF_translation.h" +#include "BLT_translation.h" #include "BKE_context.h" #include "BKE_group.h" diff --git a/source/blender/editors/physics/CMakeLists.txt b/source/blender/editors/physics/CMakeLists.txt index 40d555226f3..898422dac51 100644 --- a/source/blender/editors/physics/CMakeLists.txt +++ b/source/blender/editors/physics/CMakeLists.txt @@ -20,9 +20,9 @@ set(INC ../include - ../../blenfont ../../blenkernel ../../blenlib + ../../blentranslation ../../gpu ../../makesdna ../../makesrna diff --git a/source/blender/editors/physics/SConscript b/source/blender/editors/physics/SConscript index 98d6be6d0bc..be399a58732 100644 --- a/source/blender/editors/physics/SConscript +++ b/source/blender/editors/physics/SConscript @@ -36,9 +36,9 @@ incs = [ '#/intern/rigidbody', '#/intern/elbeem/extern', '../include', - '../../blenfont', '../../blenkernel', '../../blenlib', + '../../blentranslation', '../../gpu', '../../makesdna', '../../makesrna', diff --git a/source/blender/editors/physics/dynamicpaint_ops.c b/source/blender/editors/physics/dynamicpaint_ops.c index 245d8790399..93daa15e608 100644 --- a/source/blender/editors/physics/dynamicpaint_ops.c +++ b/source/blender/editors/physics/dynamicpaint_ops.c @@ -30,7 +30,7 @@ #include "BLI_string.h" #include "BLI_utildefines.h" -#include "BLF_translation.h" +#include "BLT_translation.h" #include "DNA_dynamicpaint_types.h" #include "DNA_modifier_types.h" diff --git a/source/blender/editors/physics/rigidbody_object.c b/source/blender/editors/physics/rigidbody_object.c index c8b944f7d2a..949084973cf 100644 --- a/source/blender/editors/physics/rigidbody_object.c +++ b/source/blender/editors/physics/rigidbody_object.c @@ -40,7 +40,7 @@ #include "BLI_blenlib.h" -#include "BLF_translation.h" +#include "BLT_translation.h" #include "BKE_context.h" #include "BKE_depsgraph.h" diff --git a/source/blender/editors/render/CMakeLists.txt b/source/blender/editors/render/CMakeLists.txt index 42dafc076ed..971ab9f3458 100644 --- a/source/blender/editors/render/CMakeLists.txt +++ b/source/blender/editors/render/CMakeLists.txt @@ -20,10 +20,10 @@ set(INC ../include - ../../blenfont ../../blenkernel ../../blenlib ../../blenloader + ../../blentranslation ../../gpu ../../imbuf ../../bmesh diff --git a/source/blender/editors/render/SConscript b/source/blender/editors/render/SConscript index ada0c6cf251..24270ca2324 100644 --- a/source/blender/editors/render/SConscript +++ b/source/blender/editors/render/SConscript @@ -39,6 +39,7 @@ incs = [ '../../blenkernel', '../../blenlib', '../../blenloader', + '../../blentranslation', '../../bmesh', '../../gpu', '../../imbuf', diff --git a/source/blender/editors/render/render_internal.c b/source/blender/editors/render/render_internal.c index ec3f199174d..755b8dd303d 100644 --- a/source/blender/editors/render/render_internal.c +++ b/source/blender/editors/render/render_internal.c @@ -42,7 +42,7 @@ #include "PIL_time.h" -#include "BLF_translation.h" +#include "BLT_translation.h" #include "DNA_object_types.h" #include "DNA_scene_types.h" diff --git a/source/blender/editors/render/render_shading.c b/source/blender/editors/render/render_shading.c index c451cc82592..5ccf7fc71a8 100644 --- a/source/blender/editors/render/render_shading.c +++ b/source/blender/editors/render/render_shading.c @@ -45,7 +45,7 @@ #include "BLI_listbase.h" #include "BLI_math_vector.h" -#include "BLF_translation.h" +#include "BLT_translation.h" #include "BKE_animsys.h" #include "BKE_context.h" diff --git a/source/blender/editors/screen/CMakeLists.txt b/source/blender/editors/screen/CMakeLists.txt index 413d40b9f9c..ed86ffa5e16 100644 --- a/source/blender/editors/screen/CMakeLists.txt +++ b/source/blender/editors/screen/CMakeLists.txt @@ -23,6 +23,7 @@ set(INC ../../blenfont ../../blenkernel ../../blenlib + ../../blentranslation ../../bmesh ../../gpu ../../imbuf diff --git a/source/blender/editors/screen/SConscript b/source/blender/editors/screen/SConscript index 355e3065312..5f48894c3e7 100644 --- a/source/blender/editors/screen/SConscript +++ b/source/blender/editors/screen/SConscript @@ -37,6 +37,7 @@ incs = [ '../../blenfont', '../../blenkernel', '../../blenlib', + '../../blentranslation', '../../bmesh', '../../gpu', '../../imbuf', diff --git a/source/blender/editors/screen/screen_ops.c b/source/blender/editors/screen/screen_ops.c index 1309fb103e9..e8d76197715 100644 --- a/source/blender/editors/screen/screen_ops.c +++ b/source/blender/editors/screen/screen_ops.c @@ -37,7 +37,7 @@ #include "BLI_dlrbTree.h" #include "BLI_utildefines.h" -#include "BLF_translation.h" +#include "BLT_translation.h" #include "DNA_armature_types.h" #include "DNA_lattice_types.h" diff --git a/source/blender/editors/sculpt_paint/CMakeLists.txt b/source/blender/editors/sculpt_paint/CMakeLists.txt index 0fa5f2d9837..46753df4e13 100644 --- a/source/blender/editors/sculpt_paint/CMakeLists.txt +++ b/source/blender/editors/sculpt_paint/CMakeLists.txt @@ -23,7 +23,7 @@ set(INC ../uvedit ../../blenkernel ../../blenlib - ../../blenfont + ../../blentranslation ../../bmesh ../../gpu ../../imbuf diff --git a/source/blender/editors/sculpt_paint/SConscript b/source/blender/editors/sculpt_paint/SConscript index ba20337548a..52fab472189 100644 --- a/source/blender/editors/sculpt_paint/SConscript +++ b/source/blender/editors/sculpt_paint/SConscript @@ -38,9 +38,9 @@ incs = [ '#/intern/glew-mx', '../include', '../uvedit', - '../../blenfont', '../../blenkernel', '../../blenlib', + '../../blentranslation', '../../bmesh', '../../gpu', '../../imbuf', diff --git a/source/blender/editors/sculpt_paint/paint_image_proj.c b/source/blender/editors/sculpt_paint/paint_image_proj.c index d54db048faf..33ea3ceac09 100644 --- a/source/blender/editors/sculpt_paint/paint_image_proj.c +++ b/source/blender/editors/sculpt_paint/paint_image_proj.c @@ -49,7 +49,7 @@ #include "BLI_threads.h" #include "BLI_utildefines.h" -#include "BLF_translation.h" +#include "BLT_translation.h" #include "IMB_imbuf.h" diff --git a/source/blender/editors/sculpt_paint/paint_utils.c b/source/blender/editors/sculpt_paint/paint_utils.c index c76bae01308..7b66632fa42 100644 --- a/source/blender/editors/sculpt_paint/paint_utils.c +++ b/source/blender/editors/sculpt_paint/paint_utils.c @@ -46,7 +46,7 @@ #include "BLI_listbase.h" #include "BLI_rect.h" -#include "BLF_translation.h" +#include "BLT_translation.h" #include "BKE_brush.h" #include "BKE_context.h" @@ -572,7 +572,7 @@ void BRUSH_OT_curve_preset(wmOperatorType *ot) ot->poll = brush_curve_preset_poll; prop = RNA_def_enum(ot->srna, "shape", prop_shape_items, CURVE_PRESET_SMOOTH, "Mode", ""); - RNA_def_property_translation_context(prop, BLF_I18NCONTEXT_ID_CURVE); /* Abusing id_curve :/ */ + RNA_def_property_translation_context(prop, BLT_I18NCONTEXT_ID_CURVE); /* Abusing id_curve :/ */ } diff --git a/source/blender/editors/sculpt_paint/sculpt.c b/source/blender/editors/sculpt_paint/sculpt.c index 558306773e4..3800271e0cb 100644 --- a/source/blender/editors/sculpt_paint/sculpt.c +++ b/source/blender/editors/sculpt_paint/sculpt.c @@ -41,7 +41,7 @@ #include "BLI_utildefines.h" #include "BLI_ghash.h" -#include "BLF_translation.h" +#include "BLT_translation.h" #include "DNA_customdata_types.h" #include "DNA_mesh_types.h" diff --git a/source/blender/editors/space_action/CMakeLists.txt b/source/blender/editors/space_action/CMakeLists.txt index 68e56490217..839071d1330 100644 --- a/source/blender/editors/space_action/CMakeLists.txt +++ b/source/blender/editors/space_action/CMakeLists.txt @@ -22,7 +22,7 @@ set(INC ../include ../../blenkernel ../../blenlib - ../../blenfont + ../../blentranslation ../../gpu ../../makesdna ../../makesrna diff --git a/source/blender/editors/space_action/SConscript b/source/blender/editors/space_action/SConscript index 28572f64fb8..346324e129d 100644 --- a/source/blender/editors/space_action/SConscript +++ b/source/blender/editors/space_action/SConscript @@ -39,7 +39,7 @@ incs = [ '../include', '../../blenkernel', '../../blenlib', - '../../blenfont', + '../../blentranslation', '../../gpu', '../../makesdna', '../../makesrna', diff --git a/source/blender/editors/space_action/action_data.c b/source/blender/editors/space_action/action_data.c index 6e3e456f67d..bffa9c413ae 100644 --- a/source/blender/editors/space_action/action_data.c +++ b/source/blender/editors/space_action/action_data.c @@ -38,7 +38,7 @@ #include "BLI_math.h" #include "BLI_utildefines.h" -#include "BLF_translation.h" +#include "BLT_translation.h" #include "DNA_anim_types.h" #include "DNA_gpencil_types.h" diff --git a/source/blender/editors/space_action/action_edit.c b/source/blender/editors/space_action/action_edit.c index a28b4c1a4f2..b2e046ee24b 100644 --- a/source/blender/editors/space_action/action_edit.c +++ b/source/blender/editors/space_action/action_edit.c @@ -40,7 +40,7 @@ #include "BLI_math.h" #include "BLI_utildefines.h" -#include "BLF_translation.h" +#include "BLT_translation.h" #include "DNA_anim_types.h" #include "DNA_gpencil_types.h" diff --git a/source/blender/editors/space_buttons/CMakeLists.txt b/source/blender/editors/space_buttons/CMakeLists.txt index 01a099e3701..397d79e1dbe 100644 --- a/source/blender/editors/space_buttons/CMakeLists.txt +++ b/source/blender/editors/space_buttons/CMakeLists.txt @@ -20,9 +20,9 @@ set(INC ../include - ../../blenfont ../../blenkernel ../../blenlib + ../../blentranslation ../../gpu ../../makesdna ../../makesrna diff --git a/source/blender/editors/space_buttons/SConscript b/source/blender/editors/space_buttons/SConscript index b9cba3139c2..c39df449647 100644 --- a/source/blender/editors/space_buttons/SConscript +++ b/source/blender/editors/space_buttons/SConscript @@ -34,9 +34,9 @@ incs = [ env['BF_GLEW_INC'], '#/intern/glew-mx', '../include', - '../../blenfont', '../../blenkernel', '../../blenlib', + '../../blentranslation', '../../bmesh', '../../gpu', '../../imbuf', diff --git a/source/blender/editors/space_buttons/buttons_context.c b/source/blender/editors/space_buttons/buttons_context.c index bc42f1dd5bb..42e2d6b90f0 100644 --- a/source/blender/editors/space_buttons/buttons_context.c +++ b/source/blender/editors/space_buttons/buttons_context.c @@ -36,7 +36,7 @@ #include "BLI_listbase.h" #include "BLI_utildefines.h" -#include "BLF_translation.h" +#include "BLT_translation.h" #include "DNA_armature_types.h" #include "DNA_lamp_types.h" @@ -1147,7 +1147,7 @@ void buttons_context_register(ARegionType *art) pt = MEM_callocN(sizeof(PanelType), "spacetype buttons panel context"); strcpy(pt->idname, "BUTTONS_PT_context"); strcpy(pt->label, N_("Context")); /* XXX C panels are not available through RNA (bpy.types)! */ - strcpy(pt->translation_context, BLF_I18NCONTEXT_DEFAULT_BPYRNA); + strcpy(pt->translation_context, BLT_I18NCONTEXT_DEFAULT_BPYRNA); pt->draw = buttons_panel_context; pt->flag = PNL_NO_HEADER; BLI_addtail(&art->paneltypes, pt); diff --git a/source/blender/editors/space_buttons/buttons_ops.c b/source/blender/editors/space_buttons/buttons_ops.c index 8ad4858ff22..3af1d068980 100644 --- a/source/blender/editors/space_buttons/buttons_ops.c +++ b/source/blender/editors/space_buttons/buttons_ops.c @@ -40,7 +40,7 @@ #include "BLI_path_util.h" #include "BLI_string.h" -#include "BLF_translation.h" +#include "BLT_translation.h" #include "BKE_context.h" #include "BKE_global.h" diff --git a/source/blender/editors/space_buttons/buttons_texture.c b/source/blender/editors/space_buttons/buttons_texture.c index a263f22e072..b56ff850c35 100644 --- a/source/blender/editors/space_buttons/buttons_texture.c +++ b/source/blender/editors/space_buttons/buttons_texture.c @@ -37,7 +37,7 @@ #include "BLI_string.h" #include "BLI_utildefines.h" -#include "BLF_translation.h" +#include "BLT_translation.h" #include "DNA_brush_types.h" #include "DNA_ID.h" diff --git a/source/blender/editors/space_clip/CMakeLists.txt b/source/blender/editors/space_clip/CMakeLists.txt index 4659e612b41..d17d1856502 100644 --- a/source/blender/editors/space_clip/CMakeLists.txt +++ b/source/blender/editors/space_clip/CMakeLists.txt @@ -23,9 +23,10 @@ set(INC ../include - ../../blenkernel ../../blenfont + ../../blenkernel ../../blenlib + ../../blentranslation ../../imbuf ../../gpu ../../makesdna diff --git a/source/blender/editors/space_clip/SConscript b/source/blender/editors/space_clip/SConscript index 46ad04a1478..37b83946e93 100644 --- a/source/blender/editors/space_clip/SConscript +++ b/source/blender/editors/space_clip/SConscript @@ -40,6 +40,7 @@ incs = [ '../../blenfont', '../../blenkernel', '../../blenlib', + '../../blentranslation', '../../gpu', '../../imbuf', '../../makesdna', diff --git a/source/blender/editors/space_clip/clip_buttons.c b/source/blender/editors/space_clip/clip_buttons.c index c32d06cf9b1..0378c68d12c 100644 --- a/source/blender/editors/space_clip/clip_buttons.c +++ b/source/blender/editors/space_clip/clip_buttons.c @@ -44,7 +44,7 @@ #include "BLI_path_util.h" #include "BLI_string.h" -#include "BLF_translation.h" +#include "BLT_translation.h" #include "BKE_context.h" #include "BKE_depsgraph.h" diff --git a/source/blender/editors/space_clip/clip_ops.c b/source/blender/editors/space_clip/clip_ops.c index 1d398177d9f..460bad13b8e 100644 --- a/source/blender/editors/space_clip/clip_ops.c +++ b/source/blender/editors/space_clip/clip_ops.c @@ -52,7 +52,7 @@ #include "BLI_task.h" #include "BLI_string.h" -#include "BLF_translation.h" +#include "BLT_translation.h" #include "BKE_context.h" #include "BKE_global.h" diff --git a/source/blender/editors/space_clip/clip_toolbar.c b/source/blender/editors/space_clip/clip_toolbar.c index 608c1136070..d31d7f53b30 100644 --- a/source/blender/editors/space_clip/clip_toolbar.c +++ b/source/blender/editors/space_clip/clip_toolbar.c @@ -38,7 +38,7 @@ #include "BLI_blenlib.h" #include "BLI_utildefines.h" -#include "BLF_translation.h" +#include "BLT_translation.h" #include "BKE_context.h" #include "BKE_screen.h" @@ -258,7 +258,7 @@ void ED_clip_tool_props_register(ARegionType *art) pt = MEM_callocN(sizeof(PanelType), "spacetype clip panel last operator"); strcpy(pt->idname, "CLIP_PT_last_operator"); strcpy(pt->label, N_("Operator")); - strcpy(pt->translation_context, BLF_I18NCONTEXT_DEFAULT_BPYRNA); + strcpy(pt->translation_context, BLT_I18NCONTEXT_DEFAULT_BPYRNA); pt->draw_header = clip_panel_operator_redo_header; pt->draw = clip_panel_operator_redo; BLI_addtail(&art->paneltypes, pt); diff --git a/source/blender/editors/space_clip/tracking_ops.c b/source/blender/editors/space_clip/tracking_ops.c index 91e11d30cc2..a19fa97965a 100644 --- a/source/blender/editors/space_clip/tracking_ops.c +++ b/source/blender/editors/space_clip/tracking_ops.c @@ -68,7 +68,7 @@ #include "RNA_access.h" #include "RNA_define.h" -#include "BLF_translation.h" +#include "BLT_translation.h" #include "PIL_time.h" diff --git a/source/blender/editors/space_file/CMakeLists.txt b/source/blender/editors/space_file/CMakeLists.txt index 4c33499da41..185ba24eac7 100644 --- a/source/blender/editors/space_file/CMakeLists.txt +++ b/source/blender/editors/space_file/CMakeLists.txt @@ -24,6 +24,7 @@ set(INC ../../blenkernel ../../blenlib ../../blenloader + ../../blentranslation ../../imbuf ../../gpu ../../makesdna diff --git a/source/blender/editors/space_file/SConscript b/source/blender/editors/space_file/SConscript index b37cba15281..6cb7c5a69d4 100644 --- a/source/blender/editors/space_file/SConscript +++ b/source/blender/editors/space_file/SConscript @@ -37,6 +37,7 @@ incs = [ '../../blenkernel', '../../blenlib', '../../blenloader', + '../../blentranslation', '../../gpu', '../../imbuf', '../../makesdna', diff --git a/source/blender/editors/space_file/file_draw.c b/source/blender/editors/space_file/file_draw.c index 7f96321f542..9922290bf6f 100644 --- a/source/blender/editors/space_file/file_draw.c +++ b/source/blender/editors/space_file/file_draw.c @@ -47,7 +47,7 @@ #include "BKE_global.h" #include "BKE_main.h" -#include "BLF_translation.h" +#include "BLT_translation.h" #include "IMB_imbuf_types.h" diff --git a/source/blender/editors/space_file/file_panels.c b/source/blender/editors/space_file/file_panels.c index 3da83aa6028..7acf2564fb2 100644 --- a/source/blender/editors/space_file/file_panels.c +++ b/source/blender/editors/space_file/file_panels.c @@ -34,7 +34,7 @@ #include "BKE_context.h" #include "BKE_screen.h" -#include "BLF_translation.h" +#include "BLT_translation.h" #include "DNA_screen_types.h" #include "DNA_space_types.h" @@ -100,7 +100,7 @@ void file_panels_register(ARegionType *art) pt = MEM_callocN(sizeof(PanelType), "spacetype file operator properties"); strcpy(pt->idname, "FILE_PT_operator"); strcpy(pt->label, N_("Operator")); - strcpy(pt->translation_context, BLF_I18NCONTEXT_DEFAULT_BPYRNA); + strcpy(pt->translation_context, BLT_I18NCONTEXT_DEFAULT_BPYRNA); pt->poll = file_panel_operator_poll; pt->draw_header = file_panel_operator_header; pt->draw = file_panel_operator; diff --git a/source/blender/editors/space_graph/CMakeLists.txt b/source/blender/editors/space_graph/CMakeLists.txt index b692f0b1c12..40a196fa95b 100644 --- a/source/blender/editors/space_graph/CMakeLists.txt +++ b/source/blender/editors/space_graph/CMakeLists.txt @@ -20,9 +20,9 @@ set(INC ../include - ../../blenfont ../../blenkernel ../../blenlib + ../../blentranslation ../../gpu ../../makesdna ../../makesrna diff --git a/source/blender/editors/space_graph/SConscript b/source/blender/editors/space_graph/SConscript index 216ce2de334..af17853556e 100644 --- a/source/blender/editors/space_graph/SConscript +++ b/source/blender/editors/space_graph/SConscript @@ -34,9 +34,9 @@ incs = [ env['BF_GLEW_INC'], '#/intern/glew-mx', '../include', - '../../blenfont', '../../blenkernel', '../../blenlib', + '../../blentranslation', '../../gpu', '../../imbuf', '../../makesdna', diff --git a/source/blender/editors/space_graph/graph_buttons.c b/source/blender/editors/space_graph/graph_buttons.c index ee49f2cf028..8e471ceca95 100644 --- a/source/blender/editors/space_graph/graph_buttons.c +++ b/source/blender/editors/space_graph/graph_buttons.c @@ -44,7 +44,7 @@ #include "BLI_blenlib.h" #include "BLI_utildefines.h" -#include "BLF_translation.h" +#include "BLT_translation.h" #include "BKE_context.h" #include "BKE_curve.h" @@ -929,7 +929,7 @@ void graph_buttons_register(ARegionType *art) pt = MEM_callocN(sizeof(PanelType), "spacetype graph panel view"); strcpy(pt->idname, "GRAPH_PT_view"); strcpy(pt->label, N_("View Properties")); - strcpy(pt->translation_context, BLF_I18NCONTEXT_DEFAULT_BPYRNA); + strcpy(pt->translation_context, BLT_I18NCONTEXT_DEFAULT_BPYRNA); pt->draw = graph_panel_view; pt->flag |= PNL_DEFAULT_CLOSED; BLI_addtail(&art->paneltypes, pt); @@ -937,7 +937,7 @@ void graph_buttons_register(ARegionType *art) pt = MEM_callocN(sizeof(PanelType), "spacetype graph panel properties"); strcpy(pt->idname, "GRAPH_PT_properties"); strcpy(pt->label, N_("Active F-Curve")); - strcpy(pt->translation_context, BLF_I18NCONTEXT_DEFAULT_BPYRNA); + strcpy(pt->translation_context, BLT_I18NCONTEXT_DEFAULT_BPYRNA); pt->draw = graph_panel_properties; pt->poll = graph_panel_poll; BLI_addtail(&art->paneltypes, pt); @@ -945,7 +945,7 @@ void graph_buttons_register(ARegionType *art) pt = MEM_callocN(sizeof(PanelType), "spacetype graph panel properties"); strcpy(pt->idname, "GRAPH_PT_key_properties"); strcpy(pt->label, N_("Active Keyframe")); - strcpy(pt->translation_context, BLF_I18NCONTEXT_DEFAULT_BPYRNA); + strcpy(pt->translation_context, BLT_I18NCONTEXT_DEFAULT_BPYRNA); pt->draw = graph_panel_key_properties; pt->poll = graph_panel_poll; BLI_addtail(&art->paneltypes, pt); @@ -954,7 +954,7 @@ void graph_buttons_register(ARegionType *art) pt = MEM_callocN(sizeof(PanelType), "spacetype graph panel drivers"); strcpy(pt->idname, "GRAPH_PT_drivers"); strcpy(pt->label, N_("Drivers")); - strcpy(pt->translation_context, BLF_I18NCONTEXT_DEFAULT_BPYRNA); + strcpy(pt->translation_context, BLT_I18NCONTEXT_DEFAULT_BPYRNA); pt->draw = graph_panel_drivers; pt->poll = graph_panel_drivers_poll; BLI_addtail(&art->paneltypes, pt); @@ -962,7 +962,7 @@ void graph_buttons_register(ARegionType *art) pt = MEM_callocN(sizeof(PanelType), "spacetype graph panel modifiers"); strcpy(pt->idname, "GRAPH_PT_modifiers"); strcpy(pt->label, N_("Modifiers")); - strcpy(pt->translation_context, BLF_I18NCONTEXT_DEFAULT_BPYRNA); + strcpy(pt->translation_context, BLT_I18NCONTEXT_DEFAULT_BPYRNA); pt->draw = graph_panel_modifiers; pt->poll = graph_panel_poll; BLI_addtail(&art->paneltypes, pt); diff --git a/source/blender/editors/space_graph/graph_edit.c b/source/blender/editors/space_graph/graph_edit.c index 348898b0cc6..02001491f31 100644 --- a/source/blender/editors/space_graph/graph_edit.c +++ b/source/blender/editors/space_graph/graph_edit.c @@ -52,7 +52,7 @@ #include "RNA_define.h" #include "RNA_enum_types.h" -#include "BLF_translation.h" +#include "BLT_translation.h" #include "BKE_fcurve.h" #include "BKE_global.h" diff --git a/source/blender/editors/space_image/CMakeLists.txt b/source/blender/editors/space_image/CMakeLists.txt index 30bfc2fbdfd..c60d194b620 100644 --- a/source/blender/editors/space_image/CMakeLists.txt +++ b/source/blender/editors/space_image/CMakeLists.txt @@ -23,6 +23,7 @@ set(INC ../../blenfont ../../blenkernel ../../blenlib + ../../blentranslation ../../bmesh ../../imbuf ../../gpu diff --git a/source/blender/editors/space_image/SConscript b/source/blender/editors/space_image/SConscript index 43181b437f5..95d23d177e7 100644 --- a/source/blender/editors/space_image/SConscript +++ b/source/blender/editors/space_image/SConscript @@ -37,6 +37,7 @@ incs = [ '../../blenfont', '../../blenkernel', '../../blenlib', + '../../blentranslation', '../../bmesh', '../../gpu', '../../imbuf', diff --git a/source/blender/editors/space_image/image_buttons.c b/source/blender/editors/space_image/image_buttons.c index 3aaa7c24219..579860726c6 100644 --- a/source/blender/editors/space_image/image_buttons.c +++ b/source/blender/editors/space_image/image_buttons.c @@ -38,7 +38,7 @@ #include "BLI_blenlib.h" #include "BLI_utildefines.h" -#include "BLF_translation.h" +#include "BLT_translation.h" #include "BKE_context.h" #include "BKE_image.h" diff --git a/source/blender/editors/space_image/image_ops.c b/source/blender/editors/space_image/image_ops.c index 41e1b8dee12..e94dd1d4864 100644 --- a/source/blender/editors/space_image/image_ops.c +++ b/source/blender/editors/space_image/image_ops.c @@ -46,7 +46,7 @@ #include "BLI_utildefines.h" #include "BLI_string_utf8.h" -#include "BLF_translation.h" +#include "BLT_translation.h" #include "DNA_object_types.h" #include "DNA_node_types.h" diff --git a/source/blender/editors/space_info/CMakeLists.txt b/source/blender/editors/space_info/CMakeLists.txt index 46ea251de03..96fe9322b97 100644 --- a/source/blender/editors/space_info/CMakeLists.txt +++ b/source/blender/editors/space_info/CMakeLists.txt @@ -24,6 +24,7 @@ set(INC ../../blenkernel ../../blenlib ../../blenloader + ../../blentranslation ../../imbuf ../../bmesh ../../gpu diff --git a/source/blender/editors/space_info/SConscript b/source/blender/editors/space_info/SConscript index c64e263179b..e17c39f7e38 100644 --- a/source/blender/editors/space_info/SConscript +++ b/source/blender/editors/space_info/SConscript @@ -38,6 +38,7 @@ incs = [ '../../blenkernel', '../../blenlib', '../../blenloader', + '../../blentranslation', '../../bmesh', '../../gpu', '../../imbuf', diff --git a/source/blender/editors/space_info/info_ops.c b/source/blender/editors/space_info/info_ops.c index a1f90f16bbf..8afb0cd34ea 100644 --- a/source/blender/editors/space_info/info_ops.c +++ b/source/blender/editors/space_info/info_ops.c @@ -42,7 +42,7 @@ #include "BLI_math.h" #include "BLI_utildefines.h" -#include "BLF_translation.h" +#include "BLT_translation.h" #include "BKE_bpath.h" #include "BKE_context.h" diff --git a/source/blender/editors/space_info/info_stats.c b/source/blender/editors/space_info/info_stats.c index 48a39cd79fc..dafb71b4480 100644 --- a/source/blender/editors/space_info/info_stats.c +++ b/source/blender/editors/space_info/info_stats.c @@ -41,7 +41,7 @@ #include "BLI_string.h" #include "BLI_utildefines.h" -#include "BLF_translation.h" +#include "BLT_translation.h" #include "BKE_anim.h" #include "BKE_blender.h" diff --git a/source/blender/editors/space_info/space_info.c b/source/blender/editors/space_info/space_info.c index 3bebac156a4..aeab87e6cb5 100644 --- a/source/blender/editors/space_info/space_info.c +++ b/source/blender/editors/space_info/space_info.c @@ -37,7 +37,7 @@ #include "BLI_blenlib.h" #include "BLI_utildefines.h" -#include "BLF_translation.h" +#include "BLT_translation.h" #include "BKE_context.h" #include "BKE_global.h" @@ -303,7 +303,7 @@ static void recent_files_menu_register(void) mt = MEM_callocN(sizeof(MenuType), "spacetype info menu recent files"); strcpy(mt->idname, "INFO_MT_file_open_recent"); strcpy(mt->label, N_("Open Recent...")); - strcpy(mt->translation_context, BLF_I18NCONTEXT_DEFAULT_BPYRNA); + strcpy(mt->translation_context, BLT_I18NCONTEXT_DEFAULT_BPYRNA); mt->draw = recent_files_menu_draw; WM_menutype_add(mt); } diff --git a/source/blender/editors/space_logic/CMakeLists.txt b/source/blender/editors/space_logic/CMakeLists.txt index 19525c87923..349c003cf56 100644 --- a/source/blender/editors/space_logic/CMakeLists.txt +++ b/source/blender/editors/space_logic/CMakeLists.txt @@ -21,9 +21,9 @@ set(INC ../include ../interface - ../../blenfont ../../blenkernel ../../blenlib + ../../blentranslation ../../gpu ../../makesdna ../../makesrna diff --git a/source/blender/editors/space_logic/SConscript b/source/blender/editors/space_logic/SConscript index f22a716e502..4b618710d1f 100644 --- a/source/blender/editors/space_logic/SConscript +++ b/source/blender/editors/space_logic/SConscript @@ -35,9 +35,9 @@ incs = [ '#/intern/glew-mx', '../include', '../interface', - '../../blenfont', '../../blenkernel', '../../blenlib', + '../../blentranslation', '../../gpu', '../../imbuf', '../../makesdna', diff --git a/source/blender/editors/space_logic/logic_ops.c b/source/blender/editors/space_logic/logic_ops.c index 2c6280f5670..abcb767958f 100644 --- a/source/blender/editors/space_logic/logic_ops.c +++ b/source/blender/editors/space_logic/logic_ops.c @@ -39,7 +39,7 @@ #include "BLI_blenlib.h" #include "BLI_utildefines.h" -#include "BLF_translation.h" +#include "BLT_translation.h" #include "BKE_context.h" #include "BKE_main.h" diff --git a/source/blender/editors/space_logic/logic_window.c b/source/blender/editors/space_logic/logic_window.c index e78100f3ceb..ccf8460e9a3 100644 --- a/source/blender/editors/space_logic/logic_window.c +++ b/source/blender/editors/space_logic/logic_window.c @@ -57,7 +57,7 @@ #include "ED_util.h" -#include "BLF_translation.h" +#include "BLT_translation.h" #include "UI_interface.h" #include "UI_view2d.h" @@ -1033,7 +1033,7 @@ static void draw_sensor_keyboard(uiLayout *layout, PointerRNA *ptr) uiLayout *row, *col; row = uiLayoutRow(layout, false); - uiItemL(row, CTX_IFACE_(BLF_I18NCONTEXT_ID_WINDOWMANAGER, "Key:"), ICON_NONE); + uiItemL(row, CTX_IFACE_(BLT_I18NCONTEXT_ID_WINDOWMANAGER, "Key:"), ICON_NONE); col = uiLayoutColumn(row, false); uiLayoutSetActive(col, RNA_boolean_get(ptr, "use_all_keys") == false); uiItemR(col, ptr, "key", UI_ITEM_R_EVENT, "", ICON_NONE); diff --git a/source/blender/editors/space_nla/CMakeLists.txt b/source/blender/editors/space_nla/CMakeLists.txt index ab0dfa30121..c8c64a79945 100644 --- a/source/blender/editors/space_nla/CMakeLists.txt +++ b/source/blender/editors/space_nla/CMakeLists.txt @@ -20,9 +20,9 @@ set(INC ../include - ../../blenfont ../../blenkernel ../../blenlib + ../../blentranslation ../../gpu ../../makesdna ../../makesrna diff --git a/source/blender/editors/space_nla/SConscript b/source/blender/editors/space_nla/SConscript index d37bb201b81..5bfa8d6c4c2 100644 --- a/source/blender/editors/space_nla/SConscript +++ b/source/blender/editors/space_nla/SConscript @@ -34,9 +34,9 @@ incs = [ env['BF_GLEW_INC'], '#/intern/glew-mx', '../include', - '../../blenfont', '../../blenkernel', '../../blenlib', + '../../blentranslation', '../../gpu', '../../makesdna', '../../makesrna', diff --git a/source/blender/editors/space_nla/nla_buttons.c b/source/blender/editors/space_nla/nla_buttons.c index 1fb7228dd98..8eead9b8e44 100644 --- a/source/blender/editors/space_nla/nla_buttons.c +++ b/source/blender/editors/space_nla/nla_buttons.c @@ -42,7 +42,7 @@ #include "BLI_blenlib.h" -#include "BLF_translation.h" +#include "BLT_translation.h" #include "BKE_nla.h" #include "BKE_context.h" @@ -507,7 +507,7 @@ void nla_buttons_register(ARegionType *art) pt = MEM_callocN(sizeof(PanelType), "spacetype nla panel animdata"); strcpy(pt->idname, "NLA_PT_animdata"); strcpy(pt->label, N_("Animation Data")); - strcpy(pt->translation_context, BLF_I18NCONTEXT_DEFAULT_BPYRNA); + strcpy(pt->translation_context, BLT_I18NCONTEXT_DEFAULT_BPYRNA); pt->draw = nla_panel_animdata; pt->poll = nla_animdata_panel_poll; pt->flag = PNL_DEFAULT_CLOSED; @@ -516,7 +516,7 @@ void nla_buttons_register(ARegionType *art) pt = MEM_callocN(sizeof(PanelType), "spacetype nla panel track"); strcpy(pt->idname, "NLA_PT_track"); strcpy(pt->label, N_("Active Track")); - strcpy(pt->translation_context, BLF_I18NCONTEXT_DEFAULT_BPYRNA); + strcpy(pt->translation_context, BLT_I18NCONTEXT_DEFAULT_BPYRNA); pt->draw = nla_panel_track; pt->poll = nla_track_panel_poll; BLI_addtail(&art->paneltypes, pt); @@ -524,7 +524,7 @@ void nla_buttons_register(ARegionType *art) pt = MEM_callocN(sizeof(PanelType), "spacetype nla panel properties"); strcpy(pt->idname, "NLA_PT_properties"); strcpy(pt->label, N_("Active Strip")); - strcpy(pt->translation_context, BLF_I18NCONTEXT_DEFAULT_BPYRNA); + strcpy(pt->translation_context, BLT_I18NCONTEXT_DEFAULT_BPYRNA); pt->draw = nla_panel_properties; pt->poll = nla_strip_panel_poll; BLI_addtail(&art->paneltypes, pt); @@ -532,7 +532,7 @@ void nla_buttons_register(ARegionType *art) pt = MEM_callocN(sizeof(PanelType), "spacetype nla panel properties"); strcpy(pt->idname, "NLA_PT_actionclip"); strcpy(pt->label, N_("Action Clip")); - strcpy(pt->translation_context, BLF_I18NCONTEXT_DEFAULT_BPYRNA); + strcpy(pt->translation_context, BLT_I18NCONTEXT_DEFAULT_BPYRNA); pt->draw = nla_panel_actclip; pt->poll = nla_strip_actclip_panel_poll; BLI_addtail(&art->paneltypes, pt); @@ -540,7 +540,7 @@ void nla_buttons_register(ARegionType *art) pt = MEM_callocN(sizeof(PanelType), "spacetype nla panel evaluation"); strcpy(pt->idname, "NLA_PT_evaluation"); strcpy(pt->label, N_("Evaluation")); - strcpy(pt->translation_context, BLF_I18NCONTEXT_DEFAULT_BPYRNA); + strcpy(pt->translation_context, BLT_I18NCONTEXT_DEFAULT_BPYRNA); pt->draw = nla_panel_evaluation; pt->poll = nla_strip_eval_panel_poll; BLI_addtail(&art->paneltypes, pt); @@ -548,7 +548,7 @@ void nla_buttons_register(ARegionType *art) pt = MEM_callocN(sizeof(PanelType), "spacetype nla panel modifiers"); strcpy(pt->idname, "NLA_PT_modifiers"); strcpy(pt->label, N_("Modifiers")); - strcpy(pt->translation_context, BLF_I18NCONTEXT_DEFAULT_BPYRNA); + strcpy(pt->translation_context, BLT_I18NCONTEXT_DEFAULT_BPYRNA); pt->draw = nla_panel_modifiers; pt->poll = nla_strip_eval_panel_poll; BLI_addtail(&art->paneltypes, pt); diff --git a/source/blender/editors/space_nla/nla_edit.c b/source/blender/editors/space_nla/nla_edit.c index 19e6f5a8100..f7673d86f94 100644 --- a/source/blender/editors/space_nla/nla_edit.c +++ b/source/blender/editors/space_nla/nla_edit.c @@ -43,7 +43,7 @@ #include "BLI_math.h" #include "BLI_utildefines.h" -#include "BLF_translation.h" +#include "BLT_translation.h" #include "BKE_action.h" #include "BKE_fcurve.h" diff --git a/source/blender/editors/space_node/CMakeLists.txt b/source/blender/editors/space_node/CMakeLists.txt index 34887f8388d..cde818333e4 100644 --- a/source/blender/editors/space_node/CMakeLists.txt +++ b/source/blender/editors/space_node/CMakeLists.txt @@ -23,6 +23,7 @@ set(INC ../../blenfont ../../blenkernel ../../blenlib + ../../blentranslation ../../imbuf ../../gpu ../../makesdna diff --git a/source/blender/editors/space_node/SConscript b/source/blender/editors/space_node/SConscript index a79fc8c18bd..b559b61cf5a 100644 --- a/source/blender/editors/space_node/SConscript +++ b/source/blender/editors/space_node/SConscript @@ -38,6 +38,7 @@ incs = [ '../../blenfont', '../../blenkernel', '../../blenlib', + '../../blentranslation', '../../compositor', '../../gpu', '../../imbuf', diff --git a/source/blender/editors/space_node/drawnode.c b/source/blender/editors/space_node/drawnode.c index cb4ae699454..6d87c47eadb 100644 --- a/source/blender/editors/space_node/drawnode.c +++ b/source/blender/editors/space_node/drawnode.c @@ -48,7 +48,7 @@ #include "BKE_tracking.h" #include "BLF_api.h" -#include "BLF_translation.h" +#include "BLT_translation.h" #include "BIF_gl.h" #include "BIF_glutil.h" diff --git a/source/blender/editors/space_node/node_add.c b/source/blender/editors/space_node/node_add.c index b6fa4518ed6..9790e308424 100644 --- a/source/blender/editors/space_node/node_add.c +++ b/source/blender/editors/space_node/node_add.c @@ -36,7 +36,7 @@ #include "BLI_listbase.h" #include "BLI_math.h" -#include "BLF_translation.h" +#include "BLT_translation.h" #include "BKE_context.h" #include "BKE_image.h" diff --git a/source/blender/editors/space_node/node_buttons.c b/source/blender/editors/space_node/node_buttons.c index 5b478d8bde3..52b0292b9a3 100644 --- a/source/blender/editors/space_node/node_buttons.c +++ b/source/blender/editors/space_node/node_buttons.c @@ -35,7 +35,7 @@ #include "BLI_math.h" #include "BLI_blenlib.h" -#include "BLF_translation.h" +#include "BLT_translation.h" #include "BKE_context.h" #include "BKE_global.h" @@ -186,7 +186,7 @@ void node_buttons_register(ARegionType *art) pt = MEM_callocN(sizeof(PanelType), "spacetype node panel node sockets"); strcpy(pt->idname, "NODE_PT_sockets"); strcpy(pt->label, N_("Sockets")); - strcpy(pt->translation_context, BLF_I18NCONTEXT_DEFAULT_BPYRNA); + strcpy(pt->translation_context, BLT_I18NCONTEXT_DEFAULT_BPYRNA); pt->draw = node_sockets_panel; pt->poll = node_sockets_poll; pt->flag |= PNL_DEFAULT_CLOSED; @@ -195,7 +195,7 @@ void node_buttons_register(ARegionType *art) pt = MEM_callocN(sizeof(PanelType), "spacetype node panel tree interface"); strcpy(pt->idname, "NODE_PT_node_tree_interface"); strcpy(pt->label, N_("Interface")); - strcpy(pt->translation_context, BLF_I18NCONTEXT_DEFAULT_BPYRNA); + strcpy(pt->translation_context, BLT_I18NCONTEXT_DEFAULT_BPYRNA); pt->draw = node_tree_interface_panel; pt->poll = node_tree_interface_poll; BLI_addtail(&art->paneltypes, pt); diff --git a/source/blender/editors/space_node/node_draw.c b/source/blender/editors/space_node/node_draw.c index 28afeefae0b..283457d1fc6 100644 --- a/source/blender/editors/space_node/node_draw.c +++ b/source/blender/editors/space_node/node_draw.c @@ -41,7 +41,7 @@ #include "BLI_math.h" #include "BLI_blenlib.h" -#include "BLF_translation.h" +#include "BLT_translation.h" #include "BKE_context.h" #include "BKE_depsgraph.h" diff --git a/source/blender/editors/space_node/node_group.c b/source/blender/editors/space_node/node_group.c index f1d9d4efcc6..b57f95db4e6 100644 --- a/source/blender/editors/space_node/node_group.c +++ b/source/blender/editors/space_node/node_group.c @@ -39,7 +39,7 @@ #include "BLI_listbase.h" #include "BLI_math.h" -#include "BLF_translation.h" +#include "BLT_translation.h" #include "BKE_action.h" #include "BKE_animsys.h" @@ -560,7 +560,7 @@ static int node_group_separate_exec(bContext *C, wmOperator *op) static int node_group_separate_invoke(bContext *C, wmOperator *UNUSED(op), const wmEvent *UNUSED(event)) { - uiPopupMenu *pup = UI_popup_menu_begin(C, CTX_IFACE_(BLF_I18NCONTEXT_OPERATOR_DEFAULT, "Separate"), ICON_NONE); + uiPopupMenu *pup = UI_popup_menu_begin(C, CTX_IFACE_(BLT_I18NCONTEXT_OPERATOR_DEFAULT, "Separate"), ICON_NONE); uiLayout *layout = UI_popup_menu_layout(pup); uiLayoutSetOperatorContext(layout, WM_OP_EXEC_DEFAULT); diff --git a/source/blender/editors/space_node/node_relationships.c b/source/blender/editors/space_node/node_relationships.c index 8b74c6c4808..d31d1687e5e 100644 --- a/source/blender/editors/space_node/node_relationships.c +++ b/source/blender/editors/space_node/node_relationships.c @@ -57,7 +57,7 @@ #include "UI_view2d.h" #include "UI_resources.h" -#include "BLF_translation.h" +#include "BLT_translation.h" #include "node_intern.h" /* own include */ diff --git a/source/blender/editors/space_node/node_templates.c b/source/blender/editors/space_node/node_templates.c index a7fd624d2aa..85288aa0011 100644 --- a/source/blender/editors/space_node/node_templates.c +++ b/source/blender/editors/space_node/node_templates.c @@ -35,7 +35,7 @@ #include "BLI_listbase.h" #include "BLI_string.h" -#include "BLF_translation.h" +#include "BLT_translation.h" #include "BKE_context.h" #include "BKE_global.h" diff --git a/source/blender/editors/space_outliner/CMakeLists.txt b/source/blender/editors/space_outliner/CMakeLists.txt index b716f0671bd..289d6e715e1 100644 --- a/source/blender/editors/space_outliner/CMakeLists.txt +++ b/source/blender/editors/space_outliner/CMakeLists.txt @@ -22,7 +22,7 @@ set(INC ../include ../../blenkernel ../../blenlib - ../../blenfont + ../../blentranslation ../../imbuf ../../gpu ../../makesdna diff --git a/source/blender/editors/space_outliner/SConscript b/source/blender/editors/space_outliner/SConscript index ae3e960124f..dce559a21df 100644 --- a/source/blender/editors/space_outliner/SConscript +++ b/source/blender/editors/space_outliner/SConscript @@ -37,9 +37,9 @@ incs = [ env['BF_GLEW_INC'], '#/intern/glew-mx', '../include', - '../../blenfont', '../../blenkernel', '../../blenlib', + '../../blentranslation', '../../gpu', '../../imbuf', '../../makesdna', diff --git a/source/blender/editors/space_outliner/outliner_draw.c b/source/blender/editors/space_outliner/outliner_draw.c index 420b73cee86..b3761336035 100644 --- a/source/blender/editors/space_outliner/outliner_draw.c +++ b/source/blender/editors/space_outliner/outliner_draw.c @@ -43,7 +43,7 @@ #include "BLI_utildefines.h" #include "BLI_mempool.h" -#include "BLF_translation.h" +#include "BLT_translation.h" #include "BKE_context.h" #include "BKE_deform.h" @@ -567,7 +567,7 @@ static void namebutton_cb(bContext *C, void *tsep, char *oldname) Object *ob = (Object *)tselem->id; // id = object bActionGroup *grp = te->directdata; - BLI_uniquename(&ob->pose->agroups, grp, CTX_DATA_(BLF_I18NCONTEXT_ID_ACTION, "Group"), '.', + BLI_uniquename(&ob->pose->agroups, grp, CTX_DATA_(BLT_I18NCONTEXT_ID_ACTION, "Group"), '.', offsetof(bActionGroup, name), sizeof(grp->name)); WM_event_add_notifier(C, NC_OBJECT | ND_POSE, ob); break; diff --git a/source/blender/editors/space_outliner/outliner_edit.c b/source/blender/editors/space_outliner/outliner_edit.c index 0821304abf3..1ddd25f9219 100644 --- a/source/blender/editors/space_outliner/outliner_edit.c +++ b/source/blender/editors/space_outliner/outliner_edit.c @@ -41,7 +41,7 @@ #include "BLI_utildefines.h" #include "BLI_mempool.h" -#include "BLF_translation.h" +#include "BLT_translation.h" #include "BKE_animsys.h" #include "BKE_context.h" diff --git a/source/blender/editors/space_outliner/outliner_tree.c b/source/blender/editors/space_outliner/outliner_tree.c index 7b73a694570..48a15eac337 100644 --- a/source/blender/editors/space_outliner/outliner_tree.c +++ b/source/blender/editors/space_outliner/outliner_tree.c @@ -58,7 +58,7 @@ #include "BLI_mempool.h" #include "BLI_fnmatch.h" -#include "BLF_translation.h" +#include "BLT_translation.h" #include "BKE_fcurve.h" #include "BKE_main.h" diff --git a/source/blender/editors/space_sequencer/CMakeLists.txt b/source/blender/editors/space_sequencer/CMakeLists.txt index 03d81019997..778ccf902d1 100644 --- a/source/blender/editors/space_sequencer/CMakeLists.txt +++ b/source/blender/editors/space_sequencer/CMakeLists.txt @@ -20,9 +20,9 @@ set(INC ../include - ../../blenfont ../../blenkernel ../../blenlib + ../../blentranslation ../../imbuf ../../gpu ../../makesdna diff --git a/source/blender/editors/space_sequencer/SConscript b/source/blender/editors/space_sequencer/SConscript index 32a79feac76..9c654d7a1e5 100644 --- a/source/blender/editors/space_sequencer/SConscript +++ b/source/blender/editors/space_sequencer/SConscript @@ -34,9 +34,9 @@ incs = [ env['BF_GLEW_INC'], '#/intern/glew-mx', '../include', - '../../blenfont', '../../blenkernel', '../../blenlib', + '../../blentranslation', '../../gpu', '../../imbuf', '../../makesdna', diff --git a/source/blender/editors/space_sequencer/sequencer_buttons.c b/source/blender/editors/space_sequencer/sequencer_buttons.c index 70c6da0bfb3..86d3fcbe1ac 100644 --- a/source/blender/editors/space_sequencer/sequencer_buttons.c +++ b/source/blender/editors/space_sequencer/sequencer_buttons.c @@ -34,7 +34,7 @@ #include "BLI_blenlib.h" #include "BLI_utildefines.h" -#include "BLF_translation.h" +#include "BLT_translation.h" #include "BKE_context.h" #include "BKE_screen.h" @@ -69,7 +69,7 @@ void sequencer_buttons_register(ARegionType *UNUSED(art)) pt = MEM_callocN(sizeof(PanelType), "spacetype sequencer panel gpencil"); strcpy(pt->idname, "SEQUENCER_PT_gpencil"); strcpy(pt->label, N_("Grease Pencil")); - strcpy(pt->translation_context, BLF_I18NCONTEXT_DEFAULT_BPYRNA); + strcpy(pt->translation_context, BLT_I18NCONTEXT_DEFAULT_BPYRNA); pt->draw_header = ED_gpencil_panel_standard_header; pt->draw = ED_gpencil_panel_standard; pt->poll = sequencer_grease_pencil_panel_poll; diff --git a/source/blender/editors/space_sequencer/sequencer_edit.c b/source/blender/editors/space_sequencer/sequencer_edit.c index ad7b49afc2f..3eec7944c67 100644 --- a/source/blender/editors/space_sequencer/sequencer_edit.c +++ b/source/blender/editors/space_sequencer/sequencer_edit.c @@ -41,7 +41,7 @@ #include "BLI_timecode.h" #include "BLI_utildefines.h" -#include "BLF_translation.h" +#include "BLT_translation.h" #include "DNA_scene_types.h" diff --git a/source/blender/editors/space_text/CMakeLists.txt b/source/blender/editors/space_text/CMakeLists.txt index 5367efbf84b..de85ddc40ab 100644 --- a/source/blender/editors/space_text/CMakeLists.txt +++ b/source/blender/editors/space_text/CMakeLists.txt @@ -23,6 +23,7 @@ set(INC ../../blenfont ../../blenkernel ../../blenlib + ../../blentranslation ../../gpu ../../makesdna ../../makesrna diff --git a/source/blender/editors/space_text/SConscript b/source/blender/editors/space_text/SConscript index c3518f857b6..d11671fe743 100644 --- a/source/blender/editors/space_text/SConscript +++ b/source/blender/editors/space_text/SConscript @@ -40,6 +40,7 @@ incs = [ '../../blenfont', '../../blenkernel', '../../blenlib', + '../../blentranslation', '../../gpu', '../../imbuf', '../../makesdna', diff --git a/source/blender/editors/space_text/text_header.c b/source/blender/editors/space_text/text_header.c index 92a3cce12e6..91665f1a598 100644 --- a/source/blender/editors/space_text/text_header.c +++ b/source/blender/editors/space_text/text_header.c @@ -202,12 +202,12 @@ void TEXT_OT_start_find(wmOperatorType *ot) uiPopupMenu *pup; pup = UI_popup_menu_begin(C, IFACE_("Text"), ICON_NONE); - uiItemEnumO(layout, "TEXT_OT_move", CTX_IFACE_(BLF_I18NCONTEXT_OPERATOR_DEFAULT, "Top of File"), + uiItemEnumO(layout, "TEXT_OT_move", CTX_IFACE_(BLT_I18NCONTEXT_OPERATOR_DEFAULT, "Top of File"), 0, "type", FILE_TOP); - uiItemEnumO(layout, "TEXT_OT_move", CTX_IFACE_(BLF_I18NCONTEXT_OPERATOR_DEFAULT, "Bottom of File"), + uiItemEnumO(layout, "TEXT_OT_move", CTX_IFACE_(BLT_I18NCONTEXT_OPERATOR_DEFAULT, "Bottom of File"), 0, "type", FILE_BOTTOM); - uiItemEnumO(layout, "TEXT_OT_move", CTX_IFACE_(BLF_I18NCONTEXT_OPERATOR_DEFAULT, "Page Up"), 0, "type", PREV_PAGE); - uiItemEnumO(layout, "TEXT_OT_move", CTX_IFACE_(BLF_I18NCONTEXT_OPERATOR_DEFAULT, "Page Down"), + uiItemEnumO(layout, "TEXT_OT_move", CTX_IFACE_(BLT_I18NCONTEXT_OPERATOR_DEFAULT, "Page Up"), 0, "type", PREV_PAGE); + uiItemEnumO(layout, "TEXT_OT_move", CTX_IFACE_(BLT_I18NCONTEXT_OPERATOR_DEFAULT, "Page Down"), 0, "type", NEXT_PAGE); UI_popup_menu_end(C, pup); } diff --git a/source/blender/editors/space_text/text_ops.c b/source/blender/editors/space_text/text_ops.c index fce864d975f..2d480548898 100644 --- a/source/blender/editors/space_text/text_ops.c +++ b/source/blender/editors/space_text/text_ops.c @@ -39,7 +39,7 @@ #include "BLI_blenlib.h" -#include "BLF_translation.h" +#include "BLT_translation.h" #include "PIL_time.h" @@ -1921,7 +1921,7 @@ void TEXT_OT_jump(wmOperatorType *ot) /* properties */ prop = RNA_def_int(ot->srna, "line", 1, 1, INT_MAX, "Line", "Line number to jump to", 1, 10000); - RNA_def_property_translation_context(prop, BLF_I18NCONTEXT_ID_TEXT); + RNA_def_property_translation_context(prop, BLT_I18NCONTEXT_ID_TEXT); } /******************* delete operator **********************/ diff --git a/source/blender/editors/space_view3d/CMakeLists.txt b/source/blender/editors/space_view3d/CMakeLists.txt index d8d29d63686..181a0adfd28 100644 --- a/source/blender/editors/space_view3d/CMakeLists.txt +++ b/source/blender/editors/space_view3d/CMakeLists.txt @@ -23,6 +23,7 @@ set(INC ../../blenfont ../../blenkernel ../../blenlib + ../../blentranslation ../../bmesh ../../gpu ../../imbuf diff --git a/source/blender/editors/space_view3d/SConscript b/source/blender/editors/space_view3d/SConscript index 2ec9aa7e4af..6e4e47e22a4 100644 --- a/source/blender/editors/space_view3d/SConscript +++ b/source/blender/editors/space_view3d/SConscript @@ -42,6 +42,7 @@ incs = [ '../../blenfont', '../../blenkernel', '../../blenlib', + '../../blentranslation', '../../bmesh', '../../gpu', '../../imbuf', diff --git a/source/blender/editors/space_view3d/view3d_buttons.c b/source/blender/editors/space_view3d/view3d_buttons.c index 1a6bbfe77bb..d5fd18a77db 100644 --- a/source/blender/editors/space_view3d/view3d_buttons.c +++ b/source/blender/editors/space_view3d/view3d_buttons.c @@ -45,7 +45,7 @@ #include "MEM_guardedalloc.h" -#include "BLF_translation.h" +#include "BLT_translation.h" #include "BLI_math.h" #include "BLI_blenlib.h" @@ -1178,7 +1178,7 @@ void view3d_buttons_register(ARegionType *art) pt = MEM_callocN(sizeof(PanelType), "spacetype view3d panel object"); strcpy(pt->idname, "VIEW3D_PT_transform"); strcpy(pt->label, N_("Transform")); /* XXX C panels not available through RNA (bpy.types)! */ - strcpy(pt->translation_context, BLF_I18NCONTEXT_DEFAULT_BPYRNA); + strcpy(pt->translation_context, BLT_I18NCONTEXT_DEFAULT_BPYRNA); pt->draw = view3d_panel_transform; pt->poll = view3d_panel_transform_poll; BLI_addtail(&art->paneltypes, pt); @@ -1186,7 +1186,7 @@ void view3d_buttons_register(ARegionType *art) pt = MEM_callocN(sizeof(PanelType), "spacetype view3d panel vgroup"); strcpy(pt->idname, "VIEW3D_PT_vgroup"); strcpy(pt->label, N_("Vertex Weights")); /* XXX C panels are not available through RNA (bpy.types)! */ - strcpy(pt->translation_context, BLF_I18NCONTEXT_DEFAULT_BPYRNA); + strcpy(pt->translation_context, BLT_I18NCONTEXT_DEFAULT_BPYRNA); pt->draw = view3d_panel_vgroup; pt->poll = view3d_panel_vgroup_poll; BLI_addtail(&art->paneltypes, pt); diff --git a/source/blender/editors/space_view3d/view3d_draw.c b/source/blender/editors/space_view3d/view3d_draw.c index 7f553fe8836..9fb7bce9372 100644 --- a/source/blender/editors/space_view3d/view3d_draw.c +++ b/source/blender/editors/space_view3d/view3d_draw.c @@ -80,7 +80,7 @@ #include "WM_api.h" #include "BLF_api.h" -#include "BLF_translation.h" +#include "BLT_translation.h" #include "ED_armature.h" #include "ED_keyframing.h" diff --git a/source/blender/editors/space_view3d/view3d_fly.c b/source/blender/editors/space_view3d/view3d_fly.c index 6a020251fca..e6910cf9303 100644 --- a/source/blender/editors/space_view3d/view3d_fly.c +++ b/source/blender/editors/space_view3d/view3d_fly.c @@ -39,7 +39,7 @@ #include "BKE_context.h" #include "BKE_report.h" -#include "BLF_translation.h" +#include "BLT_translation.h" #include "BIF_gl.h" diff --git a/source/blender/editors/space_view3d/view3d_header.c b/source/blender/editors/space_view3d/view3d_header.c index f8912345e1c..42895a7530b 100644 --- a/source/blender/editors/space_view3d/view3d_header.c +++ b/source/blender/editors/space_view3d/view3d_header.c @@ -37,7 +37,7 @@ #include "BLI_utildefines.h" -#include "BLF_translation.h" +#include "BLT_translation.h" #include "BKE_context.h" #include "BKE_depsgraph.h" diff --git a/source/blender/editors/space_view3d/view3d_toolbar.c b/source/blender/editors/space_view3d/view3d_toolbar.c index af24a99a6f2..065c336d001 100644 --- a/source/blender/editors/space_view3d/view3d_toolbar.c +++ b/source/blender/editors/space_view3d/view3d_toolbar.c @@ -43,7 +43,7 @@ #include "BLI_utildefines.h" #include "BLI_ghash.h" -#include "BLF_translation.h" +#include "BLT_translation.h" #include "BKE_context.h" #include "BKE_screen.h" @@ -234,7 +234,7 @@ void view3d_toolshelf_register(ARegionType *art) pt = MEM_callocN(sizeof(PanelType), "spacetype view3d panel tools"); strcpy(pt->idname, "VIEW3D_PT_tool_shelf"); strcpy(pt->label, N_("Tool Shelf")); - strcpy(pt->translation_context, BLF_I18NCONTEXT_DEFAULT_BPYRNA); + strcpy(pt->translation_context, BLT_I18NCONTEXT_DEFAULT_BPYRNA); pt->draw = view3d_panel_tool_shelf; BLI_addtail(&art->paneltypes, pt); } @@ -246,7 +246,7 @@ void view3d_tool_props_register(ARegionType *art) pt = MEM_callocN(sizeof(PanelType), "spacetype view3d panel last operator"); strcpy(pt->idname, "VIEW3D_PT_last_operator"); strcpy(pt->label, N_("Operator")); - strcpy(pt->translation_context, BLF_I18NCONTEXT_DEFAULT_BPYRNA); + strcpy(pt->translation_context, BLT_I18NCONTEXT_DEFAULT_BPYRNA); pt->draw_header = view3d_panel_operator_redo_header; pt->draw = view3d_panel_operator_redo; BLI_addtail(&art->paneltypes, pt); diff --git a/source/blender/editors/space_view3d/view3d_walk.c b/source/blender/editors/space_view3d/view3d_walk.c index 243c6e5c8c3..e2bb3660332 100644 --- a/source/blender/editors/space_view3d/view3d_walk.c +++ b/source/blender/editors/space_view3d/view3d_walk.c @@ -38,7 +38,7 @@ #include "BKE_context.h" #include "BKE_report.h" -#include "BLF_translation.h" +#include "BLT_translation.h" #include "BIF_gl.h" diff --git a/source/blender/editors/transform/CMakeLists.txt b/source/blender/editors/transform/CMakeLists.txt index 0bc38f81dd7..42aa6a0a3a3 100644 --- a/source/blender/editors/transform/CMakeLists.txt +++ b/source/blender/editors/transform/CMakeLists.txt @@ -23,6 +23,7 @@ set(INC ../../blenfont ../../blenkernel ../../blenlib + ../../blentranslation ../../bmesh ../../gpu ../../ikplugin diff --git a/source/blender/editors/transform/SConscript b/source/blender/editors/transform/SConscript index 823e94bd0ae..0f34ce546de 100644 --- a/source/blender/editors/transform/SConscript +++ b/source/blender/editors/transform/SConscript @@ -37,6 +37,7 @@ incs = [ '../../blenfont', '../../blenkernel', '../../blenlib', + '../../blentranslation', '../../bmesh', '../../gpu', '../../ikplugin', diff --git a/source/blender/editors/transform/transform.c b/source/blender/editors/transform/transform.c index a889faba9a4..3f9077421b1 100644 --- a/source/blender/editors/transform/transform.c +++ b/source/blender/editors/transform/transform.c @@ -86,7 +86,7 @@ #include "RNA_access.h" #include "BLF_api.h" -#include "BLF_translation.h" +#include "BLT_translation.h" #include "transform.h" diff --git a/source/blender/editors/transform/transform_constraints.c b/source/blender/editors/transform/transform_constraints.c index b546ff9449c..9f4d53f1f22 100644 --- a/source/blender/editors/transform/transform_constraints.c +++ b/source/blender/editors/transform/transform_constraints.c @@ -53,7 +53,7 @@ #include "ED_image.h" #include "ED_view3d.h" -#include "BLF_translation.h" +#include "BLT_translation.h" #include "UI_resources.h" diff --git a/source/blender/editors/transform/transform_generics.c b/source/blender/editors/transform/transform_generics.c index d57d4fb3ca8..74dbc09ace1 100644 --- a/source/blender/editors/transform/transform_generics.c +++ b/source/blender/editors/transform/transform_generics.c @@ -57,7 +57,7 @@ #include "BLI_rand.h" #include "BLI_utildefines.h" -#include "BLF_translation.h" +#include "BLT_translation.h" #include "RNA_access.h" diff --git a/source/blender/editors/transform/transform_ops.c b/source/blender/editors/transform/transform_ops.c index 013e47886eb..4c8eda447d4 100644 --- a/source/blender/editors/transform/transform_ops.c +++ b/source/blender/editors/transform/transform_ops.c @@ -33,7 +33,7 @@ #include "BLI_math.h" #include "BLI_utildefines.h" -#include "BLF_translation.h" +#include "BLT_translation.h" #include "BKE_context.h" #include "BKE_global.h" @@ -527,7 +527,7 @@ void Transform_Properties(struct wmOperatorType *ot, int flags) RNA_def_enum(ot->srna, "proportional", proportional_editing_items, 0, "Proportional Editing", ""); prop = RNA_def_enum(ot->srna, "proportional_edit_falloff", proportional_falloff_items, 0, "Proportional Editing Falloff", "Falloff type for proportional editing mode"); - RNA_def_property_translation_context(prop, BLF_I18NCONTEXT_ID_CURVE); /* Abusing id_curve :/ */ + RNA_def_property_translation_context(prop, BLT_I18NCONTEXT_ID_CURVE); /* Abusing id_curve :/ */ RNA_def_float(ot->srna, "proportional_size", 1, 0.00001f, FLT_MAX, "Proportional Size", "", 0.001, 100); } diff --git a/source/blender/editors/transform/transform_orientations.c b/source/blender/editors/transform/transform_orientations.c index c49e8675b50..bab6bfd611f 100644 --- a/source/blender/editors/transform/transform_orientations.c +++ b/source/blender/editors/transform/transform_orientations.c @@ -52,7 +52,7 @@ #include "BKE_main.h" #include "BKE_screen.h" -#include "BLF_translation.h" +#include "BLT_translation.h" #include "ED_armature.h" @@ -85,7 +85,7 @@ static bool uniqueOrientationNameCheck(void *arg, const char *name) static void uniqueOrientationName(ListBase *lb, char *name) { - BLI_uniquename_cb(uniqueOrientationNameCheck, lb, CTX_DATA_(BLF_I18NCONTEXT_ID_SCENE, "Space"), '.', name, + BLI_uniquename_cb(uniqueOrientationNameCheck, lb, CTX_DATA_(BLT_I18NCONTEXT_ID_SCENE, "Space"), '.', name, sizeof(((TransformOrientation *)NULL)->name)); } diff --git a/source/blender/editors/util/CMakeLists.txt b/source/blender/editors/util/CMakeLists.txt index 47894e1bc1f..7de788dca56 100644 --- a/source/blender/editors/util/CMakeLists.txt +++ b/source/blender/editors/util/CMakeLists.txt @@ -20,9 +20,9 @@ set(INC ../include - ../../blenfont ../../blenkernel ../../blenlib + ../../blentranslation ../../bmesh ../../imbuf ../../gpu diff --git a/source/blender/editors/util/SConscript b/source/blender/editors/util/SConscript index 8162f955464..7d9991e6483 100644 --- a/source/blender/editors/util/SConscript +++ b/source/blender/editors/util/SConscript @@ -37,9 +37,9 @@ incs = [ env['BF_GLEW_INC'], '#/intern/glew-mx', '../include', - '../../blenfont', '../../blenkernel', '../../blenlib', + '../../blentranslation', '../../bmesh', '../../gpu', '../../makesdna', diff --git a/source/blender/editors/util/ed_util.c b/source/blender/editors/util/ed_util.c index 433c7603f35..802c4e796dd 100644 --- a/source/blender/editors/util/ed_util.c +++ b/source/blender/editors/util/ed_util.c @@ -49,7 +49,7 @@ #include "BIF_gl.h" #include "BIF_glutil.h" -#include "BLF_translation.h" +#include "BLT_translation.h" #include "BKE_context.h" #include "BKE_global.h" diff --git a/source/blender/editors/util/undo.c b/source/blender/editors/util/undo.c index ee6101d2952..cd68df52ed4 100644 --- a/source/blender/editors/util/undo.c +++ b/source/blender/editors/util/undo.c @@ -40,7 +40,7 @@ #include "BLI_utildefines.h" -#include "BLF_translation.h" +#include "BLT_translation.h" #include "BKE_blender.h" #include "BKE_context.h" diff --git a/source/blender/editors/uvedit/CMakeLists.txt b/source/blender/editors/uvedit/CMakeLists.txt index 74ba1672485..a90763eed4e 100644 --- a/source/blender/editors/uvedit/CMakeLists.txt +++ b/source/blender/editors/uvedit/CMakeLists.txt @@ -22,7 +22,7 @@ set(INC ../include ../../blenkernel ../../blenlib - ../../blenfont + ../../blentranslation ../../bmesh ../../gpu ../../makesdna diff --git a/source/blender/editors/uvedit/SConscript b/source/blender/editors/uvedit/SConscript index 501240ca4de..b5cccab4002 100644 --- a/source/blender/editors/uvedit/SConscript +++ b/source/blender/editors/uvedit/SConscript @@ -38,9 +38,9 @@ incs = [ '#/intern/glew-mx', '#/intern/opennl/extern', '../include', - '../../blenfont', '../../blenkernel', '../../blenlib', + '../../blentranslation', '../../bmesh', '../../gpu', '../../makesdna', diff --git a/source/blender/editors/uvedit/uvedit_buttons.c b/source/blender/editors/uvedit/uvedit_buttons.c index 0d8dd2369d8..ab415c0cb83 100644 --- a/source/blender/editors/uvedit/uvedit_buttons.c +++ b/source/blender/editors/uvedit/uvedit_buttons.c @@ -42,7 +42,7 @@ #include "BLI_math.h" #include "BLI_utildefines.h" -#include "BLF_translation.h" +#include "BLT_translation.h" #include "BKE_context.h" #include "BKE_customdata.h" diff --git a/source/blender/editors/uvedit/uvedit_ops.c b/source/blender/editors/uvedit/uvedit_ops.c index f9816b9716e..71d557f6fc7 100644 --- a/source/blender/editors/uvedit/uvedit_ops.c +++ b/source/blender/editors/uvedit/uvedit_ops.c @@ -53,7 +53,7 @@ #include "BLI_blenlib.h" #include "BLI_array.h" -#include "BLF_translation.h" +#include "BLT_translation.h" #include "BKE_context.h" #include "BKE_customdata.h" @@ -4193,8 +4193,8 @@ static int uv_mark_seam_invoke(bContext *C, wmOperator *op, const wmEvent *UNUSE layout = UI_popup_menu_layout(pup); uiLayoutSetOperatorContext(layout, WM_OP_EXEC_DEFAULT); - uiItemBooleanO(layout, CTX_IFACE_(BLF_I18NCONTEXT_OPERATOR_DEFAULT, "Mark Seam"), ICON_NONE, op->type->idname, "clear", false); - uiItemBooleanO(layout, CTX_IFACE_(BLF_I18NCONTEXT_OPERATOR_DEFAULT, "Clear Seam"), ICON_NONE, op->type->idname, "clear", true); + uiItemBooleanO(layout, CTX_IFACE_(BLT_I18NCONTEXT_OPERATOR_DEFAULT, "Mark Seam"), ICON_NONE, op->type->idname, "clear", false); + uiItemBooleanO(layout, CTX_IFACE_(BLT_I18NCONTEXT_OPERATOR_DEFAULT, "Clear Seam"), ICON_NONE, op->type->idname, "clear", true); UI_popup_menu_end(C, pup); diff --git a/source/blender/imbuf/intern/thumbs_font.c b/source/blender/imbuf/intern/thumbs_font.c index 4b024f3c51b..7715e1bc470 100644 --- a/source/blender/imbuf/intern/thumbs_font.c +++ b/source/blender/imbuf/intern/thumbs_font.c @@ -37,7 +37,7 @@ /* XXX, bad level call */ #include "../../blenfont/BLF_api.h" -#include "../../blenfont/BLF_translation.h" /* 'N_' macro and BLF_lang_get()... */ +#include "../../blentranslation/BLT_translation.h" static const char *thumb_str[] = { N_("AaBbCc"), @@ -89,7 +89,7 @@ bool IMB_thumb_load_font_get_hash(char *r_hash) len += BLI_strncpy_rlen(str + len, THUMB_DEFAULT_HASH, sizeof(buf) - len); for (i = 0; (i < draw_str_lines) && (len < sizeof(buf)); i++) { - len += BLI_strncpy_rlen(str + len, BLF_translate_do(BLF_I18NCONTEXT_DEFAULT, thumb_str[i]), sizeof(buf) - len); + len += BLI_strncpy_rlen(str + len, BLT_translate_do(BLT_I18NCONTEXT_DEFAULT, thumb_str[i]), sizeof(buf) - len); } BLI_hash_md5_buffer(str, len, digest); diff --git a/source/blender/makesrna/SConscript b/source/blender/makesrna/SConscript index e9f937cb939..260784788db 100644 --- a/source/blender/makesrna/SConscript +++ b/source/blender/makesrna/SConscript @@ -45,6 +45,7 @@ incs = [ '../blenfont', '../blenkernel', '../blenlib', + '../blentranslation', '../bmesh', '../depsgraph', '../editors/include', diff --git a/source/blender/makesrna/intern/CMakeLists.txt b/source/blender/makesrna/intern/CMakeLists.txt index 3ebce1a7af0..b34763e0ae8 100644 --- a/source/blender/makesrna/intern/CMakeLists.txt +++ b/source/blender/makesrna/intern/CMakeLists.txt @@ -315,10 +315,11 @@ endif() blender_include_dirs( . .. + ../../blenfont ../../blenkernel ../../blenlib ../../bmesh - ../../blenfont + ../../blentranslation ../../depsgraph ../../gpu ../../imbuf diff --git a/source/blender/makesrna/intern/SConscript b/source/blender/makesrna/intern/SConscript index 4cb2a584240..e8842ae2943 100644 --- a/source/blender/makesrna/intern/SConscript +++ b/source/blender/makesrna/intern/SConscript @@ -65,6 +65,7 @@ incs = [ '../../blenfont', '../../blenkernel', '../../blenlib', + '../../blentranslation', '../../bmesh', '../../depsgraph', '../../editors/include', diff --git a/source/blender/makesrna/intern/rna_access.c b/source/blender/makesrna/intern/rna_access.c index 7b3049228e4..41bb0386ce6 100644 --- a/source/blender/makesrna/intern/rna_access.c +++ b/source/blender/makesrna/intern/rna_access.c @@ -43,7 +43,7 @@ #include "BLI_math.h" #include "BLF_api.h" -#include "BLF_translation.h" +#include "BLT_translation.h" #include "BKE_animsys.h" #include "BKE_context.h" @@ -1256,9 +1256,9 @@ static void property_enum_translate(PropertyRNA *prop, EnumPropertyItem **r_item if (!(prop->flag & PROP_ENUM_NO_TRANSLATE)) { int i; - /* Note: Only do those tests once, and then use BLF_pgettext. */ - bool do_iface = BLF_translate_iface(); - bool do_tooltip = BLF_translate_tooltips(); + /* Note: Only do those tests once, and then use BLT_pgettext. */ + bool do_iface = BLT_translate_iface(); + bool do_tooltip = BLT_translate_tooltips(); EnumPropertyItem *nitem; if (!(do_iface || do_tooltip)) @@ -1289,10 +1289,10 @@ static void property_enum_translate(PropertyRNA *prop, EnumPropertyItem **r_item for (i = 0; nitem[i].identifier; i++) { if (nitem[i].name && do_iface) { - nitem[i].name = BLF_pgettext(prop->translation_context, nitem[i].name); + nitem[i].name = BLT_pgettext(prop->translation_context, nitem[i].name); } if (nitem[i].description && do_tooltip) { - nitem[i].description = BLF_pgettext(NULL, nitem[i].description); + nitem[i].description = BLT_pgettext(NULL, nitem[i].description); } } @@ -1505,8 +1505,8 @@ bool RNA_property_enum_name_gettexted(bContext *C, PointerRNA *ptr, PropertyRNA if (result) { if (!(prop->flag & PROP_ENUM_NO_TRANSLATE)) { - if (BLF_translate_iface()) { - *name = BLF_pgettext(prop->translation_context, *name); + if (BLT_translate_iface()) { + *name = BLT_pgettext(prop->translation_context, *name); } } } diff --git a/source/blender/makesrna/intern/rna_actuator.c b/source/blender/makesrna/intern/rna_actuator.c index 83a6d728d80..5dba21dda40 100644 --- a/source/blender/makesrna/intern/rna_actuator.c +++ b/source/blender/makesrna/intern/rna_actuator.c @@ -35,7 +35,7 @@ #include "BLI_utildefines.h" #include "BLI_math.h" -#include "BLF_translation.h" +#include "BLT_translation.h" #include "RNA_define.h" #include "RNA_access.h" @@ -999,13 +999,13 @@ static void rna_def_sound_actuator(BlenderRNA *brna) RNA_def_property_ui_range(prop, 0.0, 1.0, 1, 2); RNA_def_property_range(prop, 0.0, 2.0); RNA_def_property_ui_text(prop, "Volume", "Initial volume of the sound"); - RNA_def_property_translation_context(prop, BLF_I18NCONTEXT_ID_SOUND); + RNA_def_property_translation_context(prop, BLT_I18NCONTEXT_ID_SOUND); RNA_def_property_update(prop, NC_LOGIC, NULL); prop = RNA_def_property(srna, "pitch", PROP_FLOAT, PROP_NONE); RNA_def_property_ui_range(prop, -12.0, 12.0, 1, 2); RNA_def_property_ui_text(prop, "Pitch", "Pitch of the sound"); - RNA_def_property_translation_context(prop, BLF_I18NCONTEXT_ID_SOUND); + RNA_def_property_translation_context(prop, BLT_I18NCONTEXT_ID_SOUND); RNA_def_property_update(prop, NC_LOGIC, NULL); /* floats - 3D Parameters */ diff --git a/source/blender/makesrna/intern/rna_constraint.c b/source/blender/makesrna/intern/rna_constraint.c index abc489bb9b0..6dac2e27f9c 100644 --- a/source/blender/makesrna/intern/rna_constraint.c +++ b/source/blender/makesrna/intern/rna_constraint.c @@ -28,7 +28,7 @@ #include "BLI_math.h" -#include "BLF_translation.h" +#include "BLT_translation.h" #include "DNA_action_types.h" #include "DNA_constraint_types.h" diff --git a/source/blender/makesrna/intern/rna_controller.c b/source/blender/makesrna/intern/rna_controller.c index 605e28653f9..1a0f3c30b03 100644 --- a/source/blender/makesrna/intern/rna_controller.c +++ b/source/blender/makesrna/intern/rna_controller.c @@ -31,7 +31,7 @@ #include "BLI_utildefines.h" -#include "BLF_translation.h" +#include "BLT_translation.h" #include "RNA_define.h" #include "RNA_enum_types.h" diff --git a/source/blender/makesrna/intern/rna_curve.c b/source/blender/makesrna/intern/rna_curve.c index fc028a46b78..cb577c9c97d 100644 --- a/source/blender/makesrna/intern/rna_curve.c +++ b/source/blender/makesrna/intern/rna_curve.c @@ -34,7 +34,7 @@ #include "BLI_utildefines.h" #include "BLI_math.h" -#include "BLF_translation.h" +#include "BLT_translation.h" #include "BKE_font.h" diff --git a/source/blender/makesrna/intern/rna_define.c b/source/blender/makesrna/intern/rna_define.c index a239bf3ae4c..95bd4bca8e6 100644 --- a/source/blender/makesrna/intern/rna_define.c +++ b/source/blender/makesrna/intern/rna_define.c @@ -42,7 +42,7 @@ #include "BLI_listbase.h" #include "BLI_ghash.h" -#include "BLF_translation.h" +#include "BLT_translation.h" #include "RNA_define.h" @@ -736,7 +736,7 @@ StructRNA *RNA_def_struct_ptr(BlenderRNA *brna, const char *identifier, StructRN srna->name = identifier; /* may be overwritten later RNA_def_struct_ui_text */ srna->description = ""; /* may be overwritten later RNA_def_struct_translation_context */ - srna->translation_context = BLF_I18NCONTEXT_DEFAULT_BPYRNA; + srna->translation_context = BLT_I18NCONTEXT_DEFAULT_BPYRNA; srna->flag |= STRUCT_UNDO; if (!srnafrom) srna->icon = ICON_DOT; @@ -984,7 +984,7 @@ void RNA_def_struct_ui_icon(StructRNA *srna, int icon) void RNA_def_struct_translation_context(StructRNA *srna, const char *context) { - srna->translation_context = context ? context : BLF_I18NCONTEXT_DEFAULT_BPYRNA; + srna->translation_context = context ? context : BLT_I18NCONTEXT_DEFAULT_BPYRNA; } /* Property Definition */ @@ -1113,7 +1113,7 @@ PropertyRNA *RNA_def_property(StructOrFunctionRNA *cont_, const char *identifier prop->subtype = subtype; prop->name = identifier; prop->description = ""; - prop->translation_context = BLF_I18NCONTEXT_DEFAULT_BPYRNA; + prop->translation_context = BLT_I18NCONTEXT_DEFAULT_BPYRNA; /* a priori not raw editable */ prop->rawtype = -1; @@ -2106,7 +2106,7 @@ void RNA_def_property_collection_sdna(PropertyRNA *prop, const char *structname, void RNA_def_property_translation_context(PropertyRNA *prop, const char *context) { - prop->translation_context = context ? context : BLF_I18NCONTEXT_DEFAULT_BPYRNA; + prop->translation_context = context ? context : BLT_I18NCONTEXT_DEFAULT_BPYRNA; } /* Functions */ diff --git a/source/blender/makesrna/intern/rna_gpencil.c b/source/blender/makesrna/intern/rna_gpencil.c index 7d7df0f91a7..333220146d6 100644 --- a/source/blender/makesrna/intern/rna_gpencil.c +++ b/source/blender/makesrna/intern/rna_gpencil.c @@ -33,7 +33,7 @@ #include "BLI_utildefines.h" -#include "BLF_translation.h" +#include "BLT_translation.h" #include "RNA_access.h" #include "RNA_define.h" diff --git a/source/blender/makesrna/intern/rna_key.c b/source/blender/makesrna/intern/rna_key.c index 04cba835ae2..c25566b6e33 100644 --- a/source/blender/makesrna/intern/rna_key.c +++ b/source/blender/makesrna/intern/rna_key.c @@ -35,7 +35,7 @@ #include "BLI_utildefines.h" -#include "BLF_translation.h" +#include "BLT_translation.h" #include "RNA_access.h" #include "RNA_define.h" @@ -83,7 +83,7 @@ static void rna_ShapeKey_name_set(PointerRNA *ptr, const char *value) /* make sure the name is truly unique */ if (ptr->id.data) { Key *key = rna_ShapeKey_find_key(ptr->id.data); - BLI_uniquename(&key->block, kb, CTX_DATA_(BLF_I18NCONTEXT_ID_SHAPEKEY, "Key"), '.', + BLI_uniquename(&key->block, kb, CTX_DATA_(BLT_I18NCONTEXT_ID_SHAPEKEY, "Key"), '.', offsetof(KeyBlock, name), sizeof(kb->name)); } diff --git a/source/blender/makesrna/intern/rna_lamp.c b/source/blender/makesrna/intern/rna_lamp.c index 6140a34b271..3cd51f5d66f 100644 --- a/source/blender/makesrna/intern/rna_lamp.c +++ b/source/blender/makesrna/intern/rna_lamp.c @@ -30,7 +30,7 @@ #include "BLI_math_base.h" #include "BLI_math_rotation.h" -#include "BLF_translation.h" +#include "BLT_translation.h" #include "RNA_define.h" #include "RNA_enum_types.h" @@ -349,7 +349,7 @@ static void rna_def_lamp(BlenderRNA *brna) prop = RNA_def_property(srna, "type", PROP_ENUM, PROP_NONE); RNA_def_property_enum_items(prop, lamp_type_items); RNA_def_property_ui_text(prop, "Type", "Type of Lamp"); - RNA_def_property_translation_context(prop, BLF_I18NCONTEXT_ID_LAMP); + RNA_def_property_translation_context(prop, BLT_I18NCONTEXT_ID_LAMP); RNA_def_property_update(prop, 0, "rna_Lamp_draw_update"); prop = RNA_def_property(srna, "distance", PROP_FLOAT, PROP_DISTANCE); diff --git a/source/blender/makesrna/intern/rna_main_api.c b/source/blender/makesrna/intern/rna_main_api.c index 8b5ed66e217..9ccff3eb1fa 100644 --- a/source/blender/makesrna/intern/rna_main_api.c +++ b/source/blender/makesrna/intern/rna_main_api.c @@ -107,7 +107,7 @@ #include "ED_screen.h" -#include "BLF_translation.h" +#include "BLT_translation.h" #ifdef WITH_PYTHON # include "BPY_extern.h" diff --git a/source/blender/makesrna/intern/rna_mask.c b/source/blender/makesrna/intern/rna_mask.c index b660236ea4f..1a8cea143a1 100644 --- a/source/blender/makesrna/intern/rna_mask.c +++ b/source/blender/makesrna/intern/rna_mask.c @@ -35,7 +35,7 @@ #include "DNA_object_types.h" /* SELECT */ #include "DNA_scene_types.h" -#include "BLF_translation.h" +#include "BLT_translation.h" #include "BKE_movieclip.h" #include "BKE_tracking.h" @@ -976,7 +976,7 @@ static void rna_def_mask_layer(BlenderRNA *brna) RNA_def_property_enum_sdna(prop, NULL, "falloff"); RNA_def_property_enum_items(prop, proportional_falloff_curve_only_items); RNA_def_property_ui_text(prop, "Falloff", "Falloff type the feather"); - RNA_def_property_translation_context(prop, BLF_I18NCONTEXT_ID_CURVE); /* Abusing id_curve :/ */ + RNA_def_property_translation_context(prop, BLT_I18NCONTEXT_ID_CURVE); /* Abusing id_curve :/ */ RNA_def_property_update(prop, NC_MASK | NA_EDITED, NULL); /* filling options */ diff --git a/source/blender/makesrna/intern/rna_modifier.c b/source/blender/makesrna/intern/rna_modifier.c index c6f1eca3e47..ff8c4d02706 100644 --- a/source/blender/makesrna/intern/rna_modifier.c +++ b/source/blender/makesrna/intern/rna_modifier.c @@ -40,7 +40,7 @@ #include "BLI_math.h" -#include "BLF_translation.h" +#include "BLT_translation.h" #include "BKE_animsys.h" #include "BKE_data_transfer.h" @@ -1194,7 +1194,7 @@ static void rna_def_modifier_warp(BlenderRNA *brna) prop = RNA_def_property(srna, "falloff_type", PROP_ENUM, PROP_NONE); RNA_def_property_enum_items(prop, modifier_warp_falloff_items); RNA_def_property_ui_text(prop, "Falloff Type", ""); - RNA_def_property_translation_context(prop, BLF_I18NCONTEXT_ID_CURVE); /* Abusing id_curve :/ */ + RNA_def_property_translation_context(prop, BLT_I18NCONTEXT_ID_CURVE); /* Abusing id_curve :/ */ RNA_def_property_update(prop, 0, "rna_Modifier_update"); prop = RNA_def_property(srna, "falloff_radius", PROP_FLOAT, PROP_UNSIGNED | PROP_DISTANCE); @@ -1740,7 +1740,7 @@ static void rna_def_modifier_hook(BlenderRNA *brna) prop = RNA_def_property(srna, "falloff_type", PROP_ENUM, PROP_NONE); RNA_def_property_enum_items(prop, modifier_warp_falloff_items); /* share the enum */ RNA_def_property_ui_text(prop, "Falloff Type", ""); - RNA_def_property_translation_context(prop, BLF_I18NCONTEXT_ID_CURVE); /* Abusing id_curve :/ */ + RNA_def_property_translation_context(prop, BLT_I18NCONTEXT_ID_CURVE); /* Abusing id_curve :/ */ RNA_def_property_update(prop, 0, "rna_Modifier_update"); prop = RNA_def_property(srna, "falloff_radius", PROP_FLOAT, PROP_DISTANCE); @@ -3472,7 +3472,7 @@ static void rna_def_modifier_weightvgedit(BlenderRNA *brna) prop = RNA_def_property(srna, "falloff_type", PROP_ENUM, PROP_NONE); RNA_def_property_enum_items(prop, weightvg_edit_falloff_type_items); RNA_def_property_ui_text(prop, "Falloff Type", "How weights are mapped to their new values"); - RNA_def_property_translation_context(prop, BLF_I18NCONTEXT_ID_CURVE); /* Abusing id_curve :/ */ + RNA_def_property_translation_context(prop, BLT_I18NCONTEXT_ID_CURVE); /* Abusing id_curve :/ */ RNA_def_property_update(prop, 0, "rna_Modifier_update"); prop = RNA_def_property(srna, "use_add", PROP_BOOLEAN, PROP_NONE); @@ -3678,7 +3678,7 @@ static void rna_def_modifier_weightvgproximity(BlenderRNA *brna) prop = RNA_def_property(srna, "falloff_type", PROP_ENUM, PROP_NONE); RNA_def_property_enum_items(prop, weightvg_proximity_falloff_type_items); RNA_def_property_ui_text(prop, "Falloff Type", "How weights are mapped to their new values"); - RNA_def_property_translation_context(prop, BLF_I18NCONTEXT_ID_CURVE); /* Abusing id_curve :/ */ + RNA_def_property_translation_context(prop, BLT_I18NCONTEXT_ID_CURVE); /* Abusing id_curve :/ */ RNA_def_property_update(prop, 0, "rna_Modifier_update"); /* Common masking properties. */ diff --git a/source/blender/makesrna/intern/rna_nodetree.c b/source/blender/makesrna/intern/rna_nodetree.c index eca9cb4b4da..51e611418aa 100644 --- a/source/blender/makesrna/intern/rna_nodetree.c +++ b/source/blender/makesrna/intern/rna_nodetree.c @@ -32,7 +32,7 @@ #include "BLI_math.h" #include "BLI_utildefines.h" -#include "BLF_translation.h" +#include "BLT_translation.h" #include "DNA_material_types.h" #include "DNA_mesh_types.h" @@ -4769,7 +4769,7 @@ static void def_cmp_dilate_erode(StructRNA *srna) RNA_def_property_enum_sdna(prop, NULL, "falloff"); RNA_def_property_enum_items(prop, proportional_falloff_curve_only_items); RNA_def_property_ui_text(prop, "Falloff", "Falloff type the feather"); - RNA_def_property_translation_context(prop, BLF_I18NCONTEXT_ID_CURVE); /* Abusing id_curve :/ */ + RNA_def_property_translation_context(prop, BLT_I18NCONTEXT_ID_CURVE); /* Abusing id_curve :/ */ RNA_def_property_update(prop, NC_NODE | NA_EDITED, "rna_Node_update"); } @@ -6426,7 +6426,7 @@ static void def_cmp_keying(StructRNA *srna) RNA_def_property_enum_sdna(prop, NULL, "feather_falloff"); RNA_def_property_enum_items(prop, proportional_falloff_curve_only_items); RNA_def_property_ui_text(prop, "Feather Falloff", "Falloff type the feather"); - RNA_def_property_translation_context(prop, BLF_I18NCONTEXT_ID_CURVE); /* Abusing id_curve :/ */ + RNA_def_property_translation_context(prop, BLT_I18NCONTEXT_ID_CURVE); /* Abusing id_curve :/ */ RNA_def_property_update(prop, NC_NODE | NA_EDITED, "rna_Node_update"); prop = RNA_def_property(srna, "feather_distance", PROP_INT, PROP_NONE); diff --git a/source/blender/makesrna/intern/rna_particle.c b/source/blender/makesrna/intern/rna_particle.c index 78631fdffc3..6676e9dc1c4 100644 --- a/source/blender/makesrna/intern/rna_particle.c +++ b/source/blender/makesrna/intern/rna_particle.c @@ -45,7 +45,7 @@ #include "RNA_define.h" #include "RNA_enum_types.h" -#include "BLF_translation.h" +#include "BLT_translation.h" #include "rna_internal.h" diff --git a/source/blender/makesrna/intern/rna_pose.c b/source/blender/makesrna/intern/rna_pose.c index afbb97f519d..e65023132c9 100644 --- a/source/blender/makesrna/intern/rna_pose.c +++ b/source/blender/makesrna/intern/rna_pose.c @@ -41,7 +41,7 @@ #include "BLI_math.h" -#include "BLF_translation.h" +#include "BLT_translation.h" #include "WM_types.h" @@ -192,7 +192,7 @@ static void rna_BoneGroup_name_set(PointerRNA *ptr, const char *value) /* copy the new name into the name slot */ BLI_strncpy_utf8(agrp->name, value, sizeof(agrp->name)); - BLI_uniquename(&ob->pose->agroups, agrp, CTX_DATA_(BLF_I18NCONTEXT_ID_ARMATURE, "Group"), '.', + BLI_uniquename(&ob->pose->agroups, agrp, CTX_DATA_(BLT_I18NCONTEXT_ID_ARMATURE, "Group"), '.', offsetof(bActionGroup, name), sizeof(agrp->name)); } diff --git a/source/blender/makesrna/intern/rna_property.c b/source/blender/makesrna/intern/rna_property.c index a2c19e55056..454816d4e0a 100644 --- a/source/blender/makesrna/intern/rna_property.c +++ b/source/blender/makesrna/intern/rna_property.c @@ -32,7 +32,7 @@ #include "BLI_path_util.h" -#include "BLF_translation.h" +#include "BLT_translation.h" #include "RNA_define.h" #include "RNA_enum_types.h" diff --git a/source/blender/makesrna/intern/rna_scene.c b/source/blender/makesrna/intern/rna_scene.c index 2110f03f32b..4d7a2c13c1c 100644 --- a/source/blender/makesrna/intern/rna_scene.c +++ b/source/blender/makesrna/intern/rna_scene.c @@ -40,7 +40,7 @@ #include "BLI_math.h" -#include "BLF_translation.h" +#include "BLT_translation.h" #include "BKE_editmesh.h" #include "BKE_paint.h" @@ -4828,7 +4828,7 @@ static void rna_def_scene_ffmpeg_settings(BlenderRNA *brna) RNA_def_property_clear_flag(prop, PROP_ANIMATABLE); RNA_def_property_range(prop, 0.0f, 1.0f); RNA_def_property_ui_text(prop, "Volume", "Audio volume"); - RNA_def_property_translation_context(prop, BLF_I18NCONTEXT_ID_SOUND); + RNA_def_property_translation_context(prop, BLT_I18NCONTEXT_ID_SOUND); RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, NULL); #endif @@ -6482,7 +6482,7 @@ void RNA_def_scene(BlenderRNA *brna) RNA_def_property_float_sdna(prop, NULL, "audio.volume"); RNA_def_property_range(prop, 0.0f, 100.0f); RNA_def_property_ui_text(prop, "Volume", "Audio volume"); - RNA_def_property_translation_context(prop, BLF_I18NCONTEXT_ID_SOUND); + RNA_def_property_translation_context(prop, BLT_I18NCONTEXT_ID_SOUND); RNA_def_property_update(prop, NC_SCENE, NULL); RNA_def_property_float_funcs(prop, NULL, "rna_Scene_volume_set", NULL); diff --git a/source/blender/makesrna/intern/rna_sensor.c b/source/blender/makesrna/intern/rna_sensor.c index cbc02858f78..baf0ae3ccf5 100644 --- a/source/blender/makesrna/intern/rna_sensor.c +++ b/source/blender/makesrna/intern/rna_sensor.c @@ -33,7 +33,7 @@ #include "BLI_utildefines.h" #include "BLI_math.h" -#include "BLF_translation.h" +#include "BLT_translation.h" #include "RNA_define.h" #include "RNA_enum_types.h" @@ -460,7 +460,7 @@ static void rna_def_keyboard_sensor(BlenderRNA *brna) RNA_def_property_enum_items(prop, event_type_items); RNA_def_property_enum_funcs(prop, NULL, "rna_Sensor_keyboard_key_set", NULL); RNA_def_property_ui_text(prop, "Key", ""); - RNA_def_property_translation_context(prop, BLF_I18NCONTEXT_ID_WINDOWMANAGER); + RNA_def_property_translation_context(prop, BLT_I18NCONTEXT_ID_WINDOWMANAGER); RNA_def_property_update(prop, NC_LOGIC, NULL); prop = RNA_def_property(srna, "modifier_key_1", PROP_ENUM, PROP_NONE); diff --git a/source/blender/makesrna/intern/rna_sequencer.c b/source/blender/makesrna/intern/rna_sequencer.c index 879c765978f..bfb62395435 100644 --- a/source/blender/makesrna/intern/rna_sequencer.c +++ b/source/blender/makesrna/intern/rna_sequencer.c @@ -35,7 +35,7 @@ #include "BLI_math.h" -#include "BLF_translation.h" +#include "BLT_translation.h" #include "BKE_animsys.h" #include "BKE_global.h" @@ -1430,7 +1430,7 @@ static void rna_def_sequence(BlenderRNA *brna) RNA_def_property_clear_flag(prop, PROP_EDITABLE); RNA_def_property_enum_items(prop, seq_type_items); RNA_def_property_ui_text(prop, "Type", ""); - RNA_def_property_translation_context(prop, BLF_I18NCONTEXT_ID_SEQUENCE); + RNA_def_property_translation_context(prop, BLT_I18NCONTEXT_ID_SEQUENCE); RNA_def_property_update(prop, NC_SCENE | ND_SEQUENCER, "rna_Sequence_update"); @@ -2036,7 +2036,7 @@ static void rna_def_sound(BlenderRNA *brna) RNA_def_property_float_sdna(prop, NULL, "volume"); RNA_def_property_range(prop, 0.0f, 100.0f); RNA_def_property_ui_text(prop, "Volume", "Playback volume of the sound"); - RNA_def_property_translation_context(prop, BLF_I18NCONTEXT_ID_SOUND); + RNA_def_property_translation_context(prop, BLT_I18NCONTEXT_ID_SOUND); RNA_def_property_float_funcs(prop, NULL, "rna_Sequence_volume_set", NULL); RNA_def_property_update(prop, NC_SCENE | ND_SEQUENCER, "rna_Sequence_update"); @@ -2044,7 +2044,7 @@ static void rna_def_sound(BlenderRNA *brna) RNA_def_property_float_sdna(prop, NULL, "pitch"); RNA_def_property_range(prop, 0.1f, 10.0f); RNA_def_property_ui_text(prop, "Pitch", "Playback pitch of the sound"); - RNA_def_property_translation_context(prop, BLF_I18NCONTEXT_ID_SOUND); + RNA_def_property_translation_context(prop, BLT_I18NCONTEXT_ID_SOUND); RNA_def_property_float_funcs(prop, NULL, "rna_Sequence_pitch_set", NULL); RNA_def_property_update(prop, NC_SCENE | ND_SEQUENCER, "rna_Sequence_update"); diff --git a/source/blender/makesrna/intern/rna_space.c b/source/blender/makesrna/intern/rna_space.c index 4df0b8df0f7..261644c739a 100644 --- a/source/blender/makesrna/intern/rna_space.c +++ b/source/blender/makesrna/intern/rna_space.c @@ -29,7 +29,7 @@ #include "MEM_guardedalloc.h" -#include "BLF_translation.h" +#include "BLT_translation.h" #include "BKE_image.h" #include "BKE_key.h" @@ -3625,7 +3625,7 @@ static void rna_def_console_line(BlenderRNA *brna) "rna_ConsoleLine_body_set"); RNA_def_property_ui_text(prop, "Line", "Text in the line"); RNA_def_property_update(prop, NC_SPACE | ND_SPACE_CONSOLE, NULL); - RNA_def_property_translation_context(prop, BLF_I18NCONTEXT_ID_TEXT); + RNA_def_property_translation_context(prop, BLT_I18NCONTEXT_ID_TEXT); prop = RNA_def_property(srna, "current_character", PROP_INT, PROP_NONE); /* copied from text editor */ RNA_def_property_int_sdna(prop, NULL, "cursor"); @@ -4364,7 +4364,7 @@ static void rna_def_space_clip(BlenderRNA *brna) RNA_def_property_enum_sdna(prop, NULL, "view"); RNA_def_property_enum_items(prop, view_items); RNA_def_property_ui_text(prop, "View", "Type of the clip editor view"); - RNA_def_property_translation_context(prop, BLF_I18NCONTEXT_ID_MOVIECLIP); + RNA_def_property_translation_context(prop, BLT_I18NCONTEXT_ID_MOVIECLIP); RNA_def_property_update(prop, NC_SPACE | ND_SPACE_CLIP, "rna_SpaceClipEditor_view_type_update"); /* show pattern */ @@ -4550,7 +4550,7 @@ static void rna_def_space_clip(BlenderRNA *brna) RNA_def_property_enum_sdna(prop, NULL, "gpencil_src"); RNA_def_property_enum_items(prop, gpencil_source_items); RNA_def_property_ui_text(prop, "Grease Pencil Source", "Where the grease pencil comes from"); - RNA_def_property_translation_context(prop, BLF_I18NCONTEXT_ID_MOVIECLIP); + RNA_def_property_translation_context(prop, BLT_I18NCONTEXT_ID_MOVIECLIP); RNA_def_property_update(prop, NC_MOVIECLIP | ND_DISPLAY, NULL); /* pivot point */ diff --git a/source/blender/makesrna/intern/rna_speaker.c b/source/blender/makesrna/intern/rna_speaker.c index d237dcffc96..31a4e672983 100644 --- a/source/blender/makesrna/intern/rna_speaker.c +++ b/source/blender/makesrna/intern/rna_speaker.c @@ -35,7 +35,7 @@ #include "DNA_speaker_types.h" #include "DNA_sound_types.h" -#include "BLF_translation.h" +#include "BLT_translation.h" #ifdef RNA_RUNTIME @@ -62,7 +62,7 @@ static void rna_def_speaker(BlenderRNA *brna) RNA_def_property_boolean_sdna(prop, NULL, "flag", SPK_MUTED); RNA_def_property_clear_flag(prop, PROP_ANIMATABLE); RNA_def_property_ui_text(prop, "Mute", "Mute the speaker"); - RNA_def_property_translation_context(prop, BLF_I18NCONTEXT_ID_SOUND); + RNA_def_property_translation_context(prop, BLT_I18NCONTEXT_ID_SOUND); /* RNA_def_property_update(prop, 0, "rna_Speaker_update"); */ prop = RNA_def_property(srna, "relative", PROP_BOOLEAN, PROP_NONE); @@ -142,14 +142,14 @@ static void rna_def_speaker(BlenderRNA *brna) prop = RNA_def_property(srna, "volume", PROP_FLOAT, PROP_NONE); RNA_def_property_range(prop, 0.0f, 1.0f); RNA_def_property_ui_text(prop, "Volume", "How loud the sound is"); - RNA_def_property_translation_context(prop, BLF_I18NCONTEXT_ID_SOUND); + RNA_def_property_translation_context(prop, BLT_I18NCONTEXT_ID_SOUND); /* RNA_def_property_float_funcs(prop, NULL, "rna_Speaker_volume_set", NULL); */ /* RNA_def_property_update(prop, 0, "rna_Speaker_update"); */ prop = RNA_def_property(srna, "pitch", PROP_FLOAT, PROP_NONE); RNA_def_property_range(prop, 0.1f, 10.0f); RNA_def_property_ui_text(prop, "Pitch", "Playback pitch of the sound"); - RNA_def_property_translation_context(prop, BLF_I18NCONTEXT_ID_SOUND); + RNA_def_property_translation_context(prop, BLT_I18NCONTEXT_ID_SOUND); /* RNA_def_property_float_funcs(prop, NULL, "rna_Speaker_pitch_set", NULL); */ /* RNA_def_property_update(prop, 0, "rna_Speaker_update"); */ diff --git a/source/blender/makesrna/intern/rna_text.c b/source/blender/makesrna/intern/rna_text.c index 46477007962..fb9d447850a 100644 --- a/source/blender/makesrna/intern/rna_text.c +++ b/source/blender/makesrna/intern/rna_text.c @@ -30,7 +30,7 @@ #include "MEM_guardedalloc.h" -#include "BLF_translation.h" +#include "BLT_translation.h" #include "BKE_text.h" @@ -139,7 +139,7 @@ static void rna_def_text_line(BlenderRNA *brna) RNA_def_property_string_funcs(prop, "rna_TextLine_body_get", "rna_TextLine_body_length", "rna_TextLine_body_set"); RNA_def_property_ui_text(prop, "Line", "Text in the line"); RNA_def_property_update(prop, NC_TEXT | NA_EDITED, NULL); - RNA_def_property_translation_context(prop, BLF_I18NCONTEXT_ID_TEXT); + RNA_def_property_translation_context(prop, BLT_I18NCONTEXT_ID_TEXT); } static void rna_def_text(BlenderRNA *brna) diff --git a/source/blender/makesrna/intern/rna_ui.c b/source/blender/makesrna/intern/rna_ui.c index fde43abe9fb..2595771bece 100644 --- a/source/blender/makesrna/intern/rna_ui.c +++ b/source/blender/makesrna/intern/rna_ui.c @@ -29,7 +29,7 @@ #include "DNA_screen_types.h" -#include "BLF_translation.h" +#include "BLT_translation.h" #include "BKE_idprop.h" @@ -199,7 +199,7 @@ static StructRNA *rna_Panel_register(Main *bmain, ReportList *reports, void *dat RNA_pointer_create(NULL, &RNA_Panel, &dummypanel, &dummyptr); /* We have to set default context! Else we get a void string... */ - strcpy(dummypt.translation_context, BLF_I18NCONTEXT_DEFAULT_BPYRNA); + strcpy(dummypt.translation_context, BLT_I18NCONTEXT_DEFAULT_BPYRNA); /* validate the python class */ if (validate(&dummyptr, data, have_function) != 0) @@ -700,7 +700,7 @@ static StructRNA *rna_Menu_register(Main *bmain, ReportList *reports, void *data RNA_pointer_create(NULL, &RNA_Menu, &dummymenu, &dummymtr); /* We have to set default context! Else we get a void string... */ - strcpy(dummymt.translation_context, BLF_I18NCONTEXT_DEFAULT_BPYRNA); + strcpy(dummymt.translation_context, BLT_I18NCONTEXT_DEFAULT_BPYRNA); /* validate the python class */ if (validate(&dummymtr, data, have_function) != 0) @@ -936,7 +936,7 @@ static void rna_def_panel(BlenderRNA *brna) RNA_def_struct_sdna(srna, "Panel"); RNA_def_struct_refine_func(srna, "rna_Panel_refine"); RNA_def_struct_register_funcs(srna, "rna_Panel_register", "rna_Panel_unregister", NULL); - RNA_def_struct_translation_context(srna, BLF_I18NCONTEXT_DEFAULT_BPYRNA); + RNA_def_struct_translation_context(srna, BLT_I18NCONTEXT_DEFAULT_BPYRNA); /* poll */ func = RNA_def_function(srna, "poll", NULL); @@ -986,7 +986,7 @@ static void rna_def_panel(BlenderRNA *brna) prop = RNA_def_property(srna, "bl_translation_context", PROP_STRING, PROP_NONE); RNA_def_property_string_sdna(prop, NULL, "type->translation_context"); - RNA_def_property_string_default(prop, BLF_I18NCONTEXT_DEFAULT_BPYRNA); + RNA_def_property_string_default(prop, BLT_I18NCONTEXT_DEFAULT_BPYRNA); RNA_def_property_flag(prop, PROP_REGISTER_OPTIONAL); RNA_define_verify_sdna(true); @@ -1206,7 +1206,7 @@ static void rna_def_menu(BlenderRNA *brna) RNA_def_struct_sdna(srna, "Menu"); RNA_def_struct_refine_func(srna, "rna_Menu_refine"); RNA_def_struct_register_funcs(srna, "rna_Menu_register", "rna_Menu_unregister", NULL); - RNA_def_struct_translation_context(srna, BLF_I18NCONTEXT_DEFAULT_BPYRNA); + RNA_def_struct_translation_context(srna, BLT_I18NCONTEXT_DEFAULT_BPYRNA); /* poll */ func = RNA_def_function(srna, "poll", NULL); @@ -1247,7 +1247,7 @@ static void rna_def_menu(BlenderRNA *brna) prop = RNA_def_property(srna, "bl_translation_context", PROP_STRING, PROP_NONE); RNA_def_property_string_sdna(prop, NULL, "type->translation_context"); - RNA_def_property_string_default(prop, BLF_I18NCONTEXT_DEFAULT_BPYRNA); + RNA_def_property_string_default(prop, BLT_I18NCONTEXT_DEFAULT_BPYRNA); RNA_def_property_flag(prop, PROP_REGISTER_OPTIONAL); prop = RNA_def_property(srna, "bl_description", PROP_STRING, PROP_NONE); 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, diff --git a/source/blender/makesrna/intern/rna_userdef.c b/source/blender/makesrna/intern/rna_userdef.c index c8e520159cc..f2e62e6f559 100644 --- a/source/blender/makesrna/intern/rna_userdef.c +++ b/source/blender/makesrna/intern/rna_userdef.c @@ -49,7 +49,7 @@ #include "WM_api.h" #include "WM_types.h" -#include "BLF_translation.h" +#include "BLT_lang.h" #include "GPU_buffers.h" #ifdef WITH_CYCLES @@ -157,7 +157,7 @@ static void rna_userdef_virtual_pixel_update(Main *UNUSED(bmain), Scene *UNUSED( static void rna_userdef_language_update(Main *UNUSED(bmain), Scene *UNUSED(scene), PointerRNA *UNUSED(ptr)) { BLF_cache_clear(); - BLF_lang_set(NULL); + BLT_lang_set(NULL); UI_reinit_font(); } @@ -659,7 +659,7 @@ static EnumPropertyItem *rna_userdef_audio_device_itemf(bContext *UNUSED(C), Poi static EnumPropertyItem *rna_lang_enum_properties_itemf(bContext *UNUSED(C), PointerRNA *UNUSED(ptr), PropertyRNA *UNUSED(prop), bool *UNUSED(r_free)) { - return BLF_RNA_lang_enum_properties(); + return BLT_lang_RNA_enum_properties(); } #endif diff --git a/source/blender/makesrna/intern/rna_wm.c b/source/blender/makesrna/intern/rna_wm.c index 86c6d432f9d..8dd995205c9 100644 --- a/source/blender/makesrna/intern/rna_wm.c +++ b/source/blender/makesrna/intern/rna_wm.c @@ -33,7 +33,7 @@ #include "BLI_utildefines.h" -#include "BLF_translation.h" +#include "BLT_translation.h" #include "RNA_access.h" #include "RNA_define.h" @@ -1144,7 +1144,7 @@ static StructRNA *rna_Operator_register(Main *bmain, ReportList *reports, void * /* clear in case they are left unset */ _operator_idname[0] = _operator_name[0] = _operator_descr[0] = '\0'; /* We have to set default op context! */ - strcpy(_operator_ctxt, BLF_I18NCONTEXT_OPERATOR_DEFAULT); + strcpy(_operator_ctxt, BLT_I18NCONTEXT_OPERATOR_DEFAULT); /* validate the python class */ if (validate(&dummyotr, data, have_function) != 0) @@ -1271,7 +1271,7 @@ static StructRNA *rna_MacroOperator_register(Main *bmain, ReportList *reports, v /* clear in case they are left unset */ _operator_idname[0] = _operator_name[0] = _operator_descr[0] = '\0'; /* We have to set default op context! */ - strcpy(_operator_ctxt, BLF_I18NCONTEXT_OPERATOR_DEFAULT); + strcpy(_operator_ctxt, BLT_I18NCONTEXT_OPERATOR_DEFAULT); /* validate the python class */ if (validate(&dummyotr, data, have_function) != 0) @@ -1434,7 +1434,7 @@ static void rna_def_operator(BlenderRNA *brna) #ifdef WITH_PYTHON RNA_def_struct_register_funcs(srna, "rna_Operator_register", "rna_Operator_unregister", "rna_Operator_instance"); #endif - RNA_def_struct_translation_context(srna, BLF_I18NCONTEXT_OPERATOR_DEFAULT); + RNA_def_struct_translation_context(srna, BLT_I18NCONTEXT_OPERATOR_DEFAULT); prop = RNA_def_property(srna, "name", PROP_STRING, PROP_NONE); RNA_def_property_clear_flag(prop, PROP_EDITABLE); @@ -1483,7 +1483,7 @@ static void rna_def_operator(BlenderRNA *brna) RNA_def_property_string_sdna(prop, NULL, "type->translation_context"); RNA_def_property_string_maxlength(prop, RNA_DYN_DESCR_MAX); /* else it uses the pointer size! */ RNA_def_property_string_funcs(prop, NULL, NULL, "rna_Operator_bl_translation_context_set"); - RNA_def_property_string_default(prop, BLF_I18NCONTEXT_OPERATOR_DEFAULT); + RNA_def_property_string_default(prop, BLT_I18NCONTEXT_OPERATOR_DEFAULT); RNA_def_property_flag(prop, PROP_REGISTER_OPTIONAL); RNA_def_property_clear_flag(prop, PROP_NEVER_NULL); /* check for NULL */ @@ -1528,7 +1528,7 @@ static void rna_def_macro_operator(BlenderRNA *brna) RNA_def_struct_register_funcs(srna, "rna_MacroOperator_register", "rna_Operator_unregister", "rna_Operator_instance"); #endif - RNA_def_struct_translation_context(srna, BLF_I18NCONTEXT_OPERATOR_DEFAULT); + RNA_def_struct_translation_context(srna, BLT_I18NCONTEXT_OPERATOR_DEFAULT); prop = RNA_def_property(srna, "name", PROP_STRING, PROP_NONE); RNA_def_property_clear_flag(prop, PROP_EDITABLE); @@ -1561,7 +1561,7 @@ static void rna_def_macro_operator(BlenderRNA *brna) RNA_def_property_string_sdna(prop, NULL, "type->translation_context"); RNA_def_property_string_maxlength(prop, RNA_DYN_DESCR_MAX); /* else it uses the pointer size! */ RNA_def_property_string_funcs(prop, NULL, NULL, "rna_Operator_bl_translation_context_set"); - RNA_def_property_string_default(prop, BLF_I18NCONTEXT_OPERATOR_DEFAULT); + RNA_def_property_string_default(prop, BLT_I18NCONTEXT_OPERATOR_DEFAULT); RNA_def_property_flag(prop, PROP_REGISTER_OPTIONAL); RNA_def_property_clear_flag(prop, PROP_NEVER_NULL); /* check for NULL */ diff --git a/source/blender/nodes/CMakeLists.txt b/source/blender/nodes/CMakeLists.txt index 13dede8877a..d20881df150 100644 --- a/source/blender/nodes/CMakeLists.txt +++ b/source/blender/nodes/CMakeLists.txt @@ -29,9 +29,9 @@ set(INC intern shader texture - ../blenfont ../blenkernel ../blenlib + ../blentranslation ../gpu ../imbuf ../makesdna diff --git a/source/blender/nodes/SConscript b/source/blender/nodes/SConscript index c41e399ec29..ad500725812 100644 --- a/source/blender/nodes/SConscript +++ b/source/blender/nodes/SConscript @@ -41,9 +41,9 @@ incs = [ '#/intern/guardedalloc', env['BF_GLEW_INC'], '#/intern/glew-mx', - '../blenfont', '../blenkernel', '../blenlib', + '../blentranslation', '../gpu', '../imbuf', '../makesdna', diff --git a/source/blender/nodes/composite/node_composite_tree.c b/source/blender/nodes/composite/node_composite_tree.c index 8bc61862458..cb565bd5491 100644 --- a/source/blender/nodes/composite/node_composite_tree.c +++ b/source/blender/nodes/composite/node_composite_tree.c @@ -36,7 +36,7 @@ #include "DNA_scene_types.h" #include "DNA_node_types.h" -#include "BLF_translation.h" +#include "BLT_translation.h" #include "BKE_context.h" #include "BKE_global.h" diff --git a/source/blender/nodes/composite/node_composite_util.h b/source/blender/nodes/composite/node_composite_util.h index 3f9cfc03089..2dac0cc639a 100644 --- a/source/blender/nodes/composite/node_composite_util.h +++ b/source/blender/nodes/composite/node_composite_util.h @@ -40,7 +40,7 @@ #include "BLI_math.h" #include "BLI_blenlib.h" -#include "BLF_translation.h" +#include "BLT_translation.h" #include "BKE_colortools.h" #include "BKE_image.h" diff --git a/source/blender/nodes/composite/nodes/node_composite_keying.c b/source/blender/nodes/composite/nodes/node_composite_keying.c index ba179bcbcd3..6dd2bcc9002 100644 --- a/source/blender/nodes/composite/nodes/node_composite_keying.c +++ b/source/blender/nodes/composite/nodes/node_composite_keying.c @@ -30,7 +30,7 @@ * \ingroup cmpnodes */ -#include "BLF_translation.h" +#include "BLT_translation.h" #include "DNA_movieclip_types.h" diff --git a/source/blender/nodes/intern/node_common.c b/source/blender/nodes/intern/node_common.c index c397af97783..12cd93e418b 100644 --- a/source/blender/nodes/intern/node_common.c +++ b/source/blender/nodes/intern/node_common.c @@ -38,7 +38,7 @@ #include "BLI_string.h" #include "BLI_utildefines.h" -#include "BLF_translation.h" +#include "BLT_translation.h" #include "BKE_node.h" diff --git a/source/blender/nodes/intern/node_util.c b/source/blender/nodes/intern/node_util.c index cc8249b0f57..046188f8508 100644 --- a/source/blender/nodes/intern/node_util.c +++ b/source/blender/nodes/intern/node_util.c @@ -38,7 +38,7 @@ #include "BLI_string.h" #include "BLI_utildefines.h" -#include "BLF_translation.h" +#include "BLT_translation.h" #include "BKE_colortools.h" #include "BKE_node.h" diff --git a/source/blender/nodes/shader/node_shader_tree.c b/source/blender/nodes/shader/node_shader_tree.c index cd2c6f68726..c4ec55c8d06 100644 --- a/source/blender/nodes/shader/node_shader_tree.c +++ b/source/blender/nodes/shader/node_shader_tree.c @@ -44,7 +44,7 @@ #include "BLI_threads.h" #include "BLI_utildefines.h" -#include "BLF_translation.h" +#include "BLT_translation.h" #include "BKE_context.h" #include "BKE_linestyle.h" diff --git a/source/blender/nodes/shader/node_shader_util.h b/source/blender/nodes/shader/node_shader_util.h index 8a79603fab4..2f96bdbe3df 100644 --- a/source/blender/nodes/shader/node_shader_util.h +++ b/source/blender/nodes/shader/node_shader_util.h @@ -69,7 +69,7 @@ #include "NOD_shader.h" #include "node_util.h" -#include "BLF_translation.h" +#include "BLT_translation.h" #include "IMB_imbuf_types.h" #include "IMB_imbuf.h" diff --git a/source/blender/nodes/texture/node_texture_tree.c b/source/blender/nodes/texture/node_texture_tree.c index d716c2565c7..714665c303b 100644 --- a/source/blender/nodes/texture/node_texture_tree.c +++ b/source/blender/nodes/texture/node_texture_tree.c @@ -40,7 +40,7 @@ #include "BLI_threads.h" #include "BLI_utildefines.h" -#include "BLF_translation.h" +#include "BLT_translation.h" #include "BKE_context.h" #include "BKE_linestyle.h" diff --git a/source/blender/nodes/texture/node_texture_util.h b/source/blender/nodes/texture/node_texture_util.h index 2c5ecfdae0d..0410a9d4b33 100644 --- a/source/blender/nodes/texture/node_texture_util.h +++ b/source/blender/nodes/texture/node_texture_util.h @@ -67,7 +67,7 @@ #include "node_util.h" #include "NOD_texture.h" -#include "BLF_translation.h" +#include "BLT_translation.h" #include "IMB_imbuf_types.h" #include "IMB_imbuf.h" diff --git a/source/blender/python/SConscript b/source/blender/python/SConscript index eeca09e02e5..f7b01259ead 100644 --- a/source/blender/python/SConscript +++ b/source/blender/python/SConscript @@ -36,6 +36,7 @@ incs = [ env['BF_GLEW_INC'], '#/intern/glew-mx', '#/intern/cycles/blender', + '../blentranslation', '../blenfont', '../blenkernel', '../blenlib', diff --git a/source/blender/python/intern/CMakeLists.txt b/source/blender/python/intern/CMakeLists.txt index 7c58c1158c1..cd2a9fd8584 100644 --- a/source/blender/python/intern/CMakeLists.txt +++ b/source/blender/python/intern/CMakeLists.txt @@ -25,10 +25,10 @@ set(INC .. - ../../blenfont ../../blenkernel ../../blenlib ../../blenloader + ../../blentranslation ../../editors/include ../../gpu ../../imbuf diff --git a/source/blender/python/intern/bpy_app_translations.c b/source/blender/python/intern/bpy_app_translations.c index 72133badbbb..dfff67e6ca1 100644 --- a/source/blender/python/intern/bpy_app_translations.c +++ b/source/blender/python/intern/bpy_app_translations.c @@ -41,7 +41,8 @@ #include "MEM_guardedalloc.h" -#include "BLF_translation.h" +#include "BLT_translation.h" +#include "BLT_lang.h" #include "RNA_types.h" @@ -73,7 +74,7 @@ typedef struct GHashKey { static GHashKey *_ghashutil_keyalloc(const void *msgctxt, const void *msgid) { GHashKey *key = MEM_mallocN(sizeof(GHashKey), "Py i18n GHashKey"); - key->msgctxt = BLI_strdup(BLF_is_default_context(msgctxt) ? BLF_I18NCONTEXT_DEFAULT_BPYRNA : msgctxt); + key->msgctxt = BLI_strdup(BLT_is_default_context(msgctxt) ? BLT_I18NCONTEXT_DEFAULT_BPYRNA : msgctxt); key->msgid = BLI_strdup(msgid); return key; } @@ -133,7 +134,7 @@ static void _build_translations_cache(PyObject *py_messages, const char *locale) /* For each py dict, we'll search for full locale, then language+country, then language+variant, * then only language keys... */ - BLF_locale_explode(locale, &language, NULL, NULL, &language_country, &language_variant); + BLT_lang_locale_explode(locale, &language, NULL, NULL, &language_country, &language_variant); /* Clear the cached ghash if needed, and create a new one. */ _clear_translations_cache(); @@ -190,7 +191,7 @@ static void _build_translations_cache(PyObject *py_messages, const char *locale) else { PyObject *tmp = PyTuple_GET_ITEM(pykey, 0); if (tmp == Py_None) { - msgctxt = BLF_I18NCONTEXT_DEFAULT_BPYRNA; + msgctxt = BLT_I18NCONTEXT_DEFAULT_BPYRNA; } else if (PyUnicode_Check(tmp)) { msgctxt = _PyUnicode_AsString(tmp); @@ -258,7 +259,7 @@ const char *BPY_app_translations_py_pgettext(const char *msgctxt, const char *ms if (!_translations) return msgid; - tmp = BLF_lang_get(); + tmp = BLT_lang_get(); if (!STREQ(tmp, locale) || !_translations_cache) { PyGILState_STATE _py_state; @@ -379,10 +380,10 @@ static PyObject *app_translations_py_messages_unregister(BlenderAppTranslations static PyTypeObject BlenderAppTranslationsContextsType; -static BLF_i18n_contexts_descriptor _contexts[] = BLF_I18NCONTEXTS_DESC; +static BLT_i18n_contexts_descriptor _contexts[] = BLT_I18NCONTEXTS_DESC; /* These fields are just empty placeholders, actual values get set in app_translations_struct(). - * This allows us to avoid many handwriting, and above all, to keep all context definition stuff in BLF_translation.h! + * This allows us to avoid many handwriting, and above all, to keep all context definition stuff in BLT_translation.h! */ static PyStructSequence_Field app_translations_contexts_fields[ARRAY_SIZE(_contexts)] = {{NULL}}; @@ -397,7 +398,7 @@ static PyStructSequence_Desc app_translations_contexts_desc = { static PyObject *app_translations_contexts_make(void) { PyObject *translations_contexts; - BLF_i18n_contexts_descriptor *ctxt; + BLT_i18n_contexts_descriptor *ctxt; int pos = 0; translations_contexts = PyStructSequence_New(&BlenderAppTranslationsContextsType); @@ -429,7 +430,7 @@ PyDoc_STRVAR(app_translations_contexts_doc, "A named tuple containing all pre-defined translation contexts.\n" "\n" ".. warning::\n" -" Never use a (new) context starting with \"" BLF_I18NCONTEXT_DEFAULT_BPYRNA "\", it would be internally \n" +" Never use a (new) context starting with \"" BLT_I18NCONTEXT_DEFAULT_BPYRNA "\", it would be internally \n" " assimilated as the default one!\n" ); @@ -451,7 +452,7 @@ PyDoc_STRVAR(app_translations_locale_doc, ); static PyObject *app_translations_locale_get(PyObject *UNUSED(self), void *UNUSED(userdata)) { - return PyUnicode_FromString(BLF_lang_get()); + return PyUnicode_FromString(BLT_lang_get()); } /* Note: defining as getter, as (even if quite unlikely), this *may* change during runtime... */ @@ -459,7 +460,7 @@ PyDoc_STRVAR(app_translations_locales_doc, "All locales currently known by Blend static PyObject *app_translations_locales_get(PyObject *UNUSED(self), void *UNUSED(userdata)) { PyObject *ret; - EnumPropertyItem *it, *items = BLF_RNA_lang_enum_properties(); + EnumPropertyItem *it, *items = BLT_lang_RNA_enum_properties(); int num_locales = 0, pos = 0; if (items) { @@ -504,7 +505,7 @@ static PyObject *_py_pgettext(PyObject *args, PyObject *kw, const char *(*_pgett return NULL; } - return PyUnicode_FromString((*_pgettext)(msgctxt ? msgctxt : BLF_I18NCONTEXT_DEFAULT, msgid)); + return PyUnicode_FromString((*_pgettext)(msgctxt ? msgctxt : BLT_I18NCONTEXT_DEFAULT, msgid)); #else PyObject *msgid, *msgctxt; (void)_pgettext; @@ -527,7 +528,7 @@ PyDoc_STRVAR(app_translations_pgettext_doc, "\n" " .. note::\n" " The ``(msgid, msgctxt)`` parameters order has been switched compared to gettext function, to allow\n" -" single-parameter calls (context then defaults to BLF_I18NCONTEXT_DEFAULT).\n" +" single-parameter calls (context then defaults to BLT_I18NCONTEXT_DEFAULT).\n" "\n" " .. note::\n" " You should really rarely need to use this function in regular addon code, as all translation should be\n" @@ -539,14 +540,14 @@ PyDoc_STRVAR(app_translations_pgettext_doc, "\n" " :arg msgid: The string to translate.\n" " :type msgid: string\n" -" :arg msgctxt: The translation context (defaults to BLF_I18NCONTEXT_DEFAULT).\n" +" :arg msgctxt: The translation context (defaults to BLT_I18NCONTEXT_DEFAULT).\n" " :type msgctxt: string or None\n" " :return: The translated string (or msgid if no translation was found).\n" "\n" ); static PyObject *app_translations_pgettext(BlenderAppTranslations *UNUSED(self), PyObject *args, PyObject *kw) { - return _py_pgettext(args, kw, BLF_pgettext); + return _py_pgettext(args, kw, BLT_pgettext); } PyDoc_STRVAR(app_translations_pgettext_iface_doc, @@ -559,14 +560,14 @@ PyDoc_STRVAR(app_translations_pgettext_iface_doc, "\n" " :arg msgid: The string to translate.\n" " :type msgid: string\n" -" :arg msgctxt: The translation context (defaults to BLF_I18NCONTEXT_DEFAULT).\n" +" :arg msgctxt: The translation context (defaults to BLT_I18NCONTEXT_DEFAULT).\n" " :type msgctxt: string or None\n" " :return: The translated string (or msgid if no translation was found).\n" "\n" ); static PyObject *app_translations_pgettext_iface(BlenderAppTranslations *UNUSED(self), PyObject *args, PyObject *kw) { - return _py_pgettext(args, kw, BLF_translate_do_iface); + return _py_pgettext(args, kw, BLT_translate_do_iface); } PyDoc_STRVAR(app_translations_pgettext_tip_doc, @@ -579,14 +580,14 @@ PyDoc_STRVAR(app_translations_pgettext_tip_doc, "\n" " :arg msgid: The string to translate.\n" " :type msgid: string\n" -" :arg msgctxt: The translation context (defaults to BLF_I18NCONTEXT_DEFAULT).\n" +" :arg msgctxt: The translation context (defaults to BLT_I18NCONTEXT_DEFAULT).\n" " :type msgctxt: string or None\n" " :return: The translated string (or msgid if no translation was found).\n" "\n" ); static PyObject *app_translations_pgettext_tip(BlenderAppTranslations *UNUSED(self), PyObject *args, PyObject *kw) { - return _py_pgettext(args, kw, BLF_translate_do_tooltip); + return _py_pgettext(args, kw, BLT_translate_do_tooltip); } PyDoc_STRVAR(app_translations_pgettext_data_doc, @@ -599,14 +600,14 @@ PyDoc_STRVAR(app_translations_pgettext_data_doc, "\n" " :arg msgid: The string to translate.\n" " :type msgid: string\n" -" :arg msgctxt: The translation context (defaults to BLF_I18NCONTEXT_DEFAULT).\n" +" :arg msgctxt: The translation context (defaults to BLT_I18NCONTEXT_DEFAULT).\n" " :type msgctxt: string or None\n" " :return: The translated string (or ``msgid`` if no translation was found).\n" "\n" ); static PyObject *app_translations_pgettext_data(BlenderAppTranslations *UNUSED(self), PyObject *args, PyObject *kw) { - return _py_pgettext(args, kw, BLF_translate_do_new_dataname); + return _py_pgettext(args, kw, BLT_translate_do_new_dataname); } PyDoc_STRVAR(app_translations_locale_explode_doc, @@ -635,7 +636,7 @@ static PyObject *app_translations_locale_explode(BlenderAppTranslations *UNUSED( return NULL; } - BLF_locale_explode(locale, &language, &country, &variant, &language_country, &language_variant); + BLT_lang_locale_explode(locale, &language, &country, &variant, &language_country, &language_variant); ret_tuple = Py_BuildValue("sssss", language, country, variant, language_country, language_variant); @@ -675,7 +676,7 @@ static PyObject *app_translations_new(PyTypeObject *type, PyObject *UNUSED(args) _translations = (BlenderAppTranslations *)type->tp_alloc(type, 0); if (_translations) { PyObject *py_ctxts; - BLF_i18n_contexts_descriptor *ctxt; + BLT_i18n_contexts_descriptor *ctxt; _translations->contexts = app_translations_contexts_make(); @@ -795,7 +796,7 @@ PyObject *BPY_app_translations_struct(void) /* Let's finalize our contexts structseq definition! */ { - BLF_i18n_contexts_descriptor *ctxt; + BLT_i18n_contexts_descriptor *ctxt; PyStructSequence_Field *desc; /* We really populate the contexts' fields here! */ diff --git a/source/blender/python/intern/bpy_util.c b/source/blender/python/intern/bpy_util.c index e876adfa58e..ee827c06e14 100644 --- a/source/blender/python/intern/bpy_util.c +++ b/source/blender/python/intern/bpy_util.c @@ -39,7 +39,7 @@ #include "BKE_report.h" #include "BKE_context.h" -#include "BLF_translation.h" +#include "BLT_translation.h" #include "../generic/py_capi_utils.h" diff --git a/source/blender/render/CMakeLists.txt b/source/blender/render/CMakeLists.txt index 4b54ddf7225..9e40ab02ee4 100644 --- a/source/blender/render/CMakeLists.txt +++ b/source/blender/render/CMakeLists.txt @@ -27,9 +27,9 @@ set(INC extern/include intern/include - ../blenfont ../blenkernel ../blenlib + ../blentranslation ../imbuf ../depsgraph ../makesdna diff --git a/source/blender/render/SConscript b/source/blender/render/SConscript index 4a9f32bc1ac..16d9b4a832d 100644 --- a/source/blender/render/SConscript +++ b/source/blender/render/SConscript @@ -34,9 +34,9 @@ incs = [ 'extern/include', 'intern/include', '#/intern/guardedalloc', - '../blenfont', '../blenkernel', '../blenlib', + '../blentranslation', '../imbuf', '../depsgraph', '../makesdna', diff --git a/source/blender/render/intern/source/convertblender.c b/source/blender/render/intern/source/convertblender.c index 49f7658280e..ac3600cbe9d 100644 --- a/source/blender/render/intern/source/convertblender.c +++ b/source/blender/render/intern/source/convertblender.c @@ -44,7 +44,7 @@ # include "BLI_edgehash.h" #endif -#include "BLF_translation.h" +#include "BLT_translation.h" #include "DNA_material_types.h" #include "DNA_curve_types.h" diff --git a/source/blender/render/intern/source/envmap.c b/source/blender/render/intern/source/envmap.c index 1e42617d742..b9b908f550b 100644 --- a/source/blender/render/intern/source/envmap.c +++ b/source/blender/render/intern/source/envmap.c @@ -37,7 +37,7 @@ #include "BLI_threads.h" #include "BLI_utildefines.h" -#include "BLF_translation.h" +#include "BLT_translation.h" #include "IMB_imbuf_types.h" #include "IMB_imbuf.h" /* for rectcpy */ diff --git a/source/blender/render/intern/source/external_engine.c b/source/blender/render/intern/source/external_engine.c index 63d1b609621..fef453efce2 100644 --- a/source/blender/render/intern/source/external_engine.c +++ b/source/blender/render/intern/source/external_engine.c @@ -36,7 +36,7 @@ #include "MEM_guardedalloc.h" -#include "BLF_translation.h" +#include "BLT_translation.h" #include "BLI_listbase.h" #include "BLI_string.h" diff --git a/source/blender/render/intern/source/occlusion.c b/source/blender/render/intern/source/occlusion.c index d5a45bd1126..c5c3b6bbf94 100644 --- a/source/blender/render/intern/source/occlusion.c +++ b/source/blender/render/intern/source/occlusion.c @@ -43,7 +43,7 @@ #include "BLI_threads.h" #include "BLI_utildefines.h" -#include "BLF_translation.h" +#include "BLT_translation.h" #include "BKE_node.h" #include "BKE_scene.h" diff --git a/source/blender/render/intern/source/pipeline.c b/source/blender/render/intern/source/pipeline.c index 796dfd1094b..96039b7116c 100644 --- a/source/blender/render/intern/source/pipeline.c +++ b/source/blender/render/intern/source/pipeline.c @@ -55,7 +55,7 @@ #include "BLI_rand.h" #include "BLI_callbacks.h" -#include "BLF_translation.h" +#include "BLT_translation.h" #include "BKE_animsys.h" /* <------ should this be here?, needed for sequencer update */ #include "BKE_camera.h" diff --git a/source/blender/render/intern/source/pointdensity.c b/source/blender/render/intern/source/pointdensity.c index 165a1bbb687..b8d8cc37ae3 100644 --- a/source/blender/render/intern/source/pointdensity.c +++ b/source/blender/render/intern/source/pointdensity.c @@ -40,7 +40,7 @@ #include "BLI_kdopbvh.h" #include "BLI_utildefines.h" -#include "BLF_translation.h" +#include "BLT_translation.h" #include "BKE_DerivedMesh.h" #include "BKE_lattice.h" diff --git a/source/blender/render/intern/source/rayshade.c b/source/blender/render/intern/source/rayshade.c index 2b1d5b8c1e5..70a8fdf3ba3 100644 --- a/source/blender/render/intern/source/rayshade.c +++ b/source/blender/render/intern/source/rayshade.c @@ -45,7 +45,7 @@ #include "BLI_rand.h" #include "BLI_utildefines.h" -#include "BLF_translation.h" +#include "BLT_translation.h" #include "BKE_node.h" diff --git a/source/blender/render/intern/source/sss.c b/source/blender/render/intern/source/sss.c index 890b0445ecc..553710b4367 100644 --- a/source/blender/render/intern/source/sss.c +++ b/source/blender/render/intern/source/sss.c @@ -55,7 +55,7 @@ #include "BLI_ghash.h" #include "BLI_memarena.h" -#include "BLF_translation.h" +#include "BLT_translation.h" #include "DNA_material_types.h" diff --git a/source/blender/render/intern/source/volume_precache.c b/source/blender/render/intern/source/volume_precache.c index 6135a8761bb..78ede01d6c1 100644 --- a/source/blender/render/intern/source/volume_precache.c +++ b/source/blender/render/intern/source/volume_precache.c @@ -44,7 +44,7 @@ #include "BLI_voxel.h" #include "BLI_utildefines.h" -#include "BLF_translation.h" +#include "BLT_translation.h" #include "PIL_time.h" diff --git a/source/blender/render/intern/source/voxeldata.c b/source/blender/render/intern/source/voxeldata.c index 8bc5c7a1c8f..bb92a8f7e8a 100644 --- a/source/blender/render/intern/source/voxeldata.c +++ b/source/blender/render/intern/source/voxeldata.c @@ -46,7 +46,7 @@ #include "BLI_voxel.h" #include "BLI_utildefines.h" -#include "BLF_translation.h" +#include "BLT_translation.h" #include "IMB_imbuf.h" #include "IMB_imbuf_types.h" diff --git a/source/blender/windowmanager/CMakeLists.txt b/source/blender/windowmanager/CMakeLists.txt index 5328e62367b..c5e8cbf1260 100644 --- a/source/blender/windowmanager/CMakeLists.txt +++ b/source/blender/windowmanager/CMakeLists.txt @@ -29,6 +29,7 @@ set(INC ../blenkernel ../blenlib ../blenloader + ../blentranslation ../compositor ../editors/include ../gpu diff --git a/source/blender/windowmanager/SConscript b/source/blender/windowmanager/SConscript index 4f2e295e872..ec1b265d800 100644 --- a/source/blender/windowmanager/SConscript +++ b/source/blender/windowmanager/SConscript @@ -42,6 +42,7 @@ incs = [ '../blenkernel', '../blenlib', '../blenloader', + '../blentranslation', '../compositor', '../editors/include', '../gpu', diff --git a/source/blender/windowmanager/intern/wm_dragdrop.c b/source/blender/windowmanager/intern/wm_dragdrop.c index cdc3c9eaaff..3a53906a8e8 100644 --- a/source/blender/windowmanager/intern/wm_dragdrop.c +++ b/source/blender/windowmanager/intern/wm_dragdrop.c @@ -37,7 +37,7 @@ #include "MEM_guardedalloc.h" -#include "BLF_translation.h" +#include "BLT_translation.h" #include "BLI_blenlib.h" diff --git a/source/blender/windowmanager/intern/wm_files.c b/source/blender/windowmanager/intern/wm_files.c index 7d06211f519..a4f69b24351 100644 --- a/source/blender/windowmanager/intern/wm_files.c +++ b/source/blender/windowmanager/intern/wm_files.c @@ -60,7 +60,7 @@ #include "BLI_system.h" #include BLI_SYSTEM_PID_H -#include "BLF_translation.h" +#include "BLT_translation.h" #include "DNA_object_types.h" #include "DNA_space_types.h" diff --git a/source/blender/windowmanager/intern/wm_init_exit.c b/source/blender/windowmanager/intern/wm_init_exit.c index bde6db259bc..17dde5cec23 100644 --- a/source/blender/windowmanager/intern/wm_init_exit.c +++ b/source/blender/windowmanager/intern/wm_init_exit.c @@ -107,7 +107,7 @@ #include "UI_interface.h" #include "BLF_api.h" -#include "BLF_translation.h" +#include "BLT_lang.h" #include "GPU_buffers.h" #include "GPU_draw.h" @@ -167,7 +167,7 @@ void WM_init(bContext *C, int argc, const char **argv) ED_node_init_butfuncs(); BLF_init(11, U.dpi); /* Please update source/gamengine/GamePlayer/GPG_ghost.cpp if you change this */ - BLF_lang_init(); + BLT_lang_init(); /* Enforce loading the UI for the initial homefile */ G.fileflags &= ~G_FILE_NO_UI; @@ -176,7 +176,7 @@ void WM_init(bContext *C, int argc, const char **argv) wm_homefile_read(C, NULL, G.factory_startup, NULL); - BLF_lang_set(NULL); + BLT_lang_set(NULL); if (!G.background) { /* sets 3D mouse deadzone */ @@ -503,7 +503,7 @@ void WM_exit_ext(bContext *C, const bool do_python) #ifdef WITH_INTERNATIONAL BLF_free_unifont(); BLF_free_unifont_mono(); - BLF_lang_free(); + BLT_lang_free(); #endif ANIM_keyingset_infos_exit(); diff --git a/source/blender/windowmanager/intern/wm_keymap.c b/source/blender/windowmanager/intern/wm_keymap.c index 7570b4044b2..e658396fb16 100644 --- a/source/blender/windowmanager/intern/wm_keymap.c +++ b/source/blender/windowmanager/intern/wm_keymap.c @@ -50,7 +50,7 @@ #include "BKE_main.h" #include "BKE_screen.h" -#include "BLF_translation.h" +#include "BLT_translation.h" #include "RNA_access.h" #include "RNA_enum_types.h" diff --git a/source/blender/windowmanager/intern/wm_operators.c b/source/blender/windowmanager/intern/wm_operators.c index 1455b7000e9..f5706c1cab4 100644 --- a/source/blender/windowmanager/intern/wm_operators.c +++ b/source/blender/windowmanager/intern/wm_operators.c @@ -54,7 +54,7 @@ #include "DNA_windowmanager_types.h" #include "DNA_mesh_types.h" /* only for USE_BMESH_SAVE_AS_COMPAT */ -#include "BLF_translation.h" +#include "BLT_translation.h" #include "PIL_time.h" @@ -171,8 +171,8 @@ void WM_operatortype_append(void (*opfunc)(wmOperatorType *)) ot = MEM_callocN(sizeof(wmOperatorType), "operatortype"); ot->srna = RNA_def_struct_ptr(&BLENDER_RNA, "", &RNA_OperatorProperties); /* Set the default i18n context now, so that opfunc can redefine it if needed! */ - RNA_def_struct_translation_context(ot->srna, BLF_I18NCONTEXT_OPERATOR_DEFAULT); - ot->translation_context = BLF_I18NCONTEXT_OPERATOR_DEFAULT; + RNA_def_struct_translation_context(ot->srna, BLT_I18NCONTEXT_OPERATOR_DEFAULT); + ot->translation_context = BLT_I18NCONTEXT_OPERATOR_DEFAULT; opfunc(ot); if (ot->name == NULL) { @@ -194,8 +194,8 @@ void WM_operatortype_append_ptr(void (*opfunc)(wmOperatorType *, void *), void * ot = MEM_callocN(sizeof(wmOperatorType), "operatortype"); ot->srna = RNA_def_struct_ptr(&BLENDER_RNA, "", &RNA_OperatorProperties); /* Set the default i18n context now, so that opfunc can redefine it if needed! */ - RNA_def_struct_translation_context(ot->srna, BLF_I18NCONTEXT_OPERATOR_DEFAULT); - ot->translation_context = BLF_I18NCONTEXT_OPERATOR_DEFAULT; + RNA_def_struct_translation_context(ot->srna, BLT_I18NCONTEXT_OPERATOR_DEFAULT); + ot->translation_context = BLT_I18NCONTEXT_OPERATOR_DEFAULT; opfunc(ot, userdata); RNA_def_struct_ui_text(ot->srna, ot->name, ot->description ? ot->description : UNDOCUMENTED_OPERATOR_TIP); RNA_def_struct_identifier(ot->srna, ot->idname); @@ -405,7 +405,7 @@ wmOperatorType *WM_operatortype_append_macro(const char *idname, const char *nam RNA_def_struct_ui_text(ot->srna, ot->name, ot->description); RNA_def_struct_identifier(ot->srna, ot->idname); /* Use i18n context from ext.srna if possible (py operators). */ - i18n_context = ot->ext.srna ? RNA_struct_translation_context(ot->ext.srna) : BLF_I18NCONTEXT_OPERATOR_DEFAULT; + i18n_context = ot->ext.srna ? RNA_struct_translation_context(ot->ext.srna) : BLT_I18NCONTEXT_OPERATOR_DEFAULT; RNA_def_struct_translation_context(ot->srna, i18n_context); ot->translation_context = i18n_context; @@ -432,8 +432,8 @@ void WM_operatortype_append_macro_ptr(void (*opfunc)(wmOperatorType *, void *), ot->description = UNDOCUMENTED_OPERATOR_TIP; /* Set the default i18n context now, so that opfunc can redefine it if needed! */ - RNA_def_struct_translation_context(ot->srna, BLF_I18NCONTEXT_OPERATOR_DEFAULT); - ot->translation_context = BLF_I18NCONTEXT_OPERATOR_DEFAULT; + RNA_def_struct_translation_context(ot->srna, BLT_I18NCONTEXT_OPERATOR_DEFAULT); + ot->translation_context = BLT_I18NCONTEXT_OPERATOR_DEFAULT; opfunc(ot, userdata); RNA_def_struct_ui_text(ot->srna, ot->name, ot->description); @@ -3121,7 +3121,7 @@ static int wm_console_toggle_exec(bContext *UNUSED(C), wmOperator *UNUSED(op)) static void WM_OT_console_toggle(wmOperatorType *ot) { /* XXX Have to mark these for xgettext, as under linux they do not exists... */ - ot->name = CTX_N_(BLF_I18NCONTEXT_OPERATOR_DEFAULT, "Toggle System Console"); + ot->name = CTX_N_(BLT_I18NCONTEXT_OPERATOR_DEFAULT, "Toggle System Console"); ot->idname = "WM_OT_console_toggle"; ot->description = N_("Toggle System Console"); diff --git a/source/blender/windowmanager/intern/wm_window.c b/source/blender/windowmanager/intern/wm_window.c index d0ecec66d0b..af7e9c8ca33 100644 --- a/source/blender/windowmanager/intern/wm_window.c +++ b/source/blender/windowmanager/intern/wm_window.c @@ -47,7 +47,7 @@ #include "BLI_blenlib.h" #include "BLI_utildefines.h" -#include "BLF_translation.h" +#include "BLT_translation.h" #include "BKE_blender.h" #include "BKE_context.h" diff --git a/source/blenderplayer/CMakeLists.txt b/source/blenderplayer/CMakeLists.txt index bf85d7daf32..af367467e00 100644 --- a/source/blenderplayer/CMakeLists.txt +++ b/source/blenderplayer/CMakeLists.txt @@ -150,6 +150,7 @@ endif() bf_dna ge_videotex bf_blenfont + bf_blentranslation bf_intern_audaspace blenkernel_blc bf_bmesh diff --git a/source/gameengine/GamePlayer/ghost/CMakeLists.txt b/source/gameengine/GamePlayer/ghost/CMakeLists.txt index 48938b11cb9..283f222115c 100644 --- a/source/gameengine/GamePlayer/ghost/CMakeLists.txt +++ b/source/gameengine/GamePlayer/ghost/CMakeLists.txt @@ -42,6 +42,7 @@ set(INC ../../../blender/blenkernel ../../../blender/blenlib ../../../blender/blenloader + ../../../blender/blentranslation ../../../blender/gpu ../../../blender/imbuf ../../../blender/makesdna diff --git a/source/gameengine/GamePlayer/ghost/GPG_ghost.cpp b/source/gameengine/GamePlayer/ghost/GPG_ghost.cpp index a56d5b6d027..6ff8451f1d9 100644 --- a/source/gameengine/GamePlayer/ghost/GPG_ghost.cpp +++ b/source/gameengine/GamePlayer/ghost/GPG_ghost.cpp @@ -87,7 +87,8 @@ extern "C" // For BLF #include "BLF_api.h" -#include "BLF_translation.h" +#include "BLT_translation.h" +#include "BLT_lang.h" extern int datatoc_bfont_ttf_size; extern char datatoc_bfont_ttf[]; extern int datatoc_bmonofont_ttf_size; @@ -472,8 +473,8 @@ int main(int argc, char** argv) // Setup builtin font for BLF (mostly copied from creator.c, wm_init_exit.c and interface_style.c) BLF_init(11, U.dpi); - BLF_lang_init(); - BLF_lang_set(""); + BLT_lang_init(); + BLT_lang_set(""); BLF_load_mem("default", (unsigned char*)datatoc_bfont_ttf, datatoc_bfont_ttf_size); if (blf_mono_font == -1) @@ -1140,7 +1141,7 @@ int main(int argc, char** argv) #ifdef WITH_INTERNATIONAL BLF_free_unifont(); BLF_free_unifont_mono(); - BLF_lang_free(); + BLT_lang_free(); #endif IMB_exit(); diff --git a/source/gameengine/GamePlayer/ghost/SConscript b/source/gameengine/GamePlayer/ghost/SConscript index ac756281b15..be9f50f40fb 100644 --- a/source/gameengine/GamePlayer/ghost/SConscript +++ b/source/gameengine/GamePlayer/ghost/SConscript @@ -52,6 +52,7 @@ incs = [ '#source/blender/blenfont', '#source/blender/blenlib', '#source/blender/blenkernel', + '#source/blender/blentranslation', '#source/blender', '#source/blender/include', '#source/blender/makesdna', |