Another bunch of UI translation fixes, thanks to Leon Cheung, Gabriel Gazzán and...
authorBastien Montagne <montagne29@wanadoo.fr>
Sun, 24 Feb 2013 15:40:28 +0000 (15:40 +0000)
committerBastien Montagne <montagne29@wanadoo.fr>
Sun, 24 Feb 2013 15:40:28 +0000 (15:40 +0000)
27 files changed:
release/scripts/modules/bl_i18n_utils/bl_extract_messages.py
release/scripts/startup/bl_ui/space_view3d.py
source/blender/editors/animation/anim_channels_defines.c
source/blender/editors/animation/fmodifier_ui.c
source/blender/editors/armature/editarmature.c
source/blender/editors/curve/CMakeLists.txt
source/blender/editors/curve/SConscript
source/blender/editors/curve/editcurve.c
source/blender/editors/io/CMakeLists.txt
source/blender/editors/io/SConscript
source/blender/editors/object/object_constraint.c
source/blender/editors/object/object_relations.c
source/blender/editors/object/object_select.c
source/blender/editors/screen/area.c
source/blender/editors/space_buttons/buttons_texture.c
source/blender/editors/space_image/image_ops.c
source/blender/editors/space_info/info_ops.c
source/blender/editors/space_info/info_stats.c
source/blender/editors/space_nla/nla_buttons.c
source/blender/editors/space_nla/nla_edit.c
source/blender/editors/space_node/node_group.c
source/blender/editors/space_text/text_header.c
source/blender/editors/space_text/text_ops.c
source/blender/editors/space_view3d/view3d_header.c
source/blender/editors/transform/transform_ops.c
source/blender/editors/util/ed_util.c
source/blender/makesrna/intern/rna_particle.c

index 5287bcdbeb5db121188d986cf7827a7ad282e956..18c7b736ea5fb585c8ea50b9066c954f5c155aea 100644 (file)
@@ -776,6 +776,14 @@ def dump_messages(do_messages, do_checks, settings):
     # Get strings from C source code.
     dump_src_messages(msgs, reports, settings)
 
+    # Get strings from addons' categories.
+    print("foo, bar", bpy.types.WindowManager.addon_filter[1]['items'](bpy.context.window_manager, bpy.context))
+    for uid, label, tip in bpy.types.WindowManager.addon_filter[1]['items'](bpy.context.window_manager, bpy.context):
+        print(uid, label, tip)
+        process_msg(msgs, settings.DEFAULT_CONTEXT, label, "Addons' categories", reports, None, settings)
+        if tip:
+            process_msg(msgs, settings.DEFAULT_CONTEXT, tip, "Addons' categories", reports, None, settings)
+
     # Get strings specific to translations' menu.
     for lng in settings.LANGUAGES:
         process_msg(msgs, settings.DEFAULT_CONTEXT, lng[1], "Languages’ labels from bl_i18n_utils/settings.py",
index fcc20243a8c58c73e9a8cf74d83e7ca8bb5f2067..1965d11c22f792515eac70402d1ec1f788c5b2ad 100644 (file)
@@ -1612,6 +1612,8 @@ class BoneOptions:
     def draw(self, context):
         layout = self.layout
 
+        default_context = bpy.app.translations.contexts.default
+
         options = [
             "show_wire",
             "use_deform",
@@ -1631,7 +1633,8 @@ class BoneOptions:
             opt_suffix = "bone."
 
         for opt in options:
-            props = layout.operator("wm.context_collection_boolean_set", text=bone_props[opt].name)
+            props = layout.operator("wm.context_collection_boolean_set", text=bone_props[opt].name,
+                                    text_ctxt=default_context)
             props.data_path_iter = data_path_iter
             props.data_path_item = opt_suffix + opt
             props.type = self.type
index da253ea6d2d1f481748c15617a1ae2b1d199198c..2e413c70e0b129cff9ad17b047703a6a4499c814 100644 (file)
@@ -36,6 +36,8 @@
 #include "BLI_math.h"
 #include "BLI_utildefines.h"
 
+#include "BLF_translation.h"
+
 #include "DNA_anim_types.h"
 #include "DNA_armature_types.h"
 #include "DNA_camera_types.h"
@@ -3256,21 +3258,21 @@ static void draw_setting_widget(bAnimContext *ac, bAnimListElem *ale, bAnimChann
                        icon = ICON_VISIBLE_IPO_OFF;
                        
                        if (ale->type == ANIMTYPE_FCURVE)
-                               tooltip = "Channel is visible in Graph Editor for editing";
+                               tooltip = TIP_("Channel is visible in Graph Editor for editing");
                        else
-                               tooltip = "Channel(s) are visible in Graph Editor for editing";
+                               tooltip = TIP_("Channel(s) are visible in Graph Editor for editing");
                        break;
                        
                case ACHANNEL_SETTING_EXPAND: /* expanded triangle */
                        //icon = ((enabled)? ICON_TRIA_DOWN : ICON_TRIA_RIGHT);
                        icon = ICON_TRIA_RIGHT;
-                       tooltip = "Make channels grouped under this channel visible";
+                       tooltip = TIP_("Make channels grouped under this channel visible");
                        break;
                        
                case ACHANNEL_SETTING_SOLO: /* NLA Tracks only */
                        //icon = ((enabled)? ICON_LAYER_ACTIVE : ICON_LAYER_USED);
                        icon = ICON_LAYER_USED;
-                       tooltip = "NLA Track is the only one evaluated for the AnimData block it belongs to";
+                       tooltip = TIP_("NLA Track is the only one evaluated for the AnimData block it belongs to");
                        break;
                
                /* --- */
@@ -3279,7 +3281,7 @@ static void draw_setting_widget(bAnimContext *ac, bAnimListElem *ale, bAnimChann
                        // TODO: what about when there's no protect needed?
                        //icon = ((enabled)? ICON_LOCKED : ICON_UNLOCKED);
                        icon = ICON_UNLOCKED;
-                       tooltip = "Editability of keyframes for this channel";
+                       tooltip = TIP_("Editability of keyframes for this channel");
                        break;
                        
                case ACHANNEL_SETTING_MUTE: /* muted speaker */
@@ -3287,9 +3289,9 @@ static void draw_setting_widget(bAnimContext *ac, bAnimListElem *ale, bAnimChann
                        icon = ICON_MUTE_IPO_OFF;
                        
                        if (ale->type == ALE_FCURVE) 
-                               tooltip = "Does F-Curve contribute to result";
+                               tooltip = TIP_("Does F-Curve contribute to result");
                        else
-                               tooltip = "Do channels contribute to result";
+                               tooltip = TIP_("Do channels contribute to result");
                        break;
                        
                default:
index cc2366affe68041fb66cb7c4f5dccdc202e8c798..dc0fba0930fee5e54016070431de4e8dfbe2e872 100644 (file)
@@ -584,9 +584,9 @@ void ANIM_uiTemplate_fmodifier_draw(uiLayout *layout, ID *id, ListBase *modifier
                
                /* name */
                if (fmi)
-                       uiItemL(sub, fmi->name, ICON_NONE);
+                       uiItemL(sub, IFACE_(fmi->name), ICON_NONE);
                else
-                       uiItemL(sub, "<Unknown Modifier>", ICON_NONE);
+                       uiItemL(sub, IFACE_("<Unknown Modifier>"), ICON_NONE);
                
                /* right-align ------------------------------------------- */
                sub = uiLayoutRow(row, TRUE);
index 2eac6ba87ee9cf6a85a1da58ddaee3c21be50b7f..574cf18773b177a855f68e68d2ae6c678ec46809 100644 (file)
@@ -52,6 +52,8 @@
 #include "BLI_utildefines.h"
 #include "BLI_ghash.h"
 
+#include "BLF_translation.h"
+
 #include "BKE_animsys.h"
 #include "BKE_action.h"
 #include "BKE_armature.h"
@@ -3916,7 +3918,7 @@ static int armature_parent_set_exec(bContext *C, wmOperator *op)
 static int armature_parent_set_invoke(bContext *C, wmOperator *UNUSED(op), wmEvent *UNUSED(event))
 {
        EditBone *actbone = CTX_data_active_bone(C);
-       uiPopupMenu *pup = uiPupMenuBegin(C, "Make Parent ", ICON_NONE);
+       uiPopupMenu *pup = uiPupMenuBegin(C, CTX_IFACE_(BLF_I18NCONTEXT_OPERATOR_DEFAULT, "Make Parent"), ICON_NONE);
        uiLayout *layout = uiPupMenuLayout(pup);
        int allchildbones = 0;
        
index 25df17d232a170c8a86312e1dadc9576144a83c5..c38ded498309aed073be13aeda77a613c504af5c 100644 (file)
@@ -20,6 +20,7 @@
 
 set(INC
        ../include
+       ../../blenfont
        ../../blenkernel
        ../../blenlib
        ../../blenloader
@@ -42,4 +43,8 @@ set(SRC
        curve_intern.h
 )
 
+if(WITH_INTERNATIONAL)
+       add_definitions(-DWITH_INTERNATIONAL)
+endif()
+
 blender_add_lib(bf_editor_curve "${SRC}" "${INC}" "${INC_SYS}")
index abefd3c6dd6fdada055028dc86536579c8b33d60..887fd5ba2f29ffcde6a322039c9c2258ed5d2330 100644 (file)
@@ -29,9 +29,14 @@ Import ('env')
 
 sources = env.Glob('*.c')
 
+defs = []
+
 incs = '../include ../../blenlib ../../blenkernel ../../makesdna ../../imbuf'
 incs += ' ../../windowmanager #/intern/guardedalloc #/extern/glew/include'
 incs += ' ../../bmesh ../../gpu ../../blenloader'
 incs += ' ../../makesrna ../../render/extern/include  #/intern/elbeem/extern'
 
-env.BlenderLib ( 'bf_editors_curve', sources, Split(incs), [], libtype=['core'], priority=[45] )
+if env['WITH_BF_INTERNATIONAL']:
+    defs.append('WITH_INTERNATIONAL')
+
+env.BlenderLib ( 'bf_editors_curve', sources, Split(incs), defs, libtype=['core'], priority=[45] )
index b5aa55dbda978bbedb34dc8dbe5c3257e94a1c68..d01e5c5d9bf25b46e43693a735973efd294f1d26 100644 (file)
@@ -53,6 +53,8 @@
 #include "BLI_utildefines.h"
 #include "BLI_ghash.h"
 
+#include "BLF_translation.h"
+
 #include "BKE_context.h"
 #include "BKE_curve.h"
 #include "BKE_depsgraph.h"
@@ -4925,7 +4927,7 @@ static int toggle_cyclic_invoke(bContext *C, wmOperator *op, wmEvent *UNUSED(eve
                for (nu = editnurb->first; nu; nu = nu->next) {
                        if (nu->pntsu > 1 || nu->pntsv > 1) {
                                if (nu->type == CU_NURBS) {
-                                       pup = uiPupMenuBegin(C, "Direction", ICON_NONE);
+                                       pup = uiPupMenuBegin(C, IFACE_("Direction"), ICON_NONE);
                                        layout = uiPupMenuLayout(pup);
                                        uiItemsEnumO(layout, op->type->idname, "direction");
                                        uiPupMenuEnd(C, pup);
@@ -6051,14 +6053,14 @@ static int delete_invoke(bContext *C, wmOperator *op, wmEvent *UNUSED(event))
        uiLayout *layout;
 
        if (obedit->type == OB_SURF) {
-               pup = uiPupMenuBegin(C, "Delete", ICON_NONE);
+               pup = uiPupMenuBegin(C, IFACE_("Delete"), ICON_NONE);
                layout = uiPupMenuLayout(pup);
                uiItemEnumO_ptr(layout, op->type, NULL, 0, "type", 0);
                uiItemEnumO_ptr(layout, op->type, NULL, 0, "type", 2);
                uiPupMenuEnd(C, pup);
        }
        else {
-               pup = uiPupMenuBegin(C, "Delete", ICON_NONE);
+               pup = uiPupMenuBegin(C, IFACE_("Delete"), ICON_NONE);
                layout = uiPupMenuLayout(pup);
                uiItemsEnumO(layout, op->type->idname, "type");
                uiPupMenuEnd(C, pup);
index 7db23041c883f5adbb7c34965ff5d56893bda63c..d4ae5b8b29be1d9b1f409c1624f9eb1dc36d572d 100644 (file)
@@ -47,4 +47,8 @@ if(WITH_OPENCOLLADA)
        add_definitions(-DWITH_COLLADA)
 endif()
 
+if(WITH_INTERNATIONAL)
+       add_definitions(-DWITH_INTERNATIONAL)
+endif()
+
 blender_add_lib(bf_editor_io "${SRC}" "${INC}" "${INC_SYS}")
index cef73f33ddd07e4c883c0b59b19d9852f32b8980..b7449ccad79e82ce3dffbb70f0ee45842e19f8ff 100644 (file)
@@ -36,4 +36,7 @@ incs += '../../makesdna ../../makesrna ../../windowmanager ../../collada'
 if env['WITH_BF_COLLADA']:
     defs += ['WITH_COLLADA']
 
+if env['WITH_BF_INTERNATIONAL']:
+    defs += ['WITH_INTERNATIONAL']
+
 env.BlenderLib ( 'bf_editor_io', sources, Split(incs), defines=defs, libtype=['core','player'], priority=[330,210] )
index 84b989e2f597e24fcb86a5c6b20e33a6306444c5..1bed7d7dd11c05b7fb969d20c22bc9dd0f6557d2 100644 (file)
@@ -40,6 +40,8 @@
 #include "BLI_dynstr.h"
 #include "BLI_utildefines.h"
 
+#include "BLF_translation.h"
+
 #include "DNA_anim_types.h"
 #include "DNA_constraint_types.h"
 #include "DNA_curve_types.h"
@@ -1873,7 +1875,7 @@ static int pose_ik_add_invoke(bContext *C, wmOperator *op, wmEvent *UNUSED(evt))
        }
        
        /* prepare popup menu to choose targetting options */
-       pup = uiPupMenuBegin(C, "Add IK", ICON_NONE);
+       pup = uiPupMenuBegin(C, IFACE_("Add IK"), ICON_NONE);
        layout = uiPupMenuLayout(pup);
        
        /* the type of targets we'll set determines the menu entries to show... */
@@ -1882,14 +1884,14 @@ static int pose_ik_add_invoke(bContext *C, wmOperator *op, wmEvent *UNUSED(evt))
                 *      - the only thing that matters is that we want a target...
                 */
                if (tar_pchan)
-                       uiItemBooleanO(layout, "To Active Bone", ICON_NONE, "POSE_OT_ik_add", "with_targets", 1);
+                       uiItemBooleanO(layout, IFACE_("To Active Bone"), ICON_NONE, "POSE_OT_ik_add", "with_targets", 1);
                else
-                       uiItemBooleanO(layout, "To Active Object", ICON_NONE, "POSE_OT_ik_add", "with_targets", 1);
+                       uiItemBooleanO(layout, IFACE_("To Active Object"), ICON_NONE, "POSE_OT_ik_add", "with_targets", 1);
        }
        else {
                /* we have a choice of adding to a new empty, or not setting any target (targetless IK) */
-               uiItemBooleanO(layout, "To New Empty Object", ICON_NONE, "POSE_OT_ik_add", "with_targets", 1);
-               uiItemBooleanO(layout, "Without Targets", ICON_NONE, "POSE_OT_ik_add", "with_targets", 0);
+               uiItemBooleanO(layout, IFACE_("To New Empty Object"), ICON_NONE, "POSE_OT_ik_add", "with_targets", 1);
+               uiItemBooleanO(layout, IFACE_("Without Targets"), ICON_NONE, "POSE_OT_ik_add", "with_targets", 0);
        }
        
        /* finish building the menu, and process it (should result in calling self again) */
index c5e8310e9fb4e14bdc33bf22e81acc82e1a08b56..f9dde0436074cf3933d3ea6d1851d7103dda4b1e 100644 (file)
@@ -304,7 +304,7 @@ static int make_proxy_invoke(bContext *C, wmOperator *op, wmEvent *evt)
 
        }
        else if (ob->id.lib) {
-               uiPopupMenu *pup = uiPupMenuBegin(C, "OK?", ICON_QUESTION);
+               uiPopupMenu *pup = uiPupMenuBegin(C, IFACE_("OK?"), ICON_QUESTION);
                uiLayout *layout = uiPupMenuLayout(pup);
                
                /* create operator menu item with relevant properties filled in */
index 775a289751385778f16d4bcf08112f2a7675217d..baa0199baf7e9944f01a13657167f24bd576e882 100644 (file)
@@ -50,6 +50,8 @@
 #include "BLI_string.h"
 #include "BLI_utildefines.h"
 
+#include "BLF_translation.h"
+
 #include "BKE_context.h"
 #include "BKE_group.h"
 #include "BKE_main.h"
@@ -606,7 +608,7 @@ static short select_grouped_group(bContext *C, Object *ob)  /* Select objects in
        }
 
        /* build the menu. */
-       pup = uiPupMenuBegin(C, "Select Group", ICON_NONE);
+       pup = uiPupMenuBegin(C, IFACE_("Select Group"), ICON_NONE);
        layout = uiPupMenuLayout(pup);
 
        for (i = 0; i < group_count; i++) {
index 46f726e45c623a98b7cc240576d99d3ab154c7b7..8a01cf351bf3b472a3a1bcda2fc747c29c44705d 100644 (file)
@@ -1586,14 +1586,14 @@ int ED_area_header_standardbuttons(const bContext *C, uiBlock *block, int yco)
                                       ICON_DISCLOSURE_TRI_RIGHT,
                                       xco, yco, U.widget_unit, U.widget_unit * 0.9f,
                                       &(sa->flag), 0, 0, 0, 0,
-                                      "Show pulldown menus");
+                                      TIP_("Show pulldown menus"));
        }
        else {
                but = uiDefIconButBitS(block, TOG, HEADER_NO_PULLDOWN, 0,
                                       ICON_DISCLOSURE_TRI_DOWN,
                                       xco, yco, U.widget_unit, U.widget_unit * 0.9f,
                                       &(sa->flag), 0, 0, 0, 0,
-                                      "Hide pulldown menus");
+                                      TIP_("Hide pulldown menus"));
        }
 
        uiButClearFlag(but, UI_BUT_UNDO); /* skip undo on screen buttons */
index 935b15f3cd8e46d1667717da59f6120fe2614022..16d194d092971534b42bfcc7e88cfb315796ceb2 100644 (file)
@@ -37,6 +37,8 @@
 #include "BLI_string.h"
 #include "BLI_utildefines.h"
 
+#include "BLF_translation.h"
+
 #include "DNA_brush_types.h"
 #include "DNA_ID.h"
 #include "DNA_lamp_types.h"
@@ -397,7 +399,7 @@ void uiTemplateTextureUser(uiLayout *layout, bContext *C)
        user = ct->user;
 
        if (!user) {
-               uiItemL(layout, "No textures in context.", ICON_NONE);
+               uiItemL(layout, IFACE_("No textures in context"), ICON_NONE);
                return;
        }
 
index dc834d8832368f88ee27d78da037d5b8bde3938c..3bcb4a57c57b2859be61b4c387ed261a770d5b17 100644 (file)
@@ -1959,9 +1959,10 @@ static int image_pack_invoke(bContext *C, wmOperator *op, wmEvent *UNUSED(event)
        ibuf = BKE_image_acquire_ibuf(ima, NULL, NULL);
 
        if (!as_png && (ibuf && (ibuf->userflags & IB_BITMAPDIRTY))) {
-               pup = uiPupMenuBegin(C, "OK", ICON_QUESTION);
+               pup = uiPupMenuBegin(C, IFACE_("OK"), ICON_QUESTION);
                layout = uiPupMenuLayout(pup);
-               uiItemBooleanO(layout, "Can't pack edited image from disk. Pack as internal PNG?", ICON_NONE, op->idname, "as_png", 1);
+               uiItemBooleanO(layout, IFACE_("Can't pack edited image from disk. Pack as internal PNG?"), ICON_NONE,
+                              op->idname, "as_png", 1);
                uiPupMenuEnd(C, pup);
 
                BKE_image_release_ibuf(ima, ibuf, NULL);
index 22668a3de3a5192f4e0452dbbbd40a1912049f58..04f6a5152e6766b9f0477fe16758167e9c93ae20 100644 (file)
 
 #include "BLI_blenlib.h"
 #include "BLI_math.h"
-#include "BKE_bpath.h"
 #include "BLI_utildefines.h"
 
+#include "BLF_translation.h"
+
+#include "BKE_bpath.h"
 #include "BKE_context.h"
 #include "BKE_global.h"
 #include "BKE_image.h"
@@ -218,9 +220,9 @@ static int unpack_all_invoke(bContext *C, wmOperator *op, wmEvent *UNUSED(event)
        }
 
        if (count == 1)
-               strcpy(title, "Unpack 1 file");
+               strcpy(title, IFACE_("Unpack 1 File"));
        else
-               BLI_snprintf(title, sizeof(title), "Unpack %d files", count);
+               BLI_snprintf(title, sizeof(title), IFACE_("Unpack %d Files"), count);
        
        pup = uiPupMenuBegin(C, title, ICON_NONE);
        layout = uiPupMenuLayout(pup);
@@ -291,7 +293,7 @@ static int unpack_item_invoke(bContext *C, wmOperator *op, wmEvent *UNUSED(event
        uiPopupMenu *pup;
        uiLayout *layout;
        
-       pup = uiPupMenuBegin(C, "Unpack", ICON_NONE);
+       pup = uiPupMenuBegin(C, IFACE_("Unpack"), ICON_NONE);
        layout = uiPupMenuLayout(pup);
        
        uiLayoutSetOperatorContext(layout, WM_OP_EXEC_DEFAULT);
index 5a8a77f735091c00095f592c76aa22ab47d2513f..976769752f9692271f76f5f84786c908cb4ed2b3 100644 (file)
@@ -367,9 +367,9 @@ static void stats_string(Scene *scene)
        mmap_in_use = MEM_get_mapped_memory_in_use();
 
        /* get memory statistics */
-       s = memstr + sprintf(memstr, " | Mem:%.2fM", (double)((mem_in_use - mmap_in_use) >> 10) / 1024.0);
+       s = memstr + sprintf(memstr, IFACE_(" | Mem:%.2fM"), (double)((mem_in_use - mmap_in_use) >> 10) / 1024.0);
        if (mmap_in_use)
-               sprintf(s, " (%.2fM)", (double)((mmap_in_use) >> 10) / 1024.0);
+               sprintf(s, IFACE_(" (%.2fM)"), (double)((mmap_in_use) >> 10) / 1024.0);
 
        s = stats->infostr;
        
@@ -377,32 +377,32 @@ static void stats_string(Scene *scene)
 
        if (scene->obedit) {
                if (BKE_keyblock_from_object(scene->obedit))
-                       s += sprintf(s, "(Key) ");
+                       s += sprintf(s, IFACE_("(Key) "));
 
                if (scene->obedit->type == OB_MESH) {
-                       s += sprintf(s, "Verts:%d/%d | Edges:%d/%d | Faces:%d/%d | Tris:%d",
+                       s += sprintf(s, IFACE_("Verts:%d/%d | Edges:%d/%d | Faces:%d/%d | Tris:%d"),
                                 stats->totvertsel, stats->totvert, stats->totedgesel, stats->totedge, stats->totfacesel,
                                 stats->totface, stats->tottri);
                }
                else if (scene->obedit->type == OB_ARMATURE) {
-                       s += sprintf(s, "Verts:%d/%d | Bones:%d/%d", stats->totvertsel, stats->totvert, stats->totbonesel,
+                       s += sprintf(s, IFACE_("Verts:%d/%d | Bones:%d/%d"), stats->totvertsel, stats->totvert, stats->totbonesel,
                                     stats->totbone);
                }
                else {
-                       s += sprintf(s, "Verts:%d/%d", stats->totvertsel, stats->totvert);
+                       s += sprintf(s, IFACE_("Verts:%d/%d"), stats->totvertsel, stats->totvert);
                }
 
                strcat(s, memstr);
        }
        else if (ob && (ob->mode & OB_MODE_POSE)) {
-               s += sprintf(s, "Bones:%d/%d %s",
+               s += sprintf(s, IFACE_("Bones:%d/%d %s"),
                             stats->totbonesel, stats->totbone, memstr);
        }
        else if (stats_is_object_dynamic_topology_sculpt(ob)) {
-               s += sprintf(s, "Verts:%d | Tris:%d", stats->totvert, stats->tottri);
+               s += sprintf(s, IFACE_("Verts:%d | Tris:%d"), stats->totvert, stats->tottri);
        }
        else {
-               s += sprintf(s, "Verts:%d | Faces:%d | Tris:%d | Objects:%d/%d | Lamps:%d/%d%s",
+               s += sprintf(s, IFACE_("Verts:%d | Faces:%d | Tris:%d | Objects:%d/%d | Lamps:%d/%d%s"),
                             stats->totvert, stats->totface, stats->tottri, stats->totobjsel, stats->totobj, stats->totlampsel,
                             stats->totlamp, memstr);
        }
index d75946c431757f5ff51df9d7481929d1e92f4cf0..eb7de0720437f5bd13af9554f16217785615565d 100644 (file)
@@ -308,7 +308,7 @@ static void nla_panel_properties(const bContext *C, Panel *pa)
        
        /* strip extents */
        column = uiLayoutColumn(layout, TRUE);
-       uiItemL(column, "Strip Extents:", ICON_NONE);
+       uiItemL(column, IFACE_("Strip Extents:"), ICON_NONE);
        uiItemR(column, &strip_ptr, "frame_start", 0, NULL, ICON_NONE);
        uiItemR(column, &strip_ptr, "frame_end", 0, NULL, ICON_NONE);
        
@@ -343,7 +343,7 @@ static void nla_panel_properties(const bContext *C, Panel *pa)
                /* settings */
                column = uiLayoutColumn(layout, TRUE);
                uiLayoutSetActive(column, !(RNA_boolean_get(&strip_ptr, "use_animated_influence") || RNA_boolean_get(&strip_ptr, "use_animated_time")));
-               uiItemL(column, "Playback Settings:", ICON_NONE);
+               uiItemL(column, IFACE_("Playback Settings:"), ICON_NONE);
                uiItemR(column, &strip_ptr, "mute", 0, NULL, ICON_NONE);
                uiItemR(column, &strip_ptr, "use_reverse", 0, NULL, ICON_NONE);
        }
@@ -373,15 +373,15 @@ static void nla_panel_actclip(const bContext *C, Panel *pa)
        /* action extents */
        // XXX custom names were used here (to avoid the prefixes)... probably not necessary in future?
        column = uiLayoutColumn(layout, TRUE);
-       uiItemL(column, "Action Extents:", ICON_NONE);
-       uiItemR(column, &strip_ptr, "action_frame_start", 0, "Start Frame", ICON_NONE);
-       uiItemR(column, &strip_ptr, "action_frame_end", 0, "End Frame", ICON_NONE);
+       uiItemL(column, IFACE_("Action Extents:"), ICON_NONE);
+       uiItemR(column, &strip_ptr, "action_frame_start", 0, IFACE_("Start Frame"), ICON_NONE);
+       uiItemR(column, &strip_ptr, "action_frame_end", 0, IFACE_("End Frame"), ICON_NONE);
        uiItemO(column, NULL, ICON_NONE, "NLA_OT_action_sync_length");
                
        /* action usage */
        column = uiLayoutColumn(layout, TRUE);
        uiLayoutSetActive(column, RNA_boolean_get(&strip_ptr, "use_animated_time") == FALSE);
-       uiItemL(column, "Playback Settings:", ICON_NONE);
+       uiItemL(column, IFACE_("Playback Settings:"), ICON_NONE);
        uiItemR(column, &strip_ptr, "scale", 0, NULL, ICON_NONE);
        uiItemR(column, &strip_ptr, "repeat", 0, NULL, ICON_NONE);
 }
index 3740c3fae5e578b1404c1e27c8d916c1c20b4a42..484eb47fa8e2064270957efe44292afcd99f47e9 100644 (file)
@@ -44,6 +44,8 @@
 #include "BLI_rand.h"
 #include "BLI_utildefines.h"
 
+#include "BLF_translation.h"
+
 #include "BKE_action.h"
 #include "BKE_fcurve.h"
 #include "BKE_nla.h"
@@ -1951,7 +1953,7 @@ static int nla_fmodifier_add_invoke(bContext *C, wmOperator *UNUSED(op), wmEvent
        uiLayout *layout;
        int i;
        
-       pup = uiPupMenuBegin(C, "Add F-Modifier", ICON_NONE);
+       pup = uiPupMenuBegin(C, IFACE_("Add F-Modifier"), ICON_NONE);
        layout = uiPupMenuLayout(pup);
        
        /* start from 1 to skip the 'Invalid' modifier type */
index 943f12c4c5429bb0830f6360160d8b5d9485cab5..7b7b98f132cf922111659a89b13904e340768f69 100644 (file)
@@ -42,6 +42,8 @@
 #include "BLI_rect.h"
 #include "BLI_math.h"
 
+#include "BLF_translation.h"
+
 #include "BKE_action.h"
 #include "BKE_animsys.h"
 #include "BKE_context.h"
@@ -789,7 +791,7 @@ static int node_group_separate_exec(bContext *C, wmOperator *op)
 
 static int node_group_separate_invoke(bContext *C, wmOperator *UNUSED(op), wmEvent *UNUSED(event))
 {
-       uiPopupMenu *pup = uiPupMenuBegin(C, "Separate", ICON_NONE);
+       uiPopupMenu *pup = uiPupMenuBegin(C, CTX_IFACE_(BLF_I18NCONTEXT_OPERATOR_DEFAULT, "Separate"), ICON_NONE);
        uiLayout *layout = uiPupMenuLayout(pup);
 
        uiLayoutSetOperatorContext(layout, WM_OP_EXEC_DEFAULT);
@@ -1148,7 +1150,7 @@ static int node_group_make_invoke(bContext *C, wmOperator *UNUSED(op), wmEvent *
 {
        SpaceNode *snode = CTX_wm_space_node(C);
        bNode *act = nodeGetActive(snode->edittree);
-       uiPopupMenu *pup = uiPupMenuBegin(C, "Make Group", ICON_NONE);
+       uiPopupMenu *pup = uiPupMenuBegin(C, CTX_IFACE_(BLF_I18NCONTEXT_OPERATOR_DEFAULT, "Make Group"), ICON_NONE);
        uiLayout *layout = uiPupMenuLayout(pup);
 
        uiLayoutSetOperatorContext(layout, WM_OP_EXEC_DEFAULT);
index 52253b2d5d2663680383efc8d8f92ff23ce68c22..605a08e587aecd40542d9eb3b4c9a385c336193f 100644 (file)
@@ -42,6 +42,8 @@
 
 #include "BLI_blenlib.h"
 
+#include "BLF_translation.h"
+
 #include "BKE_context.h"
 #include "BKE_screen.h"
 
@@ -120,7 +122,7 @@ void TEXT_OT_properties(wmOperatorType *ot)
        uiPopupMenu *pup;
 
        if (text) {
-               pup = uiPupMenuBegin(C, "Text", ICON_NONE);
+               pup = uiPupMenuBegin(C, IFACE_("Text"), ICON_NONE);
                if (txt_has_sel(text)) {
                        uiItemO(layout, NULL, ICON_NONE, "TEXT_OT_cut");
                        uiItemO(layout, NULL, ICON_NONE, "TEXT_OT_copy");
@@ -134,7 +136,7 @@ void TEXT_OT_properties(wmOperatorType *ot)
                uiPupMenuEnd(C, pup);
        }
        else {
-               pup = uiPupMenuBegin(C, "File", ICON_NONE);
+               pup = uiPupMenuBegin(C, IFACE_("File"), ICON_NONE);
                uiItemO(layout, NULL, ICON_NONE, "TEXT_OT_new");
                uiItemO(layout, NULL, ICON_NONE, "TEXT_OT_open");
                uiPupMenuEnd(C, pup);
@@ -146,7 +148,7 @@ void TEXT_OT_properties(wmOperatorType *ot)
 
        uiPopupMenu *pup;
 
-       pup = uiPupMenuBegin(C, "Edit", ICON_NONE);
+       pup = uiPupMenuBegin(C, IFACE_("Edit"), ICON_NONE);
        uiItemO(layout, NULL, ICON_NONE, "TEXT_OT_cut");
        uiItemO(layout, NULL, ICON_NONE, "TEXT_OT_copy");
        uiItemO(layout, NULL, ICON_NONE, "TEXT_OT_paste");
@@ -159,7 +161,7 @@ void TEXT_OT_properties(wmOperatorType *ot)
        uiPopupMenu *pup;
 
        if (text) {
-               pup = uiPupMenuBegin(C, "Text", ICON_NONE);
+               pup = uiPupMenuBegin(C, IFACE_("Text"), ICON_NONE);
                uiItemO(layout, NULL, ICON_NONE, "TEXT_OT_new");
                uiItemO(layout, NULL, ICON_NONE, "TEXT_OT_open");
                uiItemO(layout, NULL, ICON_NONE, "TEXT_OT_save");
@@ -168,7 +170,7 @@ void TEXT_OT_properties(wmOperatorType *ot)
                uiPupMenuEnd(C, pup);
        }
        else {
-               pup = uiPupMenuBegin(C, "File", ICON_NONE);
+               pup = uiPupMenuBegin(C, IFACE_("File"), ICON_NONE);
                uiItemO(layout, NULL, ICON_NONE, "TEXT_OT_new");
                uiItemO(layout, NULL, ICON_NONE, "TEXT_OT_open");
                uiPupMenuEnd(C, pup);
@@ -180,11 +182,14 @@ void TEXT_OT_properties(wmOperatorType *ot)
 
        uiPopupMenu *pup;
 
-       pup = uiPupMenuBegin(C, "Text", ICON_NONE);
-       uiItemEnumO(layout, "TEXT_OT_move", "Top of File", 0, "type", FILE_TOP);
-       uiItemEnumO(layout, "TEXT_OT_move", "Bottom of File", 0, "type", FILE_BOTTOM);
-       uiItemEnumO(layout, "TEXT_OT_move", "Page Up", 0, "type", PREV_PAGE);
-       uiItemEnumO(layout, "TEXT_OT_move", "Page Down", 0, "type", NEXT_PAGE);
+       pup = uiPupMenuBegin(C, IFACE_("Text"), ICON_NONE);
+       uiItemEnumO(layout, "TEXT_OT_move", CTX_IFACE_(BLF_I18NCONTEXT_OPERATOR_DEFAULT, "Top of File"),
+                   0, "type", FILE_TOP);
+       uiItemEnumO(layout, "TEXT_OT_move", CTX_IFACE_(BLF_I18NCONTEXT_OPERATOR_DEFAULT, "Bottom of File"),
+                   0, "type", FILE_BOTTOM);
+       uiItemEnumO(layout, "TEXT_OT_move", CTX_IFACE_(BLF_I18NCONTEXT_OPERATOR_DEFAULT, "Page Up"), 0, "type", PREV_PAGE);
+       uiItemEnumO(layout, "TEXT_OT_move", CTX_IFACE_(BLF_I18NCONTEXT_OPERATOR_DEFAULT, "Page Down"),
+                   0, "type", NEXT_PAGE);
        uiPupMenuEnd(C, pup);
 }
 #endif
index 9b5d453d8a3807171279a2589f57cf71653e5201..b45961bff118e5ddea01e91083deef7a45746366 100644 (file)
@@ -3110,27 +3110,31 @@ static int text_resolve_conflict_invoke(bContext *C, wmOperator *op, wmEvent *UN
                case 1:
                        if (text->flags & TXT_ISDIRTY) {
                                /* modified locally and externally, ahhh. offer more possibilites. */
-                               pup = uiPupMenuBegin(C, "File Modified Outside and Inside Blender", ICON_NONE);
+                               pup = uiPupMenuBegin(C, IFACE_("File Modified Outside and Inside Blender"), ICON_NONE);
                                layout = uiPupMenuLayout(pup);
-                               uiItemEnumO_ptr(layout, op->type, "Reload from disk (ignore local changes)", 0, "resolution", RESOLVE_RELOAD);
-                               uiItemEnumO_ptr(layout, op->type, "Save to disk (ignore outside changes)", 0, "resolution", RESOLVE_SAVE);
-                               uiItemEnumO_ptr(layout, op->type, "Make text internal (separate copy)", 0, "resolution", RESOLVE_MAKE_INTERNAL);
+                               uiItemEnumO_ptr(layout, op->type, IFACE_("Reload from disk (ignore local changes)"),
+                                               0, "resolution", RESOLVE_RELOAD);
+                               uiItemEnumO_ptr(layout, op->type, IFACE_("Save to disk (ignore outside changes)"),
+                                               0, "resolution", RESOLVE_SAVE);
+                               uiItemEnumO_ptr(layout, op->type, IFACE_("Make text internal (separate copy)"),
+                                               0, "resolution", RESOLVE_MAKE_INTERNAL);
                                uiPupMenuEnd(C, pup);
                        }
                        else {
-                               pup = uiPupMenuBegin(C, "File Modified Outside Blender", ICON_NONE);
+                               pup = uiPupMenuBegin(C, IFACE_("File Modified Outside Blender"), ICON_NONE);
                                layout = uiPupMenuLayout(pup);
-                               uiItemEnumO_ptr(layout, op->type, "Reload from disk", 0, "resolution", RESOLVE_RELOAD);
-                               uiItemEnumO_ptr(layout, op->type, "Make text internal (separate copy)", 0, "resolution", RESOLVE_MAKE_INTERNAL);
-                               uiItemEnumO_ptr(layout, op->type, "Ignore", 0, "resolution", RESOLVE_IGNORE);
+                               uiItemEnumO_ptr(layout, op->type, IFACE_("Reload from disk"), 0, "resolution", RESOLVE_RELOAD);
+                               uiItemEnumO_ptr(layout, op->type, IFACE_("Make text internal (separate copy)"),
+                                               0, "resolution", RESOLVE_MAKE_INTERNAL);
+                               uiItemEnumO_ptr(layout, op->type, IFACE_("Ignore"), 0, "resolution", RESOLVE_IGNORE);
                                uiPupMenuEnd(C, pup);
                        }
                        break;
                case 2:
-                       pup = uiPupMenuBegin(C, "File Deleted Outside Blender", ICON_NONE);
+                       pup = uiPupMenuBegin(C, IFACE_("File Deleted Outside Blender"), ICON_NONE);
                        layout = uiPupMenuLayout(pup);
-                       uiItemEnumO_ptr(layout, op->type, "Make text internal", 0, "resolution", RESOLVE_MAKE_INTERNAL);
-                       uiItemEnumO_ptr(layout, op->type, "Recreate file", 0, "resolution", RESOLVE_SAVE);
+                       uiItemEnumO_ptr(layout, op->type, IFACE_("Make text internal"), 0, "resolution", RESOLVE_MAKE_INTERNAL);
+                       uiItemEnumO_ptr(layout, op->type, IFACE_("Recreate file"), 0, "resolution", RESOLVE_SAVE);
                        uiPupMenuEnd(C, pup);
                        break;
        }
index 2b30e4e6b815697f1ae99f768c5a5dd6544a3973..7161014396a1798c3458ff2a55bb3114da9d893b 100644 (file)
@@ -400,13 +400,13 @@ void uiTemplateEditModeSelection(uiLayout *layout, struct bContext *C)
                block = uiLayoutGetBlock(row);
                uiDefIconButBitS(block, TOG, SCE_SELECT_VERTEX, B_SEL_VERT, ICON_VERTEXSEL,
                                 0, 0, UI_UNIT_X, UI_UNIT_Y, &em->selectmode, 1.0, 0.0, 0, 0,
-                                "Vertex select - Shift-Click for multiple modes");
+                                TIP_("Vertex select - Shift-Click for multiple modes"));
                uiDefIconButBitS(block, TOG, SCE_SELECT_EDGE, B_SEL_EDGE, ICON_EDGESEL,
                                 0, 0, UI_UNIT_X, UI_UNIT_Y, &em->selectmode, 1.0, 0.0, 0, 0,
-                                "Edge select - Shift-Click for multiple modes, Ctrl-Click expands selection");
+                                TIP_("Edge select - Shift-Click for multiple modes, Ctrl-Click expands selection"));
                uiDefIconButBitS(block, TOG, SCE_SELECT_FACE, B_SEL_FACE, ICON_FACESEL,
                                 0, 0, UI_UNIT_X, UI_UNIT_Y, &em->selectmode, 1.0, 0.0, 0, 0,
-                                "Face select - Shift-Click for multiple modes, Ctrl-Click expands selection");
+                                TIP_("Face select - Shift-Click for multiple modes, Ctrl-Click expands selection"));
        }
 }
 
index 32dc31954f2d3a1102c702eb2203cd54ac5facfb..0392c0f47a268ab04b65a2933fdec3e50acbf7b1 100644 (file)
@@ -37,6 +37,8 @@
 #include "BLI_math.h"
 #include "BLI_utildefines.h"
 
+#include "BLF_translation.h"
+
 #include "BKE_context.h"
 #include "BKE_global.h"
 #include "BKE_armature.h"
@@ -169,7 +171,7 @@ static int select_orientation_invoke(bContext *C, wmOperator *UNUSED(op), wmEven
        uiPopupMenu *pup;
        uiLayout *layout;
 
-       pup = uiPupMenuBegin(C, "Orientation", ICON_NONE);
+       pup = uiPupMenuBegin(C, IFACE_("Orientation"), ICON_NONE);
        layout = uiPupMenuLayout(pup);
        uiItemsEnumO(layout, "TRANSFORM_OT_select_orientation", "orientation");
        uiPupMenuEnd(C, pup);
index 23d6b0a075e98bb1c6e0bb948eae2d5b6be203b2..f0f31b1e79369a42ade4667286484228c771e5a7 100644 (file)
@@ -42,6 +42,8 @@
 
 #include "BLI_blenlib.h"
 
+#include "BLF_translation.h"
+
 #include "BKE_context.h"
 #include "BKE_global.h"
 #include "BKE_main.h"
@@ -174,10 +176,10 @@ void unpack_menu(bContext *C, const char *opname, const char *id_name, const cha
        char line[FILE_MAX + 100];
        wmOperatorType *ot = WM_operatortype_find(opname, 1);
 
-       pup = uiPupMenuBegin(C, "Unpack file", ICON_NONE);
+       pup = uiPupMenuBegin(C, IFACE_("Unpack File"), ICON_NONE);
        layout = uiPupMenuLayout(pup);
 
-       strcpy(line, "Remove Pack");
+       strcpy(line, IFACE_("Remove Pack"));
        props_ptr = uiItemFullO_ptr(layout, ot, line, ICON_NONE, NULL, WM_OP_EXEC_DEFAULT, UI_ITEM_O_RETURN_PROPS);
        RNA_enum_set(&props_ptr, "method", PF_REMOVE);
        RNA_string_set(&props_ptr, "id", id_name);
@@ -191,14 +193,14 @@ void unpack_menu(bContext *C, const char *opname, const char *id_name, const cha
                if (strcmp(abs_name, local_name) != 0) {
                        switch (checkPackedFile(local_name, pf)) {
                                case PF_NOFILE:
-                                       BLI_snprintf(line, sizeof(line), "Create %s", local_name);
+                                       BLI_snprintf(line, sizeof(line), IFACE_("Create %s"), local_name);
                                        props_ptr = uiItemFullO_ptr(layout, ot, line, ICON_NONE, NULL, WM_OP_EXEC_DEFAULT, UI_ITEM_O_RETURN_PROPS);
                                        RNA_enum_set(&props_ptr, "method", PF_WRITE_LOCAL);
                                        RNA_string_set(&props_ptr, "id", id_name);
 
                                        break;
                                case PF_EQUAL:
-                                       BLI_snprintf(line, sizeof(line), "Use %s (identical)", local_name);
+                                       BLI_snprintf(line, sizeof(line), IFACE_("Use %s (identical)"), local_name);
                                        //uiItemEnumO_ptr(layout, ot, line, 0, "method", PF_USE_LOCAL);
                                        props_ptr = uiItemFullO_ptr(layout, ot, line, ICON_NONE, NULL, WM_OP_EXEC_DEFAULT, UI_ITEM_O_RETURN_PROPS);
                                        RNA_enum_set(&props_ptr, "method", PF_USE_LOCAL);
@@ -206,13 +208,13 @@ void unpack_menu(bContext *C, const char *opname, const char *id_name, const cha
 
                                        break;
                                case PF_DIFFERS:
-                                       BLI_snprintf(line, sizeof(line), "Use %s (differs)", local_name);
+                                       BLI_snprintf(line, sizeof(line), IFACE_("Use %s (differs)"), local_name);
                                        //uiItemEnumO_ptr(layout, ot, line, 0, "method", PF_USE_LOCAL);
                                        props_ptr = uiItemFullO_ptr(layout, ot, line, ICON_NONE, NULL, WM_OP_EXEC_DEFAULT, UI_ITEM_O_RETURN_PROPS);
                                        RNA_enum_set(&props_ptr, "method", PF_USE_LOCAL);
                                        RNA_string_set(&props_ptr, "id", id_name);
 
-                                       BLI_snprintf(line, sizeof(line), "Overwrite %s", local_name);
+                                       BLI_snprintf(line, sizeof(line), IFACE_("Overwrite %s"), local_name);
                                        //uiItemEnumO_ptr(layout, ot, line, 0, "method", PF_WRITE_LOCAL);
                                        props_ptr = uiItemFullO_ptr(layout, ot, line, ICON_NONE, NULL, WM_OP_EXEC_DEFAULT, UI_ITEM_O_RETURN_PROPS);
                                        RNA_enum_set(&props_ptr, "method", PF_WRITE_LOCAL);
@@ -224,27 +226,27 @@ void unpack_menu(bContext *C, const char *opname, const char *id_name, const cha
 
        switch (checkPackedFile(abs_name, pf)) {
                case PF_NOFILE:
-                       BLI_snprintf(line, sizeof(line), "Create %s", abs_name);
+                       BLI_snprintf(line, sizeof(line), IFACE_("Create %s"), abs_name);
                        //uiItemEnumO_ptr(layout, ot, line, 0, "method", PF_WRITE_ORIGINAL);
                        props_ptr = uiItemFullO_ptr(layout, ot, line, ICON_NONE, NULL, WM_OP_EXEC_DEFAULT, UI_ITEM_O_RETURN_PROPS);
                        RNA_enum_set(&props_ptr, "method", PF_WRITE_ORIGINAL);
                        RNA_string_set(&props_ptr, "id", id_name);
                        break;
                case PF_EQUAL:
-                       BLI_snprintf(line, sizeof(line), "Use %s (identical)", abs_name);
+                       BLI_snprintf(line, sizeof(line), IFACE_("Use %s (identical)"), abs_name);
                        //uiItemEnumO_ptr(layout, ot, line, 0, "method", PF_USE_ORIGINAL);
                        props_ptr = uiItemFullO_ptr(layout, ot, line, ICON_NONE, NULL, WM_OP_EXEC_DEFAULT, UI_ITEM_O_RETURN_PROPS);
                        RNA_enum_set(&props_ptr, "method", PF_USE_ORIGINAL);
                        RNA_string_set(&props_ptr, "id", id_name);
                        break;
                case PF_DIFFERS:
-                       BLI_snprintf(line, sizeof(line), "Use %s (differs)", abs_name);
+                       BLI_snprintf(line, sizeof(line), IFACE_("Use %s (differs)"), abs_name);
                        //uiItemEnumO_ptr(layout, ot, line, 0, "method", PF_USE_ORIGINAL);
                        props_ptr = uiItemFullO_ptr(layout, ot, line, ICON_NONE, NULL, WM_OP_EXEC_DEFAULT, UI_ITEM_O_RETURN_PROPS);
                        RNA_enum_set(&props_ptr, "method", PF_USE_ORIGINAL);
                        RNA_string_set(&props_ptr, "id", id_name);
 
-                       BLI_snprintf(line, sizeof(line), "Overwrite %s", abs_name);
+                       BLI_snprintf(line, sizeof(line), IFACE_("Overwrite %s"), abs_name);
                        //uiItemEnumO_ptr(layout, ot, line, 0, "method", PF_WRITE_ORIGINAL);
                        props_ptr = uiItemFullO_ptr(layout, ot, line, ICON_NONE, NULL, WM_OP_EXEC_DEFAULT, UI_ITEM_O_RETURN_PROPS);
                        RNA_enum_set(&props_ptr, "method", PF_WRITE_ORIGINAL);
index d6f3f594395af5caf0c71a6df67ba932d2b2d406..4bf5de03b05273a8b4262d3628784996f2b07fb5 100644 (file)
@@ -2892,7 +2892,7 @@ static void rna_def_particle_settings(BlenderRNA *brna)
        RNA_def_property_float_funcs(prop, "rna_PartSetting_linelentail_get", "rna_PartSetting_linelentail_set", NULL);
        RNA_def_property_range(prop, 0.0f, 100000.0f);
        RNA_def_property_ui_range(prop, 0.0f, 10.0f, 0.1, 3);
-       RNA_def_property_ui_text(prop, "Back", "Length of the line's tail");
+       RNA_def_property_ui_text(prop, "Tail", "Length of the line's tail");
        RNA_def_property_update(prop, 0, "rna_Particle_redo");
 
        prop = RNA_def_property(srna, "line_length_head", PROP_FLOAT, PROP_NONE);