Refactor translation code out of blenfont
authorCampbell Barton <ideasman42@gmail.com>
Sun, 16 Aug 2015 07:32:01 +0000 (17:32 +1000)
committerCampbell Barton <ideasman42@gmail.com>
Mon, 17 Aug 2015 21:01:26 +0000 (07:01 +1000)
- 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:
build_files/cmake/macros.cmake
source/blender/CMakeLists.txt
source/blender/SConscript
source/blender/blenfont/BLF_api.h
source/blender/blenfont/BLF_translation.h [deleted file]
source/blender/blenfont/CMakeLists.txt
source/blender/blenfont/SConscript
source/blender/blenfont/intern/blf_font_i18n.c [new file with mode: 0644]
source/blender/blenfont/intern/blf_thumbs.c
source/blender/blenkernel/CMakeLists.txt
source/blender/blenkernel/SConscript
source/blender/blenkernel/intern/action.c
source/blender/blenkernel/intern/anim.c
source/blender/blenkernel/intern/anim_sys.c
source/blender/blenkernel/intern/constraint.c
source/blender/blenkernel/intern/context.c
source/blender/blenkernel/intern/customdata.c
source/blender/blenkernel/intern/deform.c
source/blender/blenkernel/intern/dynamicpaint.c
source/blender/blenkernel/intern/fcurve.c
source/blender/blenkernel/intern/fmodifier.c
source/blender/blenkernel/intern/gpencil.c
source/blender/blenkernel/intern/idcode.c
source/blender/blenkernel/intern/ipo.c
source/blender/blenkernel/intern/key.c
source/blender/blenkernel/intern/library.c
source/blender/blenkernel/intern/mask.c
source/blender/blenkernel/intern/modifier.c
source/blender/blenkernel/intern/nla.c
source/blender/blenkernel/intern/node.c
source/blender/blenkernel/intern/object.c
source/blender/blenkernel/intern/object_deform.c
source/blender/blenkernel/intern/particle.c
source/blender/blenkernel/intern/pointcache.c
source/blender/blenkernel/intern/report.c
source/blender/blenkernel/intern/scene.c
source/blender/blenkernel/intern/seqmodifier.c
source/blender/blenkernel/intern/sequencer.c
source/blender/blenkernel/intern/tracking.c
source/blender/blenkernel/intern/tracking_solver.c
source/blender/blenkernel/intern/tracking_util.c
source/blender/blenloader/CMakeLists.txt
source/blender/blenloader/SConscript
source/blender/blenloader/intern/readfile.c
source/blender/blenloader/intern/versioning_260.c
source/blender/blentranslation/BLT_lang.h [new file with mode: 0644]
source/blender/blentranslation/BLT_translation.h [new file with mode: 0644]
source/blender/blentranslation/CMakeLists.txt [new file with mode: 0644]
source/blender/blentranslation/SConscript [new file with mode: 0644]
source/blender/blentranslation/intern/blt_lang.c [moved from source/blender/blenfont/intern/blf_lang.c with 94% similarity]
source/blender/blentranslation/intern/blt_translation.c [moved from source/blender/blenfont/intern/blf_translation.c with 51% similarity]
source/blender/bmesh/CMakeLists.txt
source/blender/bmesh/SConscript
source/blender/bmesh/intern/bmesh_core.c
source/blender/bmesh/intern/bmesh_operators.c
source/blender/collada/AnimationImporter.cpp
source/blender/collada/CMakeLists.txt
source/blender/collada/SConscript
source/blender/editors/animation/CMakeLists.txt
source/blender/editors/animation/SConscript
source/blender/editors/animation/anim_channels_defines.c
source/blender/editors/animation/anim_ipo_utils.c
source/blender/editors/animation/fmodifier_ui.c
source/blender/editors/animation/keyframing.c
source/blender/editors/armature/CMakeLists.txt
source/blender/editors/armature/SConscript
source/blender/editors/armature/armature_edit.c
source/blender/editors/armature/armature_naming.c
source/blender/editors/armature/armature_relations.c
source/blender/editors/armature/meshlaplacian.c
source/blender/editors/armature/pose_lib.c
source/blender/editors/curve/CMakeLists.txt
source/blender/editors/curve/SConscript
source/blender/editors/curve/editcurve.c
source/blender/editors/curve/editcurve_add.c
source/blender/editors/gpencil/CMakeLists.txt
source/blender/editors/gpencil/SConscript
source/blender/editors/gpencil/drawgpencil.c
source/blender/editors/gpencil/gpencil_convert.c
source/blender/editors/gpencil/gpencil_data.c
source/blender/editors/gpencil/gpencil_edit.c
source/blender/editors/gpencil/gpencil_paint.c
source/blender/editors/interface/CMakeLists.txt
source/blender/editors/interface/SConscript
source/blender/editors/interface/interface.c
source/blender/editors/interface/interface_eyedropper.c
source/blender/editors/interface/interface_handlers.c
source/blender/editors/interface/interface_layout.c
source/blender/editors/interface/interface_ops.c
source/blender/editors/interface/interface_panel.c
source/blender/editors/interface/interface_regions.c
source/blender/editors/interface/interface_style.c
source/blender/editors/interface/interface_templates.c
source/blender/editors/interface/interface_utils.c
source/blender/editors/io/CMakeLists.txt
source/blender/editors/io/SConscript
source/blender/editors/io/io_collada.c
source/blender/editors/mesh/CMakeLists.txt
source/blender/editors/mesh/SConscript
source/blender/editors/mesh/editmesh_add.c
source/blender/editors/mesh/editmesh_bevel.c
source/blender/editors/mesh/editmesh_bisect.c
source/blender/editors/mesh/editmesh_inset.c
source/blender/editors/mesh/editmesh_knife.c
source/blender/editors/mesh/editmesh_loopcut.c
source/blender/editors/mesh/editmesh_tools.c
source/blender/editors/object/CMakeLists.txt
source/blender/editors/object/SConscript
source/blender/editors/object/object_add.c
source/blender/editors/object/object_constraint.c
source/blender/editors/object/object_edit.c
source/blender/editors/object/object_relations.c
source/blender/editors/object/object_select.c
source/blender/editors/physics/CMakeLists.txt
source/blender/editors/physics/SConscript
source/blender/editors/physics/dynamicpaint_ops.c
source/blender/editors/physics/rigidbody_object.c
source/blender/editors/render/CMakeLists.txt
source/blender/editors/render/SConscript
source/blender/editors/render/render_internal.c
source/blender/editors/render/render_shading.c
source/blender/editors/screen/CMakeLists.txt
source/blender/editors/screen/SConscript
source/blender/editors/screen/screen_ops.c
source/blender/editors/sculpt_paint/CMakeLists.txt
source/blender/editors/sculpt_paint/SConscript
source/blender/editors/sculpt_paint/paint_image_proj.c
source/blender/editors/sculpt_paint/paint_utils.c
source/blender/editors/sculpt_paint/sculpt.c
source/blender/editors/space_action/CMakeLists.txt
source/blender/editors/space_action/SConscript
source/blender/editors/space_action/action_data.c
source/blender/editors/space_action/action_edit.c
source/blender/editors/space_buttons/CMakeLists.txt
source/blender/editors/space_buttons/SConscript
source/blender/editors/space_buttons/buttons_context.c
source/blender/editors/space_buttons/buttons_ops.c
source/blender/editors/space_buttons/buttons_texture.c
source/blender/editors/space_clip/CMakeLists.txt
source/blender/editors/space_clip/SConscript
source/blender/editors/space_clip/clip_buttons.c
source/blender/editors/space_clip/clip_ops.c
source/blender/editors/space_clip/clip_toolbar.c
source/blender/editors/space_clip/tracking_ops.c
source/blender/editors/space_file/CMakeLists.txt
source/blender/editors/space_file/SConscript
source/blender/editors/space_file/file_draw.c
source/blender/editors/space_file/file_panels.c
source/blender/editors/space_graph/CMakeLists.txt
source/blender/editors/space_graph/SConscript
source/blender/editors/space_graph/graph_buttons.c
source/blender/editors/space_graph/graph_edit.c
source/blender/editors/space_image/CMakeLists.txt
source/blender/editors/space_image/SConscript
source/blender/editors/space_image/image_buttons.c
source/blender/editors/space_image/image_ops.c
source/blender/editors/space_info/CMakeLists.txt
source/blender/editors/space_info/SConscript
source/blender/editors/space_info/info_ops.c
source/blender/editors/space_info/info_stats.c
source/blender/editors/space_info/space_info.c
source/blender/editors/space_logic/CMakeLists.txt
source/blender/editors/space_logic/SConscript
source/blender/editors/space_logic/logic_ops.c
source/blender/editors/space_logic/logic_window.c
source/blender/editors/space_nla/CMakeLists.txt
source/blender/editors/space_nla/SConscript
source/blender/editors/space_nla/nla_buttons.c
source/blender/editors/space_nla/nla_edit.c
source/blender/editors/space_node/CMakeLists.txt
source/blender/editors/space_node/SConscript
source/blender/editors/space_node/drawnode.c
source/blender/editors/space_node/node_add.c
source/blender/editors/space_node/node_buttons.c
source/blender/editors/space_node/node_draw.c
source/blender/editors/space_node/node_group.c
source/blender/editors/space_node/node_relationships.c
source/blender/editors/space_node/node_templates.c
source/blender/editors/space_outliner/CMakeLists.txt
source/blender/editors/space_outliner/SConscript
source/blender/editors/space_outliner/outliner_draw.c
source/blender/editors/space_outliner/outliner_edit.c
source/blender/editors/space_outliner/outliner_tree.c
source/blender/editors/space_sequencer/CMakeLists.txt
source/blender/editors/space_sequencer/SConscript
source/blender/editors/space_sequencer/sequencer_buttons.c
source/blender/editors/space_sequencer/sequencer_edit.c
source/blender/editors/space_text/CMakeLists.txt
source/blender/editors/space_text/SConscript
source/blender/editors/space_text/text_header.c
source/blender/editors/space_text/text_ops.c
source/blender/editors/space_view3d/CMakeLists.txt
source/blender/editors/space_view3d/SConscript
source/blender/editors/space_view3d/view3d_buttons.c
source/blender/editors/space_view3d/view3d_draw.c
source/blender/editors/space_view3d/view3d_fly.c
source/blender/editors/space_view3d/view3d_header.c
source/blender/editors/space_view3d/view3d_toolbar.c
source/blender/editors/space_view3d/view3d_walk.c
source/blender/editors/transform/CMakeLists.txt
source/blender/editors/transform/SConscript
source/blender/editors/transform/transform.c
source/blender/editors/transform/transform_constraints.c
source/blender/editors/transform/transform_generics.c
source/blender/editors/transform/transform_ops.c
source/blender/editors/transform/transform_orientations.c
source/blender/editors/util/CMakeLists.txt
source/blender/editors/util/SConscript
source/blender/editors/util/ed_util.c
source/blender/editors/util/undo.c
source/blender/editors/uvedit/CMakeLists.txt
source/blender/editors/uvedit/SConscript
source/blender/editors/uvedit/uvedit_buttons.c
source/blender/editors/uvedit/uvedit_ops.c
source/blender/imbuf/intern/thumbs_font.c
source/blender/makesrna/SConscript
source/blender/makesrna/intern/CMakeLists.txt
source/blender/makesrna/intern/SConscript
source/blender/makesrna/intern/rna_access.c
source/blender/makesrna/intern/rna_actuator.c
source/blender/makesrna/intern/rna_constraint.c
source/blender/makesrna/intern/rna_controller.c
source/blender/makesrna/intern/rna_curve.c
source/blender/makesrna/intern/rna_define.c
source/blender/makesrna/intern/rna_gpencil.c
source/blender/makesrna/intern/rna_key.c
source/blender/makesrna/intern/rna_lamp.c
source/blender/makesrna/intern/rna_main_api.c
source/blender/makesrna/intern/rna_mask.c
source/blender/makesrna/intern/rna_modifier.c
source/blender/makesrna/intern/rna_nodetree.c
source/blender/makesrna/intern/rna_particle.c
source/blender/makesrna/intern/rna_pose.c
source/blender/makesrna/intern/rna_property.c
source/blender/makesrna/intern/rna_scene.c
source/blender/makesrna/intern/rna_sensor.c
source/blender/makesrna/intern/rna_sequencer.c
source/blender/makesrna/intern/rna_space.c
source/blender/makesrna/intern/rna_speaker.c
source/blender/makesrna/intern/rna_text.c
source/blender/makesrna/intern/rna_ui.c
source/blender/makesrna/intern/rna_ui_api.c
source/blender/makesrna/intern/rna_userdef.c
source/blender/makesrna/intern/rna_wm.c
source/blender/nodes/CMakeLists.txt
source/blender/nodes/SConscript
source/blender/nodes/composite/node_composite_tree.c
source/blender/nodes/composite/node_composite_util.h
source/blender/nodes/composite/nodes/node_composite_keying.c
source/blender/nodes/intern/node_common.c
source/blender/nodes/intern/node_util.c
source/blender/nodes/shader/node_shader_tree.c
source/blender/nodes/shader/node_shader_util.h
source/blender/nodes/texture/node_texture_tree.c
source/blender/nodes/texture/node_texture_util.h
source/blender/python/SConscript
source/blender/python/intern/CMakeLists.txt
source/blender/python/intern/bpy_app_translations.c
source/blender/python/intern/bpy_util.c
source/blender/render/CMakeLists.txt
source/blender/render/SConscript
source/blender/render/intern/source/convertblender.c
source/blender/render/intern/source/envmap.c
source/blender/render/intern/source/external_engine.c
source/blender/render/intern/source/occlusion.c
source/blender/render/intern/source/pipeline.c
source/blender/render/intern/source/pointdensity.c
source/blender/render/intern/source/rayshade.c
source/blender/render/intern/source/sss.c
source/blender/render/intern/source/volume_precache.c
source/blender/render/intern/source/voxeldata.c
source/blender/windowmanager/CMakeLists.txt
source/blender/windowmanager/SConscript
source/blender/windowmanager/intern/wm_dragdrop.c
source/blender/windowmanager/intern/wm_files.c
source/blender/windowmanager/intern/wm_init_exit.c
source/blender/windowmanager/intern/wm_keymap.c
source/blender/windowmanager/intern/wm_operators.c
source/blender/windowmanager/intern/wm_window.c
source/blenderplayer/CMakeLists.txt
source/gameengine/GamePlayer/ghost/CMakeLists.txt
source/gameengine/GamePlayer/ghost/GPG_ghost.cpp
source/gameengine/GamePlayer/ghost/SConscript

index e7fc0ec0a6e89f84dc4e23aa217a9ba9c208f116..5a870aa23191eba54701fa6276f50d224ba8dbe8 100644 (file)
@@ -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
index 9a73921bbc71cb42107d9f978ee367ed96414dac..e36f9e2b43eac72472861171427685209955e795 100644 (file)
@@ -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)
index e987b6be7792adf19ff6b2ad63c6fce120b87b67..c6f4994bb4f2a4e75ff065925969d64c6e779272 100644 (file)
@@ -33,6 +33,7 @@ SConscript(['avi/SConscript',
             'blenkernel/SConscript',
             'blenlib/SConscript',
             'blenloader/SConscript',
+            'blentranslation/SConscript',
             'depsgraph/SConscript',
             'gpu/SConscript',
             'editors/SConscript',
index 09734bd97544af0458936adaf72053d49ea279f5..d8dee7110a5b5b46cf827d2784ece0b3a69fdbd9 100644 (file)
@@ -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 (file)
index c9b0c25..0000000
+++ /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__ */
index 059e2cac68074bad8d670542ea3f03ace8329dd0..36ad6fe03cfd54124ececafcb859ec019dc3ee45 100644 (file)
@@ -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
 )
index fdb5f6695972a9ebd206564cfdee0ff1125a1c4e..6c3b5748011e480faf6190a793fdabd1c66db66a 100644 (file)
@@ -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 (file)
index 0000000..da7d2ad
--- /dev/null
@@ -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
+}
index 4b7a568b8b0ab308875dff246cf13c46bc80363b..4eea5d581d046f2d91346bb5549bf94e537ffd4d 100644 (file)
@@ -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;
 
index 5a3fb49276212f3255d0e4207283bfc7ea2c3648..0865efb5ba70f093a7ddb7d70bda3dceb439fa6b 100644 (file)
@@ -28,6 +28,7 @@ set(INC
        ../blenfont
        ../blenlib
        ../blenloader
+       ../blentranslation
        ../depsgraph
        ../gpu
        ../ikplugin
index 853e2b0543376c408ed014c637c2eb8aa8c03933..edb2852d9ace88774c5321815eea8874fcf36e56 100644 (file)
@@ -56,6 +56,7 @@ incs = [
     '../blenfont',
     '../blenlib',
     '../blenloader',
+    '../blentranslation',
     '../bmesh',
     '../depsgraph',
     '../gpu',
index 1b73978b524fbdc7ef8fc53afd74b91ed5c250b2..5b1a6ea7a51eacd3e855c94caf295a0076c20723 100644 (file)
@@ -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"
index b878dbe1f39b2bab6e1a846e5feeff377848935b..dff696863e99253c3b67d65c2a66919be8b995c6 100644 (file)
@@ -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"
index d5a8b8f857cbd44bdd09970a4d0a32a6606c46f7..8010d3450cb7d9960c1986d2d599b3a52e5d7a6f 100644 (file)
@@ -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"
index be466c29a1205170c91ad7241209e5106f64433e..e7f6210fef49a0ee1ecb5235d6d1bc3213dad356 100644 (file)
@@ -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"
index 7142c0925832b9f89e295ea6ba3c1e20cb9f7918..d223a3aff9e975499c4f4c2ba831d129dcc759b1 100644 (file)
@@ -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"
index 6947e9c36444131462774d8c33ec046c95db6a71..2e377195d672ed260006c31b45c59d806c9fa454 100644 (file)
@@ -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"
index 6e5747ac9c99ba1e34761fc7ca1e28d0927780fc..6670c3359d7832045c3138cdbfd3a0cdfa6c8330 100644 (file)
@@ -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"
index 12d6bf727421297644d9ab81b713e824403a8b5f..d97233aad909b5273363dc11dfd6c9570454dd77 100644 (file)
@@ -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);
 
index 7f94ec1f8d97b907dcc6c750666ad157fede6740..a75711b311ce497288d061209a2b65958a4f90e1 100644 (file)
@@ -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' */
index 04c5ddd8ef3ea3000b4d1aebdbb529ce86b1ca1c..2305ae89abd35f448c83b226656e410729c7ca45 100644 (file)
@@ -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"
index 38a84296ca6d48ab29a0f0fab297bd8c564d6f26..ee5c91923716121789da4b189d98e578a4e5e781 100644 (file)
@@ -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"
index 3101d7874a6581e7f72bce388eb7eff1637874f3..cedaab4a9b3b5f5686695f2571da446a4b206b70 100644 (file)
@@ -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;
 }
 
 /**
index 6d37f3ae006d4a17de6071a99022b2ab57799dfb..0c3fd48628f83cb94c2befd3a2b9b1dd1d452eed 100644 (file)
@@ -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"
index 8427b17c01a9d9381ee79e3cd358313a271fc9a1..b591dc196854a05bf6b6af4ab1235177355f6bb6 100644 (file)
@@ -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"
index b4bb07f0d3a16b41f87595b9750ddef9f21590c4..8bb2864a604825110f845dead8738bafdf0efe2e 100644 (file)
@@ -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"
index dd179ff91d27fdd767f1e7df9445aacbcf7f5b7d..141597e859c41710a7369d724ba22da37745bd1b 100644 (file)
@@ -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"
index 1f6d40dafa3e2d337b1d437302c810da7e5a375e..b2c0c6d6d0a23cbaff265d4aaa9b1e0f4ef570f7 100644 (file)
@@ -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"
index 037b44e0d8ca913fc13220dd432e6e8498529c7f..a04eb9bd6117784e03c5905b140905a24f86f599 100644 (file)
@@ -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"
index d91d06e9706f96023ba416722c82d09b3c47ebf0..3bcdb93729f102402bf933239a7b0fbacfe8cf0b 100644 (file)
@@ -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"
index 12346ab15c631b57b3c947f9631e89e364910414..352999c96da21df3f1d29cab9085db558541c689 100644 (file)
@@ -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"
index bf668ef56b4e9d2b19eacc038cb80fb11fbba68e..e823f87468dd7573e413b68992b2c07601005654 100644 (file)
@@ -27,7 +27,7 @@
 
 #include "MEM_guardedalloc.h"
 
-#include "BLF_translation.h"
+#include "BLT_translation.h"
 
 #include "BLI_utildefines.h"
 #include "BLI_ghash.h"
index 6c354c59d7a57723c95977b13f137e47bb04bfce..9aacba8d02ec2322f1b776b1d914964a811080fc 100644 (file)
@@ -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"
index c6ea9e0f4f8523fb09aafa0660879e77987cd9cc..9054ecc7c3f5a143cb9df9bbc112977436004bc8 100644 (file)
@@ -51,7 +51,7 @@
 #include "BLI_math.h"
 #include "BLI_utildefines.h"
 
-#include "BLF_translation.h"
+#include "BLT_translation.h"
 
 #include "PIL_time.h"
 
index b2178fe69b3491cab2d1273c9801e09f9eb93d62..3b371ce1e2ffca357883822fc409b9db9a562155 100644 (file)
@@ -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 */
index 14cb5859918aeab039cfff58aa91b4e18ae8ae07..701483af43fa7c447961d1a8051c5b10c9f89254 100644 (file)
@@ -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"
index f543a9f4c652dc8460cbff95cdd828917711ea65..07242aa2f6e632a9779838690934a6962f72cd5e 100644 (file)
@@ -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));
 }
 
index 628546846ba758fbe974392253aac176aa1879b0..aa0e13124b88a62728a9c4e82947c1ac4413efba 100644 (file)
@@ -59,7 +59,7 @@
 #  include <unistd.h>
 #endif
 
-#include "BLF_translation.h"
+#include "BLT_translation.h"
 
 #include "BKE_animsys.h"
 #include "BKE_depsgraph.h"
index c5ccaa63992726f79bbc1c1525cefa4ac7654609..9368e58d467a786ec775589fb27c9117319a2665 100644 (file)
@@ -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));
 }
 
index fbabda89f2afb25848db5a5c511918b676353479..c21883c6eb88b0ce7e7d95801a6bc105970cecf5 100644 (file)
@@ -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"
index 56119b732fcd2a545afff6a5abd483b7e42916b1..1cbfc5eb834f071b2818a3467202bc4fc2ecb582 100644 (file)
@@ -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;
index 7f557d3de22cedd0470198b92c16a148cff3d7e9..8364df382082bde0e3343268eddd5a73295cb738 100644 (file)
@@ -28,6 +28,7 @@ set(INC
        ../blenfont
        ../blenkernel
        ../blenlib
+       ../blentranslation
        ../imbuf
        ../makesdna
        ../makesrna
index 31dfc71ac734dc88c4e191c60936ec13f1dec62f..7f2a1e0723cbade27641479c47a64f2c9493c3da 100644 (file)
@@ -35,6 +35,7 @@ incs = [
     '../blenfont',
     '../blenkernel',
     '../blenlib',
+    '../blentranslation',
     '../imbuf',
     '../makesdna',
     '../makesrna',
index 51d25b463a3b175dbf58464ec27adfaf25a62c72..ccb389bdcb2ac6b7c097ce0ff3ae986cffc9c5b7 100644 (file)
 #include "BLI_threads.h"
 #include "BLI_mempool.h"
 
-#include "BLF_translation.h"
+#include "BLT_translation.h"
 
 #include "BKE_action.h"
 #include "BKE_armature.h"
index c66b9d1fae9a32546c6dc106b463488e37713bad..25074effaabad7a759b0e531e9d4abbfc9ca25e9 100644 (file)
@@ -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 (file)
index 0000000..0f9bac9
--- /dev/null
@@ -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 (file)
index 0000000..66993d7
--- /dev/null
@@ -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 (file)
index 0000000..59bd7f0
--- /dev/null
@@ -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 (file)
index 0000000..c7e9853
--- /dev/null
@@ -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])
similarity index 94%
rename from source/blender/blenfont/intern/blf_lang.c
rename to source/blender/blentranslation/intern/blt_lang.c
index 4683081a1ed1b943e2c1e32282a46f3c8560d3a6..a0e1fe67268ae8a3d6c377e2d5ae7ff2cb1242ba 100644 (file)
@@ -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;
 
similarity index 51%
rename from source/blender/blenfont/intern/blf_translation.c
rename to source/blender/blentranslation/intern/blt_translation.c
index 5d828d9b7beb3a7428f6761375eb5053fcaa618f..2651fbbe1f02236ea9b873105eb916991ac87f0a 100644 (file)
@@ -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
 #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;
index 66ee184a5bc3dc780423fb29426dd4be1a012d3e..257768b0ac8b1ebe8b4da4f1a73a379ff4ce6d23 100644 (file)
@@ -25,9 +25,9 @@
 
 set(INC
        .
-       ../blenfont
        ../blenkernel
        ../blenlib
+       ../blentranslation
        ../makesdna
        ../../../intern/guardedalloc
        ../../../extern/rangetree
index de839f7f6a6937651eaaf30abc375fde24ea2029..c53974be1a77686f254f8131826da24f52d8ca78 100644 (file)
@@ -35,8 +35,8 @@ sources += env.Glob('tools/*.c')
 
 incs = [
     './',
-    '../blenfont',
     '../blenlib',
+    '../blentranslation',
     '../makesdna',
     '../blenkernel',
     '#/intern/guardedalloc',
index 4c09a35bdd11911b5135ffbd35cf4fe5d5e2b9e9..5bb418a5102e637b725b01740f429431ec8b8d4b 100644 (file)
@@ -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"
 
index dda1f2fe30af421d8093a870c011c28fb1204352..e65f3e389001e1c9ba6a5818014c91750ee0db56 100644 (file)
@@ -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"
index 7e937e4278716aacc70d6c10164b8f1e9001c60f..e5f7bb2eb89ce9342b03539957467a9f659f4863 100644 (file)
@@ -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);
        }
 
index 24daa41201de178d53a9db4813cd80e02084a762..293049a1a0572a0b6912e19592405468481b3c6e 100644 (file)
@@ -29,7 +29,7 @@ set(INC
        .
        ../blenkernel
        ../blenlib
-       ../blenfont
+       ../blentranslation
        ../editors/include
        ../makesdna
        ../makesrna
index 1bd3947ff49920cca77270be02eef13523e2b929..7853769a0f85c7b5a07c9573c3b72643f10c48c0 100644 (file)
@@ -36,8 +36,8 @@ incs = [
     '../ikplugin',
     '#/intern/iksolver/extern',
     '../blenlib',
-    '../blenfont',
     '../blenkernel',
+    '../blentranslation',
     '../windowmanager',
     '../makesdna',
     '../makesrna',
index b9f50a6cdf1eb805d0691e24b169542e7216fb67..473b0e6bc5afd885e61b3b278177081352cb5b35 100644 (file)
@@ -20,9 +20,9 @@
 
 set(INC
        ../include
-       ../../blenfont
        ../../blenkernel
        ../../blenlib
+       ../../blentranslation
        ../../gpu
        ../../makesdna
        ../../makesrna
index 11eea4dc4f2dd763c2f5a9da0a1e1fb6b7f9093e..fb5ff53cf163fbd6ae9c7697ce26fc2082d9d4f9 100644 (file)
@@ -34,9 +34,9 @@ incs = [
     env['BF_GLEW_INC'],
     '#/intern/glew-mx',
     '../include',
-    '../../blenfont',
     '../../blenkernel',
     '../../blenlib',
+    '../../blentranslation',
     '../../gpu',
     '../../makesdna',
     '../../makesrna',
index acc3c9c2a334d9312463cc0164e645a9e0925b00..6979850c21af7a6baaca03b5656b3aa611325003 100644 (file)
@@ -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"
index 57df6d32f0328fed5600e71bdbcc827709cc3ec5..ae6894ac5460a7511e5e823265616eb94b347999 100644 (file)
@@ -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"
 
index 2c0018b000d19524f798ed4a27cef9f039ec4750..91705d632863f09d3703c9190a32a5fbc6145fc7 100644 (file)
@@ -45,7 +45,7 @@
 
 #include "MEM_guardedalloc.h"
 
-#include "BLF_translation.h"
+#include "BLT_translation.h"
 
 #include "BLI_blenlib.h"
 #include "BLI_utildefines.h"
index 46997f96dc799205c25cacb888eeeea236232883..479b4272755f9d9cf141af2757a8997ef6e0f0fe 100644 (file)
@@ -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"
index fc211f0e60b4a2768a9e9b0d8097435fb1aa52ec..1ed70b3cd986a20023f13401c1ff5f037127849b 100644 (file)
@@ -20,9 +20,9 @@
 
 set(INC
        ../include
-       ../../blenfont
        ../../blenkernel
        ../../blenlib
+       ../../blentranslation
        ../../gpu
        ../../makesdna
        ../../makesrna
index 8249dc00c1779fb84e823fe690d4f1d15eb60a4a..9c3959ecb5be4e0aa6b08e1ce5152cef958db20e 100644 (file)
@@ -35,9 +35,9 @@ incs = [
     '#/intern/glew-mx',
     '#/intern/opennl/extern',
     '../include',
-    '../../blenfont',
     '../../blenkernel',
     '../../blenlib',
+    '../../blentranslation',
     '../../gpu',
     '../../makesdna',
     '../../makesrna',
index 1b9a09bd2c552e6076476884840bf3bfa2925ab2..5a0e70dc5dd912e3a4ca54ae408d118e29093109 100644 (file)
@@ -38,7 +38,7 @@
 
 #include "MEM_guardedalloc.h"
 
-#include "BLF_translation.h"
+#include "BLT_translation.h"
 
 #include "BLI_blenlib.h"
 #include "BLI_math.h"
index eedff89631515eb03ca8c8ceb27d9c4229f4b68b..56dbdb3a6396df5a43060a2b5bba226f70c8b49e 100644 (file)
@@ -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"
index 8cda6f6db77231c5c9ea2f531b2da78fc29e4871..1c342657eecdc5f293abfee1b3c11450fdbfcd29 100644 (file)
@@ -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;
        
index 66490dabba566de9c388981fd81d970abbc6a50d..543874b44d00fe37b3ddeb5915e040440ec85030 100644 (file)
@@ -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"
index 3ced37dcfb22e0298fb7990b7f305d5d29040ba7..31e6c8c2bb81fcbc739394ebf877f35da8ea3d9e 100644 (file)
@@ -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"
index 66c281df5fad6bd34f132ecd6ca670dc225e64d8..83346e9550c20a59d1c909f9b273a7f47312ac45 100644 (file)
@@ -20,9 +20,9 @@
 
 set(INC
        ../include
-       ../../blenfont
        ../../blenkernel
        ../../blenlib
+       ../../blentranslation
        ../../makesdna
        ../../makesrna
        ../../windowmanager
index 4760a212a8a58daee4a58b2beeaee656f8257dae..eadec4f65b635217e2e01efae25970d98dbdeb29 100644 (file)
@@ -34,9 +34,9 @@ defs = []
 incs = [
     '#/intern/guardedalloc',
     '../include',
-    '../../blenfont',
     '../../blenkernel',
     '../../blenlib',
+    '../../blentranslation',
     '../../makesdna',
     '../../makesrna',
     '../../render/extern/include',
index d410111b16df7b1d112adb288bfe3b40b796cdee..f7dab0c093598158df444651c3bb66ac67c876f0 100644 (file)
@@ -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"
index 555a53ae53266192a4466f87abe4b84dfd884239..5347ef05105ff95cb23488c5ede687f5a5821dfc 100644 (file)
@@ -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");
        }
 }
 
index 56b8d2843860cf651ee322879d2e0372388007a6..83a13abb33ff2d93edbb42dc133d53583e9e3c68 100644 (file)
@@ -23,6 +23,7 @@ set(INC
        ../../blenfont
        ../../blenkernel
        ../../blenlib
+       ../../blentranslation
        ../../imbuf
        ../../gpu
        ../../makesdna
index 8e2ac5dc61e77ab7bfdb7c1326d141fccf161aae..3830a164b7b435b20fc29bc2b6faa84967615d3d 100644 (file)
@@ -38,6 +38,7 @@ incs = [
     '../../blenfont',
     '../../blenkernel',
     '../../blenlib',
+    '../../blentranslation',
     '../../bmesh',
     '../../gpu',
     '../../imbuf',
index b28c948db9f4290d034d373cb273b973f254762d..ff8984ae3298ad15b1a0c6471f46db4e7a5d0edc 100644 (file)
@@ -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"
index 2c8f86423a59b85fca194e7c88df030de289766c..e8d73eaffdf74bb1f7dddce45a1e5879c33c0a69 100644 (file)
@@ -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"
index fa76029bb2edd40ffcc7146cd84c3eaf81fefda5..de9667766453475b693eacf34c3fbfbe22aa3f67 100644 (file)
@@ -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"
index cc7cb9025204a878fa18fbcf3f2d87dcff37e0fb..5c37a0a5b60583a4ac5e011c0c6e0c74bf2ba46a 100644 (file)
@@ -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"
index cccb958153b7118d8894340223c2ac797915d59d..184482eeacb12fa35ca2e013f52a7a03f5bb2ffd 100644 (file)
@@ -40,7 +40,7 @@
 #include "BLI_math.h"
 #include "BLI_utildefines.h"
 
-#include "BLF_translation.h"
+#include "BLT_translation.h"
 
 #include "PIL_time.h"
 
index 972eca747b9d9cfb9a80dadea10d374e788ec171..3efb4921bbe40a80ffa23ebfac35f13f51250a23 100644 (file)
@@ -23,6 +23,7 @@ set(INC
        ../../blenfont
        ../../blenkernel
        ../../blenlib
+       ../../blentranslation
        ../../gpu
        ../../imbuf
        ../../makesdna
index 7584fd8ad46b1f05d7754cf532c5c0f6fcca221e..ea6f35c54e64a38a007677a690b1514a8a5893bf 100644 (file)
@@ -37,6 +37,7 @@ incs = [
     '../../blenfont',
     '../../blenkernel',
     '../../blenlib',
+    '../../blentranslation',
     '../../gpu',
     '../../imbuf',
     '../../makesdna',
index 31976c7b78af6f749d5e1273d24317402ba09247..8efa14a5358b3172bad85885890c643df13fbf15 100644 (file)
@@ -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);
                }
index 97aa865c28745a146d3d97937eae8899f067aa2b..ceea4ff42d9ab5c9a46775809426cefb2eb6e96b 100644 (file)
@@ -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"
index 4adc866d3a7c06e723ec48a8a711bccfd7fc5d50..231ba03000ba67d974f15a287a198b9e62d7aa4c 100644 (file)
@@ -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! */
index 6b16bc95d7f5f27510f9a7edfdc58b04e4dae1b4..d746acc14a1ebea0afa9fc7c623ee0c119ca46af 100644 (file)
@@ -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"
index c3f178d9ef290a93e4492e0e69e94c4efe92aca1..6ac657fa7a3b997bc14f0e296cee4c1ec8e69c64 100644 (file)
@@ -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;
 }
index c69aed76b22c6b1c41deb4151b44f40ebf2cd589..f4970ceb35ef920719a85368984c967ba97b7aa2 100644 (file)
@@ -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"
 
index 6552625c9114f7cb88f25f09eb97aa50d1e9a3f5..c9b15f05519f401e76e2d757023d5aee5a867eee 100644 (file)
@@ -62,7 +62,7 @@
 #include "UI_view2d.h"
 
 #include "BLF_api.h"
-#include "BLF_translation.h"
+#include "BLT_translation.h"
 
 #include "ED_screen.h"
 
index 10575fcbc547298d24400d9f2581300384599d3b..8dca148ffe61e915b236fe8b0c78f8982afe2507 100644 (file)
@@ -49,7 +49,7 @@
 
 #include "BLF_api.h"
 #ifdef WITH_INTERNATIONAL
-#  include "BLF_translation.h"
+#  include "BLT_translation.h"
 #endif
 
 #include "UI_interface.h"
index 80e098cfdc955576a935a6d83ed05c1eb15d0b0d..6b2f12eef45fb0100f08c8113f97d14b6588cd49 100644 (file)
@@ -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");
                        }
                }
index 0823238fcb180c74294c2279f267622da04e8252..1d51c0588b6b32cf87509edf0540f66ebdc8942f 100644 (file)
@@ -41,7 +41,7 @@
 #include "BLI_string.h"
 #include "BLI_listbase.h"
 
-#include "BLF_translation.h"
+#include "BLT_translation.h"
 
 #include "BKE_report.h"
 
index f331dea5c5cc992173ba569d3971f235bc688560..828cb494eab4a7e88500e446affabc49bcf93dcc 100644 (file)
@@ -20,9 +20,9 @@
 
 set(INC
        ../include
-       ../../blenfont
        ../../blenkernel
        ../../blenlib
+       ../../blentranslation
        ../../bmesh
        ../../makesdna
        ../../makesrna
index 0facb24e2c3293d90ff2bf97c897e74868a45937..2b1a638b891d6dc8aab3c6786c8e297ff30cb2dc 100644 (file)
@@ -33,9 +33,9 @@ defs = []
 
 incs = [
     '../include',
-    '../../blenfont',
     '../../blenkernel',
     '../../blenlib',
+    '../../blentranslation',
     '../../collada',
     '../../makesrna',
     '../../windowmanager',
index 93e9a2047045e86d74f1a279186410a67b0eee0b..63147b542e719f71054b92962f96e8a808269bf1 100644 (file)
@@ -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"
index db20d42f39db42a071349f9fd0a1444741fe689d..0280f662a268bb23a045e8150a41f0d1eb640743 100644 (file)
@@ -21,9 +21,9 @@
 set(INC
        ../include
        ../uvedit
-       ../../blenfont
        ../../blenkernel
        ../../blenlib
+       ../../blentranslation
        ../../bmesh
        ../../gpu
        ../../imbuf
index 8b41241cea1b349c015082f322023090a5e1275f..df58b2a90b37c5857dc4387536a9979345a5512f 100644 (file)
@@ -38,9 +38,9 @@ incs = [
     '#/intern/glew-mx',
     '../include',
     '../uvedit',
-    '../../blenfont',
     '../../blenkernel',
     '../../blenlib',
+    '../../blentranslation',
     '../../bmesh',
     '../../gpu',
     '../../imbuf',
index 7af6c59adab8952001c2d7cd8ff1410864db60ff..e073a255f733cea09056a87933deaecff23ed857 100644 (file)
@@ -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(
index dda21b39264491356369910a2b46e0d27ae0cbaa..ce6856321d2d7023805737a267e48c549176526a 100644 (file)
@@ -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"
index db4b0c16d9d22e9f7f39d4a2c24b0ca73dd0f014..08d0697e0f1482227f5257f3f14f8ec81261d74b 100644 (file)
@@ -33,7 +33,7 @@
 
 #include "BLI_math.h"
 
-#include "BLF_translation.h"
+#include "BLT_translation.h"
 
 #include "BKE_global.h"
 #include "BKE_context.h"
index a5874b94edfe6f4f85856435d28cbb8d0e9807d1..c037b0c6b0f3b5b5d91795fe1dec9358827b707d 100644 (file)
@@ -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"
index caee5d442547710c7e4f5f8d5e6eb7078eeee3c7..930dba229d45b2fdf76f8d896f175f107f61f29d 100644 (file)
@@ -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"
index 74a40a23fe118a54fff076f8ffcfbafaa1ba30c2..50257d250dc4369d50cebef6cc98fcdd2eb65cc1 100644 (file)
@@ -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);
index ca1ce42db5ac5061fb0cf1f05cd0e9d613fd5b97..d3937188358463186158bbfdf601b22c597affb7 100644 (file)
@@ -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)
index 79437bb05b9144594ecbce42baacca96699f2a85..b3d02d45e13231ea1e6b26a8d3962fd5ecfedb4d 100644 (file)
@@ -20,9 +20,9 @@
 
 set(INC
        ../include
-       ../../blenfont
        ../../blenkernel
        ../../blenlib
+       ../../blentranslation
        ../../bmesh
        ../../gpu
        ../../ikplugin
index db30fae1f842608019dfa53e5dace4d655ad4145..914ffa3061c3aa8a74c1aacc4aca130f8321e2b8 100644 (file)
@@ -33,9 +33,9 @@ incs = [
     '#/extern/recastnavigation',
     '#/intern/guardedalloc',
     '../include',
-    '../../blenfont',
     '../../blenkernel',
     '../../blenlib',
+    '../../blentranslation',
     '../../bmesh',
     '../../gpu',
     '../../ikplugin',
index 075e382f628c23a05997cb68542276570aeadb61..615fbb527b38338a7f92ebea0b04a73ee385881b 100644 (file)
@@ -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);
index e14674ef5172321655d9ea17c75cde337e392bc0..2697a5e5fb11e118b534812241042fa999a0f057 100644 (file)
@@ -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"
index 3499a3cc3649592ce472d516ac2b97d7da582872..67edf0db2d793432ff9facfbba1acc7fad3f535c 100644 (file)
@@ -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"
index 8da535315b291394d14686777b75c7f895cdcd0b..e21f58d8a382a25036a3be0d52d7287255f4651c 100644 (file)
@@ -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"
index a8e4eec640b3cd89ad0a53e41b9ea54b4f66742c..83334e4e6a38d6f6296eb1776678cf9017ace0e3 100644 (file)
@@ -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"
index 40d555226f32f8323b36e3d8795a4280fab052fe..898422dac5181c5ec3b5efe81ce94399b653a4c1 100644 (file)
@@ -20,9 +20,9 @@
 
 set(INC
        ../include
-       ../../blenfont
        ../../blenkernel
        ../../blenlib
+       ../../blentranslation
        ../../gpu
        ../../makesdna
        ../../makesrna
index 98d6be6d0bcefb3b5ea1d751c9546a79dcd52f98..be399a587329f0e8623c1ac3175cf69e5bffe15a 100644 (file)
@@ -36,9 +36,9 @@ incs = [
     '#/intern/rigidbody',
     '#/intern/elbeem/extern',
     '../include',
-    '../../blenfont',
     '../../blenkernel',
     '../../blenlib',
+    '../../blentranslation',
     '../../gpu',
     '../../makesdna',
     '../../makesrna',
index 245d8790399854139467a3b29e851a204a727043..93daa15e608684a939e1bcc3b3ae2fa134e7c61d 100644 (file)
@@ -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"
index c8b944f7d2a5ccb1175f7a7f0914d3887a8c9829..949084973cfeb4b8bc0cd6adb17905b5081b89a2 100644 (file)
@@ -40,7 +40,7 @@
 
 #include "BLI_blenlib.h"
 
-#include "BLF_translation.h"
+#include "BLT_translation.h"
 
 #include "BKE_context.h"
 #include "BKE_depsgraph.h"
index 42dafc076ed8786ebdfbf827dc647cda467ef8e9..971ab9f3458d4d2853b8cb88d9d04e5e969034af 100644 (file)
 
 set(INC
        ../include
-       ../../blenfont
        ../../blenkernel
        ../../blenlib
        ../../blenloader
+       ../../blentranslation
        ../../gpu
        ../../imbuf
        ../../bmesh
index ada0c6cf251547b717988ade1bd280188ef46672..24270ca2324aafec093e03c8a5c234b09fd48101 100644 (file)
@@ -39,6 +39,7 @@ incs = [
     '../../blenkernel',
     '../../blenlib',
     '../../blenloader',
+    '../../blentranslation',
     '../../bmesh',
     '../../gpu',
     '../../imbuf',
index ec3f199174dcef538370251111fa0672b1277b35..755b8dd303dd8a8ac3774c72474e1f578156f86f 100644 (file)
@@ -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"
index c451cc825924c027726df298098dbe048ec53b8c..5ccf7fc71a80cd42054ac2ae6c1842aac517c20b 100644 (file)
@@ -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"
index 413d40b9f9c3a6e1d3df0ce336b51c9688ad9b5d..ed86ffa5e1639eb94a0d9803b4975630ad565e85 100644 (file)
@@ -23,6 +23,7 @@ set(INC
        ../../blenfont
        ../../blenkernel
        ../../blenlib
+       ../../blentranslation
        ../../bmesh
        ../../gpu
        ../../imbuf
index 355e30653125b33317973bd3fb4e2ce2f402f90c..5f48894c3e76e7d359fa24ef21aa24e24c39ebd3 100644 (file)
@@ -37,6 +37,7 @@ incs = [
     '../../blenfont',
     '../../blenkernel',
     '../../blenlib',
+    '../../blentranslation',
     '../../bmesh',
     '../../gpu',
     '../../imbuf',
index 1309fb103e996798bafdb4f25393e7fd5e2da9a2..e8d76197715f12247187b5f44ec4061b897c0958 100644 (file)
@@ -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"
index 0fa5f2d9837037103033d9314e165fd6def3572c..46753df4e13aaef08c971c6db718ae6467c96410 100644 (file)
@@ -23,7 +23,7 @@ set(INC
        ../uvedit
        ../../blenkernel
        ../../blenlib
-       ../../blenfont
+       ../../blentranslation
        ../../bmesh
        ../../gpu
        ../../imbuf
index ba20337548a57cd7a47ef2e301e54d9d6770a871..52fab472189320e48e36e76979963a7877b5f7fa 100644 (file)
@@ -38,9 +38,9 @@ incs = [
     '#/intern/glew-mx',
     '../include',
     '../uvedit',
-    '../../blenfont',
     '../../blenkernel',
     '../../blenlib',
+    '../../blentranslation',
     '../../bmesh',
     '../../gpu',
     '../../imbuf',
index d54db048faffe6e3a8a0f557ecf1a3a5179194df..33ea3ceac092cc297d1126fde4620157f7ca2f47 100644 (file)
@@ -49,7 +49,7 @@
 #include "BLI_threads.h"
 #include "BLI_utildefines.h"
 
-#include "BLF_translation.h"
+#include "BLT_translation.h"
 
 
 #include "IMB_imbuf.h"
index c76bae01308a8e46d690865b46c5349672377473..7b66632fa427689ec9951881603f9bec3fcedffa 100644 (file)
@@ -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 :/ */
 }
 
 
index 558306773e4899191f4f76de6816682e1f7a1620..3800271e0cb605f47e2174224e2a6d040f047af0 100644 (file)
@@ -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"
index 68e56490217c8b07e123b425e8d15ef9ba4466a5..839071d1330e31e9797e877b42831f8979d3ee3d 100644 (file)
@@ -22,7 +22,7 @@ set(INC
        ../include
        ../../blenkernel
        ../../blenlib
-       ../../blenfont
+       ../../blentranslation
        ../../gpu
        ../../makesdna
        ../../makesrna
index 28572f64fb8c7e62910afe6ffe2d9a51f2b4f4fe..346324e129d8161daa71f44ac5b582cae6419459 100644 (file)
@@ -39,7 +39,7 @@ incs = [
     '../include',
     '../../blenkernel',
     '../../blenlib',
-    '../../blenfont',
+    '../../blentranslation',
     '../../gpu',
     '../../makesdna',
     '../../makesrna',
index 6e3e456f67db4da598fff63834ba0a28c60916e0..bffa9c413aec3da499756c08f2defdeecf631adf 100644 (file)
@@ -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"
index a28b4c1a4f2d5bd3344890bf2c42106d791d6d52..b2e046ee24b2bec58930df4280739e7cd773bc59 100644 (file)
@@ -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"
index 01a099e37015c691d4288b8110323f0e1809556c..397d79e1dbe61d82bc006afc1b077ed882267b4b 100644 (file)
@@ -20,9 +20,9 @@
 
 set(INC
        ../include
-       ../../blenfont
        ../../blenkernel
        ../../blenlib
+       ../../blentranslation
        ../../gpu
        ../../makesdna
        ../../makesrna
index b9cba3139c242bc24a1809ec1af336303b98ba92..c39df4496475584c23878c9f9de0c73a8b6e5227 100644 (file)
@@ -34,9 +34,9 @@ incs = [
     env['BF_GLEW_INC'],
     '#/intern/glew-mx',
     '../include',
-    '../../blenfont',
     '../../blenkernel',
     '../../blenlib',
+    '../../blentranslation',
     '../../bmesh',
     '../../gpu',
     '../../imbuf',
index bc42f1dd5bb98dddbbbb36634c2e8c9713e05452..42e2d6b90f04894d83af0c4b59c8643cde7c299f 100644 (file)
@@ -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);
index 8ad4858ff22786bb8c0aea150974ef2534fd545e..3af1d0689808d464c0e778c0523bcb938c4b1819 100644 (file)
@@ -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"
index a263f22e072a51f6987824a14c30fb4915a35547..b56ff850c35eea43215a2dcffaaf825aa3d72c78 100644 (file)
@@ -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"
index 4659e612b41c764b4fc6b21ea191051bf71b5772..d17d18565023bdfa050d28d4d38c819e1466e561 100644 (file)
 
 set(INC
        ../include
-       ../../blenkernel
        ../../blenfont
+       ../../blenkernel
        ../../blenlib
+       ../../blentranslation
        ../../imbuf
        ../../gpu
        ../../makesdna
index 46ad04a1478eca58151ed914262179a033284768..37b83946e930340463bcea845b046c40224fee39 100644 (file)
@@ -40,6 +40,7 @@ incs = [
     '../../blenfont',
     '../../blenkernel',
     '../../blenlib',
+    '../../blentranslation',
     '../../gpu',
     '../../imbuf',
     '../../makesdna',
index c32d06cf9b175535ffd8ad0dc37a3c4af8a85cfd..0378c68d12c9d6c0cb43a6e963b6fc01eb818b12 100644 (file)
@@ -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"
index 1d398177d9fc3f252fa9440d0ce4b036fff4b0c6..460bad13b8e8bc07d928d65aafb392cd3209fe23 100644 (file)
@@ -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"
index 608c1136070f17bd673aa032ba7d103582243b50..d31d7f53b30836c6e68d3f944cff6143f0f17d52 100644 (file)
@@ -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);
index 91e11d30cc26e337deffde5a32f8a8377363f301..a19fa97965abcf5d9fd9e31f5014f4847b97eb32 100644 (file)
@@ -68,7 +68,7 @@
 #include "RNA_access.h"
 #include "RNA_define.h"
 
-#include "BLF_translation.h"
+#include "BLT_translation.h"
 
 #include "PIL_time.h"
 
index 4c33499da419a9e05d0dcb1a51e3e84326f5efba..185ba24eac7a5edd59094e98262d67b2befae8b5 100644 (file)
@@ -24,6 +24,7 @@ set(INC
        ../../blenkernel
        ../../blenlib
        ../../blenloader
+       ../../blentranslation
        ../../imbuf
        ../../gpu
        ../../makesdna
index b37cba15281735731ced066e9effe2d91c001c55..6cb7c5a69d43a479cc7343208bfc08e25c3346ce 100644 (file)
@@ -37,6 +37,7 @@ incs = [
     '../../blenkernel',
     '../../blenlib',
     '../../blenloader',
+    '../../blentranslation',
     '../../gpu',
     '../../imbuf',
     '../../makesdna',
index 7f96321f542f5ed3dd7fd1329578d91bac32e1dd..9922290bf6ff932fc0d52e3702c490fb6b9d269d 100644 (file)
@@ -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"
 
index 3da83aa602819a68a09642a4b572ed97967398b0..7acf2564fb212f2c5d7e4259601a5fb649eae0e0 100644 (file)
@@ -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;
index b692f0b1c12c6e52fbb9a398bad16c2e4d0b0290..40a196fa95bff4bb0d29d250234dd9321276a571 100644 (file)
@@ -20,9 +20,9 @@
 
 set(INC
        ../include
-       ../../blenfont
        ../../blenkernel
        ../../blenlib
+       ../../blentranslation
        ../../gpu
        ../../makesdna
        ../../makesrna
index 216ce2de3347f4bb2ced5b1bc91ff94c00f39efc..af17853556e3a51a1a4e97d68da2ba73d19ac023 100644 (file)
@@ -34,9 +34,9 @@ incs = [
     env['BF_GLEW_INC'],
     '#/intern/glew-mx',
     '../include',
-    '../../blenfont',
     '../../blenkernel',
     '../../blenlib',
+    '../../blentranslation',
     '../../gpu',
     '../../imbuf',
     '../../makesdna',
index ee49f2cf0285cdc622477ab5e6fddc4a1e29c764..8e471ceca95e415e69d6db463d7cd03b215c9f40 100644 (file)
@@ -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);
index 348898b0cc6543a7b35215fe4545e844f9871f3e..02001491f31605d8f9b0a3f31c3bb1ed8a044dcc 100644 (file)
@@ -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"
index 30bfc2fbdfd8857276eab292541ea4319e3854a8..c60d194b620760865e85686b97d850895a8dd07a 100644 (file)
@@ -23,6 +23,7 @@ set(INC
        ../../blenfont
        ../../blenkernel
        ../../blenlib
+       ../../blentranslation
        ../../bmesh
        ../../imbuf
        ../../gpu
index 43181b437f56c7dd09c01a59426257971767e38a..95d23d177e7b4977488836a3cb8c39aa9ec1ad38 100644 (file)
@@ -37,6 +37,7 @@ incs = [
     '../../blenfont',
     '../../blenkernel',
     '../../blenlib',
+    '../../blentranslation',
     '../../bmesh',
     '../../gpu',
     '../../imbuf',
index 3aaa7c2421981f5b46dce7107c965b98ace98090..579860726c6de512e86c61b96e5b9a53506ab4e3 100644 (file)
@@ -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"
index 41e1b8dee12b83ec821e348088b2cff51cb445bb..e94dd1d4864ec55937329387bad7a91a26b41eda 100644 (file)
@@ -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"
index 46ea251de03f922fbf565aa06faa3e2ce81bd081..96fe9322b971987c058c2865f0a13fff687eb3a5 100644 (file)
@@ -24,6 +24,7 @@ set(INC
        ../../blenkernel
        ../../blenlib
        ../../blenloader
+       ../../blentranslation
        ../../imbuf
        ../../bmesh
        ../../gpu
index c64e263179b56f0f5c61a76ecf155dbfd258749a..e17c39f7e3861a6880187900ba8d874dca73c081 100644 (file)
@@ -38,6 +38,7 @@ incs = [
     '../../blenkernel',
     '../../blenlib',
     '../../blenloader',
+    '../../blentranslation',
     '../../bmesh',
     '../../gpu',
     '../../imbuf',
index a1f90f16bbf4c94f86377dc1344ff7dadada06ee..8afb0cd34ea6a1500d6b13ed9c9b18ad831cf9b6 100644 (file)
@@ -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"
index 48a39cd79fccd4c4893d12abfc0516803d708b6f..dafb71b448062ead7c5af32df18ef49a95859596 100644 (file)
@@ -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"
index 3bebac156a42867da26da7ecb3211a043eec648a..aeab87e6cb5ea0128e8bc5c2a7c8f3bc5addc99b 100644 (file)
@@ -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);
 }
index 19525c87923579a93da2d93c5410e4d2e49b993a..349c003cf566837b6d63d7ad91ecd0f033f04a72 100644 (file)
@@ -21,9 +21,9 @@
 set(INC
        ../include
        ../interface
-       ../../blenfont
        ../../blenkernel
        ../../blenlib
+       ../../blentranslation
        ../../gpu
        ../../makesdna
        ../../makesrna
index f22a716e502b418d05bece5df7ba764bee7857ae..4b618710d1f64cd7f61b6c79675a0cfa230ba76e 100644 (file)
@@ -35,9 +35,9 @@ incs = [
     '#/intern/glew-mx',
     '../include',
     '../interface',
-    '../../blenfont',
     '../../blenkernel',
     '../../blenlib',
+    '../../blentranslation',
     '../../gpu',
     '../../imbuf',
     '../../makesdna',
index 2c6280f5670712983ff9487463c64647e509c285..abcb767958f9dd6c85355ffe52456a84229b33e3 100644 (file)
@@ -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"
index e78100f3ceb8dbecf3bfdf3ef516d715de02f40f..ccf8460e9a34022ab4ba92d0f9c5da6f6c84a430 100644 (file)
@@ -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);
index ab0dfa30121ce1c99c1c8d7a4c0508a4ad2e235d..c8c64a79945bfdf91d475a27efbf17737f7b2330 100644 (file)
@@ -20,9 +20,9 @@
 
 set(INC
        ../include
-       ../../blenfont
        ../../blenkernel
        ../../blenlib
+       ../../blentranslation
        ../../gpu
        ../../makesdna
        ../../makesrna
index d37bb201b81117ac097492bb26f9f3267ba100e1..5bfa8d6c4c2fac29a40a2cd2c964e47d1e97305f 100644 (file)
@@ -34,9 +34,9 @@ incs = [
     env['BF_GLEW_INC'],
     '#/intern/glew-mx',
     '../include',
-    '../../blenfont',
     '../../blenkernel',
     '../../blenlib',
+    '../../blentranslation',
     '../../gpu',
     '../../makesdna',
     '../../makesrna',
index 1fb7228dd984ff2a162def166fb73e0459603c4e..8eead9b8e448a16934533e488be2e905c6837dd6 100644 (file)
@@ -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);
index 19e6f5a81006447b4fea2159aa59c11757d3aded..f7673d86f94d0accb8a585871a556cb52f61f4f5 100644 (file)
@@ -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"
index 34887f8388d542d9dc6211fcce1b9220ac732e22..cde818333e4542f08fe6439865855720c69e10d4 100644 (file)
@@ -23,6 +23,7 @@ set(INC
        ../../blenfont
        ../../blenkernel
        ../../blenlib
+       ../../blentranslation
        ../../imbuf
        ../../gpu
        ../../makesdna
index a79fc8c18bd612e2abc4ad8477544a6ec80cfedb..b559b61cf5a50f650de5a5e69a69cd5aa3032fa4 100644 (file)
@@ -38,6 +38,7 @@ incs = [
     '../../blenfont',
     '../../blenkernel',
     '../../blenlib',
+    '../../blentranslation',
     '../../compositor',
     '../../gpu',
     '../../imbuf',
index cb4ae699454aa6101a44823ef920a7c5e3a6dd71..6d87c47eadbced7a6ba5cb725c5afd60d23fe6d7 100644 (file)
@@ -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"
index b6fa4518ed6a8bf4c16293a7290a3af60ff44c1d..9790e308424e0955a633a61082a5811c5a7da345 100644 (file)
@@ -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"
index 5b478d8bde33acc7fee22fa002f10e8abba6d4ae..52b0292b9a33ece32cfc839fadbb7e3b854bb4a1 100644 (file)
@@ -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);
index 28afeefae0b2ef19b8415c22643ed3581ef58dd3..283457d1fc688351c21dc3f154a245f97d2767b1 100644 (file)
@@ -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"
index f1d9d4efcc6da693eb88692892afa12ac93884e3..b57f95db4e6af11930e82be624a5609b350a5b0a 100644 (file)
@@ -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);
index 8b74c6c4808b718840efb8edfe013659b6df3902..d31d1687e5e09534fa0774995f1344d7c8abad70 100644 (file)
@@ -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 */
 
index a7fd624d2aa009688fd0fcdf1d20fa13e5646fc1..85288aa001102c905fe0d21f463545d9dc074ace 100644 (file)
@@ -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"
index b716f0671bd6e04d40426da3cb7adef8d6785b8c..289d6e715e13e03edee451b96cdcae93ffe20f60 100644 (file)
@@ -22,7 +22,7 @@ set(INC
        ../include
        ../../blenkernel
        ../../blenlib
-       ../../blenfont
+       ../../blentranslation
        ../../imbuf
        ../../gpu
        ../../makesdna
index ae3e960124fc41ce3da2e97c294cf4f38ca44a4d..dce559a21df3be4efb84181171a828835c0152f1 100644 (file)
@@ -37,9 +37,9 @@ incs = [
     env['BF_GLEW_INC'],
     '#/intern/glew-mx',
     '../include',
-    '../../blenfont',
     '../../blenkernel',
     '../../blenlib',
+    '../../blentranslation',
     '../../gpu',
     '../../imbuf',
     '../../makesdna',
index 420b73cee866119098a40d88e21ddc2de05ef93f..b3761336035d8ad8e81e78f663926278f2a41ba0 100644 (file)
@@ -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;
index 0821304abf3c86eacb04bc53e5836c9e62e7be2a..1ddd25f9219dbd7e1fe6a1546c27d4dfc4b345ac 100644 (file)
@@ -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"
index 7b73a6945705e980fa841af1a6b299870878f76a..48a15eac337547e4812627fc3919cd16ab2fca22 100644 (file)
@@ -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"
index 03d810199971e105545753efb77ea6133fe62ad6..778ccf902d13214c594286d480b1e979ce548c62 100644 (file)
@@ -20,9 +20,9 @@
 
 set(INC
        ../include
-       ../../blenfont
        ../../blenkernel
        ../../blenlib
+       ../../blentranslation
        ../../imbuf
        ../../gpu
        ../../makesdna
index 32a79feac766f992778341d24cc2418172dd3e3b..9c654d7a1e5f46655b4e3b93a79b7dca23f0efbe 100644 (file)
@@ -34,9 +34,9 @@ incs = [
     env['BF_GLEW_INC'],
     '#/intern/glew-mx',
     '../include',
-    '../../blenfont',
     '../../blenkernel',
     '../../blenlib',
+    '../../blentranslation',
     '../../gpu',
     '../../imbuf',
     '../../makesdna',
index 70c6da0bfb3f245272027974ac318d47dcd263a9..86d3fcbe1ac1dfa0e6d50a7c6f9f1a3eb7138d68 100644 (file)
@@ -34,7 +34,7 @@
 #include "BLI_blenlib.h"