From b1543f07bf1e135dc6f99567175e728fda6c4726 Mon Sep 17 00:00:00 2001 From: Bastien Montagne Date: Sun, 24 Feb 2013 15:40:28 +0000 Subject: =?UTF-8?q?Another=20bunch=20of=20UI=20translation=20fixes,=20than?= =?UTF-8?q?ks=20to=20Leon=20Cheung,=20Gabriel=20Gazz=C3=A1n=20and=20S.=20L?= =?UTF-8?q?ockal=20for=20spotting=20them!?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../editors/animation/anim_channels_defines.c | 16 +++++++------ source/blender/editors/animation/fmodifier_ui.c | 4 ++-- source/blender/editors/armature/editarmature.c | 4 +++- source/blender/editors/curve/CMakeLists.txt | 5 +++++ source/blender/editors/curve/SConscript | 7 +++++- source/blender/editors/curve/editcurve.c | 8 ++++--- source/blender/editors/io/CMakeLists.txt | 4 ++++ source/blender/editors/io/SConscript | 3 +++ source/blender/editors/object/object_constraint.c | 12 +++++----- source/blender/editors/object/object_relations.c | 2 +- source/blender/editors/object/object_select.c | 4 +++- source/blender/editors/screen/area.c | 4 ++-- .../editors/space_buttons/buttons_texture.c | 4 +++- source/blender/editors/space_image/image_ops.c | 5 +++-- source/blender/editors/space_info/info_ops.c | 10 +++++---- source/blender/editors/space_info/info_stats.c | 18 +++++++-------- source/blender/editors/space_nla/nla_buttons.c | 12 +++++----- source/blender/editors/space_nla/nla_edit.c | 4 +++- source/blender/editors/space_node/node_group.c | 6 +++-- source/blender/editors/space_text/text_header.c | 25 ++++++++++++--------- source/blender/editors/space_text/text_ops.c | 26 +++++++++++++--------- .../blender/editors/space_view3d/view3d_header.c | 6 ++--- source/blender/editors/transform/transform_ops.c | 4 +++- source/blender/editors/util/ed_util.c | 22 +++++++++--------- source/blender/makesrna/intern/rna_particle.c | 2 +- 25 files changed, 133 insertions(+), 84 deletions(-) (limited to 'source/blender') diff --git a/source/blender/editors/animation/anim_channels_defines.c b/source/blender/editors/animation/anim_channels_defines.c index da253ea6d2d..2e413c70e0b 100644 --- a/source/blender/editors/animation/anim_channels_defines.c +++ b/source/blender/editors/animation/anim_channels_defines.c @@ -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: diff --git a/source/blender/editors/animation/fmodifier_ui.c b/source/blender/editors/animation/fmodifier_ui.c index cc2366affe6..dc0fba0930f 100644 --- a/source/blender/editors/animation/fmodifier_ui.c +++ b/source/blender/editors/animation/fmodifier_ui.c @@ -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, "", ICON_NONE); + uiItemL(sub, IFACE_(""), ICON_NONE); /* right-align ------------------------------------------- */ sub = uiLayoutRow(row, TRUE); diff --git a/source/blender/editors/armature/editarmature.c b/source/blender/editors/armature/editarmature.c index 2eac6ba87ee..574cf18773b 100644 --- a/source/blender/editors/armature/editarmature.c +++ b/source/blender/editors/armature/editarmature.c @@ -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; diff --git a/source/blender/editors/curve/CMakeLists.txt b/source/blender/editors/curve/CMakeLists.txt index 25df17d232a..c38ded49830 100644 --- a/source/blender/editors/curve/CMakeLists.txt +++ b/source/blender/editors/curve/CMakeLists.txt @@ -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}") diff --git a/source/blender/editors/curve/SConscript b/source/blender/editors/curve/SConscript index abefd3c6dd6..887fd5ba2f2 100644 --- a/source/blender/editors/curve/SConscript +++ b/source/blender/editors/curve/SConscript @@ -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] ) diff --git a/source/blender/editors/curve/editcurve.c b/source/blender/editors/curve/editcurve.c index b5aa55dbda9..d01e5c5d9bf 100644 --- a/source/blender/editors/curve/editcurve.c +++ b/source/blender/editors/curve/editcurve.c @@ -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); diff --git a/source/blender/editors/io/CMakeLists.txt b/source/blender/editors/io/CMakeLists.txt index 7db23041c88..d4ae5b8b29b 100644 --- a/source/blender/editors/io/CMakeLists.txt +++ b/source/blender/editors/io/CMakeLists.txt @@ -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}") diff --git a/source/blender/editors/io/SConscript b/source/blender/editors/io/SConscript index cef73f33ddd..b7449ccad79 100644 --- a/source/blender/editors/io/SConscript +++ b/source/blender/editors/io/SConscript @@ -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] ) diff --git a/source/blender/editors/object/object_constraint.c b/source/blender/editors/object/object_constraint.c index 84b989e2f59..1bed7d7dd11 100644 --- a/source/blender/editors/object/object_constraint.c +++ b/source/blender/editors/object/object_constraint.c @@ -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) */ diff --git a/source/blender/editors/object/object_relations.c b/source/blender/editors/object/object_relations.c index c5e8310e9fb..f9dde043607 100644 --- a/source/blender/editors/object/object_relations.c +++ b/source/blender/editors/object/object_relations.c @@ -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 */ diff --git a/source/blender/editors/object/object_select.c b/source/blender/editors/object/object_select.c index 775a2897513..baa0199baf7 100644 --- a/source/blender/editors/object/object_select.c +++ b/source/blender/editors/object/object_select.c @@ -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++) { diff --git a/source/blender/editors/screen/area.c b/source/blender/editors/screen/area.c index 46f726e45c6..8a01cf351bf 100644 --- a/source/blender/editors/screen/area.c +++ b/source/blender/editors/screen/area.c @@ -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 */ diff --git a/source/blender/editors/space_buttons/buttons_texture.c b/source/blender/editors/space_buttons/buttons_texture.c index 935b15f3cd8..16d194d0929 100644 --- a/source/blender/editors/space_buttons/buttons_texture.c +++ b/source/blender/editors/space_buttons/buttons_texture.c @@ -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; } diff --git a/source/blender/editors/space_image/image_ops.c b/source/blender/editors/space_image/image_ops.c index dc834d88323..3bcb4a57c57 100644 --- a/source/blender/editors/space_image/image_ops.c +++ b/source/blender/editors/space_image/image_ops.c @@ -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); diff --git a/source/blender/editors/space_info/info_ops.c b/source/blender/editors/space_info/info_ops.c index 22668a3de3a..04f6a5152e6 100644 --- a/source/blender/editors/space_info/info_ops.c +++ b/source/blender/editors/space_info/info_ops.c @@ -40,9 +40,11 @@ #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); diff --git a/source/blender/editors/space_info/info_stats.c b/source/blender/editors/space_info/info_stats.c index 5a8a77f7350..976769752f9 100644 --- a/source/blender/editors/space_info/info_stats.c +++ b/source/blender/editors/space_info/info_stats.c @@ -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); } diff --git a/source/blender/editors/space_nla/nla_buttons.c b/source/blender/editors/space_nla/nla_buttons.c index d75946c4317..eb7de072043 100644 --- a/source/blender/editors/space_nla/nla_buttons.c +++ b/source/blender/editors/space_nla/nla_buttons.c @@ -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); } diff --git a/source/blender/editors/space_nla/nla_edit.c b/source/blender/editors/space_nla/nla_edit.c index 3740c3fae5e..484eb47fa8e 100644 --- a/source/blender/editors/space_nla/nla_edit.c +++ b/source/blender/editors/space_nla/nla_edit.c @@ -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 */ diff --git a/source/blender/editors/space_node/node_group.c b/source/blender/editors/space_node/node_group.c index 943f12c4c54..7b7b98f132c 100644 --- a/source/blender/editors/space_node/node_group.c +++ b/source/blender/editors/space_node/node_group.c @@ -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); diff --git a/source/blender/editors/space_text/text_header.c b/source/blender/editors/space_text/text_header.c index 52253b2d5d2..605a08e587a 100644 --- a/source/blender/editors/space_text/text_header.c +++ b/source/blender/editors/space_text/text_header.c @@ -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 diff --git a/source/blender/editors/space_text/text_ops.c b/source/blender/editors/space_text/text_ops.c index 9b5d453d8a3..b45961bff11 100644 --- a/source/blender/editors/space_text/text_ops.c +++ b/source/blender/editors/space_text/text_ops.c @@ -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; } diff --git a/source/blender/editors/space_view3d/view3d_header.c b/source/blender/editors/space_view3d/view3d_header.c index 2b30e4e6b81..7161014396a 100644 --- a/source/blender/editors/space_view3d/view3d_header.c +++ b/source/blender/editors/space_view3d/view3d_header.c @@ -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")); } } diff --git a/source/blender/editors/transform/transform_ops.c b/source/blender/editors/transform/transform_ops.c index 32dc31954f2..0392c0f47a2 100644 --- a/source/blender/editors/transform/transform_ops.c +++ b/source/blender/editors/transform/transform_ops.c @@ -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); diff --git a/source/blender/editors/util/ed_util.c b/source/blender/editors/util/ed_util.c index 23d6b0a075e..f0f31b1e793 100644 --- a/source/blender/editors/util/ed_util.c +++ b/source/blender/editors/util/ed_util.c @@ -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); diff --git a/source/blender/makesrna/intern/rna_particle.c b/source/blender/makesrna/intern/rna_particle.c index d6f3f594395..4bf5de03b05 100644 --- a/source/blender/makesrna/intern/rna_particle.c +++ b/source/blender/makesrna/intern/rna_particle.c @@ -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); -- cgit v1.2.3