diff --git a/release/scripts/startup/bl_ui/properties_data_modifier.py b/release/scripts/startup/bl_ui/properties_data_modifier.py index 99f82b1e8a3..679b33292e5 100644 --- a/release/scripts/startup/bl_ui/properties_data_modifier.py +++ b/release/scripts/startup/bl_ui/properties_data_modifier.py @@ -265,7 +265,8 @@ class DATA_PT_modifiers(ModifierButtonsPanel, Panel): layout.prop(md, "angle_limit") layout.prop(md, "use_dissolve_boundaries") - layout.label(text="Face Count" + ": %d" % md.face_count) + pgettext = bpy.app.translations.pgettext + layout.label(text=pgettext("Face Count: %d") % md.face_count, translate=False) def DISPLACE(self, layout, ob, md): has_texture = (md.texture is not None) diff --git a/release/scripts/startup/bl_ui/properties_material.py b/release/scripts/startup/bl_ui/properties_material.py index 3a3cd88953c..9b7cfe89a08 100644 --- a/release/scripts/startup/bl_ui/properties_material.py +++ b/release/scripts/startup/bl_ui/properties_material.py @@ -80,9 +80,10 @@ class MATERIAL_UL_matslots(UIList): if ma and not context.scene.render.use_shading_nodes: manode = ma.active_node_material if manode: - layout.label(text="Node %s" % manode.name, translate=False, icon_value=layout.icon(manode)) + pgettext = bpy.app.translations.pgettext + layout.label(text=pgettext("Node %s") % manode.name, translate=False, icon_value=layout.icon(manode)) elif ma.use_nodes: - layout.label(text="Node ", translate=False) + layout.label(text="Node ") else: layout.label(text="") elif self.layout_type in {'GRID'}: diff --git a/release/scripts/startup/bl_ui/properties_particle.py b/release/scripts/startup/bl_ui/properties_particle.py index 90dcf594137..aef860e774b 100644 --- a/release/scripts/startup/bl_ui/properties_particle.py +++ b/release/scripts/startup/bl_ui/properties_particle.py @@ -148,7 +148,8 @@ class PARTICLE_PT_context_particles(ParticleButtonsPanel, Panel): #row.label(text="Render") if part.is_fluid: - layout.label(text="%d fluid particles for this frame" % part.count) + pgettext = bpy.app.translations.pgettext + layout.label(text=pgettext("%d fluid particles for this frame") % part.count, translate=False) return row = col.row() diff --git a/release/scripts/startup/bl_ui/properties_physics_fluid.py b/release/scripts/startup/bl_ui/properties_physics_fluid.py index 08278c02693..c03b5323105 100644 --- a/release/scripts/startup/bl_ui/properties_physics_fluid.py +++ b/release/scripts/startup/bl_ui/properties_physics_fluid.py @@ -64,7 +64,9 @@ class PHYSICS_PT_fluid(PhysicButtonsPanel, Panel): if fluid.type == 'DOMAIN': # odd formatting here so translation script can extract string - layout.operator("fluid.bake", text="Bake (Req. Memory:" + " %s)" % fluid.memory_estimate, icon='MOD_FLUIDSIM') + pgettext = bpy.app.translations.pgettext + layout.operator("fluid.bake", text=pgettext("Bake (Req. Memory: %s)") % fluid.memory_estimate, + translate=False, icon='MOD_FLUIDSIM') split = layout.split() col = split.column() diff --git a/release/scripts/startup/bl_ui/space_clip.py b/release/scripts/startup/bl_ui/space_clip.py index ba38e776ddc..303f47b295d 100644 --- a/release/scripts/startup/bl_ui/space_clip.py +++ b/release/scripts/startup/bl_ui/space_clip.py @@ -313,9 +313,11 @@ class CLIP_PT_tools_solve(CLIP_PT_tracking_panel, Panel): col = layout.column(align=True) - col.operator("clip.solve_camera", - text="Camera Motion" if tracking_object.is_camera - else "Object Motion") + # Note: avoid complex code in "text" values, they can't be handled right by i18n messages extractor script! + if tracking_object.is_camera: + col.operator("clip.solve_camera", text="Camera Motion") + else: + col.operator("clip.solve_camera", text="Object Motion") col.operator("clip.clear_solution") col = layout.column() @@ -907,10 +909,9 @@ class CLIP_MT_view(Menu): ratios = ((1, 8), (1, 4), (1, 2), (1, 1), (2, 1), (4, 1), (8, 1)) + text = bpy.app.translations.pgettext("Zoom %d:%d") for a, b in ratios: - text = "Zoom %d:%d" % (a, b) - layout.operator("clip.view_zoom_ratio", - text=text).ratio = a / b + layout.operator("clip.view_zoom_ratio", text=text % (a, b), translate=False).ratio = a / b else: if sc.view == 'GRAPH': layout.operator_context = 'INVOKE_REGION_PREVIEW' diff --git a/release/scripts/startup/bl_ui/space_image.py b/release/scripts/startup/bl_ui/space_image.py index 179c41ace08..6d08663006f 100644 --- a/release/scripts/startup/bl_ui/space_image.py +++ b/release/scripts/startup/bl_ui/space_image.py @@ -70,8 +70,10 @@ class IMAGE_MT_view(Menu): ratios = ((1, 8), (1, 4), (1, 2), (1, 1), (2, 1), (4, 1), (8, 1)) + pgettext = bpy.app.translations.pgettext for a, b in ratios: - layout.operator("image.view_zoom_ratio", text="Zoom" + " %d:%d" % (a, b)).ratio = a / b + layout.operator("image.view_zoom_ratio", text=pgettext("Zoom %d:%d") % (a, b), + translate=False).ratio = a / b layout.separator() diff --git a/release/scripts/startup/bl_ui/space_sequencer.py b/release/scripts/startup/bl_ui/space_sequencer.py index 64ad5656bcd..b8f44a621a9 100644 --- a/release/scripts/startup/bl_ui/space_sequencer.py +++ b/release/scripts/startup/bl_ui/space_sequencer.py @@ -420,15 +420,19 @@ class SEQUENCER_PT_edit(SequencerButtonsPanel, Panel): sub.prop(strip, "frame_start") sub.prop(strip, "frame_final_duration") + pgettext = bpy.app.translations.pgettext col = layout.column(align=True) row = col.row() - row.label(text="Final Length" + ": %s" % bpy.utils.smpte_from_frame(strip.frame_final_duration)) + row.label(text=pgettext("Final Length: %s") % bpy.utils.smpte_from_frame(strip.frame_final_duration), + translate=False) row = col.row() row.active = (frame_current >= strip.frame_start and frame_current <= strip.frame_start + strip.frame_duration) - row.label(text="Playhead" + ": %d" % (frame_current - strip.frame_start)) + row.label(text=pgettext("Playhead: %d") % (frame_current - strip.frame_start), translate=False) - col.label(text="Frame Offset" + " %d:%d" % (strip.frame_offset_start, strip.frame_offset_end)) - col.label(text="Frame Still" + " %d:%d" % (strip.frame_still_start, strip.frame_still_end)) + col.label(text=pgettext("Frame Offset %d:%d") % (strip.frame_offset_start, strip.frame_offset_end), + translate=False) + col.label(text=pgettext("Frame Still %d:%d") % (strip.frame_still_start, strip.frame_still_end), + translate=False) elem = False @@ -438,7 +442,7 @@ class SEQUENCER_PT_edit(SequencerButtonsPanel, Panel): elem = strip.elements[0] if elem and elem.orig_width > 0 and elem.orig_height > 0: - col.label(text="Original Dimension" + ": %dx%d" % (elem.orig_width, elem.orig_height)) + col.label(text=pgettext("Original Dimension: %dx%d") % (elem.orig_width, elem.orig_height), translate=False) else: col.label(text="Original Dimension: None") @@ -715,7 +719,8 @@ class SEQUENCER_PT_scene(SequencerButtonsPanel, Panel): if scene: sta = scene.frame_start end = scene.frame_end - layout.label(text="Original frame range" + ": %d-%d (%d)" % (sta, end, end - sta + 1)) + pgettext = bpy.app.translations.pgettext + layout.label(text=pgettext("Original frame range: %d-%d (%d)") % (sta, end, end - sta + 1), translate=False) class SEQUENCER_PT_mask(SequencerButtonsPanel, Panel): @@ -744,7 +749,8 @@ class SEQUENCER_PT_mask(SequencerButtonsPanel, Panel): if mask: sta = mask.frame_start end = mask.frame_end - layout.label(text="Original frame range" + ": %d-%d (%d)" % (sta, end, end - sta + 1)) + pgettext = bpy.app.translations.pgettext + layout.label(text=pgettext("Original frame range: %d-%d (%d)") % (sta, end, end - sta + 1), translate=False) class SEQUENCER_PT_filter(SequencerButtonsPanel, Panel): diff --git a/release/scripts/startup/bl_ui/space_text.py b/release/scripts/startup/bl_ui/space_text.py index 65ec945c7da..d976475c29e 100644 --- a/release/scripts/startup/bl_ui/space_text.py +++ b/release/scripts/startup/bl_ui/space_text.py @@ -71,16 +71,15 @@ class TEXT_HT_header(Header): row = layout.row() if text.filepath: + pgettext = bpy.app.translations.pgettext if text.is_dirty: - row.label(text="File" + ": *%r " % - text.filepath + "(unsaved)") + row.label(text=pgettext("File: *%r (unsaved)") % text.filepath, translate=False) else: - row.label(text="File" + ": %r" % - text.filepath) + row.label(text=pgettext("File: %r") % text.filepath, translate=False) + elif text.library: + row.label(text="Text: External") else: - row.label(text="Text: External" - if text.library - else "Text: Internal") + row.label(text="Text: Internal") class TEXT_PT_properties(Panel): diff --git a/release/scripts/startup/bl_ui/space_userpref.py b/release/scripts/startup/bl_ui/space_userpref.py index 4ebd38ca0b2..5bb83e7f429 100644 --- a/release/scripts/startup/bl_ui/space_userpref.py +++ b/release/scripts/startup/bl_ui/space_userpref.py @@ -778,9 +778,10 @@ class USERPREF_PT_theme(Panel): layout.separator() elif theme.theme_area == 'BONE_COLOR_SETS': col = split.column() + pgettext = bpy.app.translations.pgettext for i, ui in enumerate(theme.bone_color_sets): - col.label(text="Color Set" + " %d:" % (i + 1)) # i starts from 0 + col.label(text=pgettext("Color Set %d:") % (i + 1), translate=False) # i starts from 0 row = col.row() diff --git a/release/scripts/startup/bl_ui/space_userpref_keymap.py b/release/scripts/startup/bl_ui/space_userpref_keymap.py index 82299bc951c..db78adcb576 100644 --- a/release/scripts/startup/bl_ui/space_userpref_keymap.py +++ b/release/scripts/startup/bl_ui/space_userpref_keymap.py @@ -97,7 +97,8 @@ class InputKeyMapPanel: subcol = self.indented_layout(col, level + 1) subrow = subcol.row() subrow.prop(km, "show_expanded_items", text="", emboss=False) - subrow.label(text="%s " % km.name + "(Global)") + pgettext = bpy.app.translations.pgettext + subrow.label(text=pgettext("%s (Global)") % km.name, translate=False) else: km.show_expanded_items = True diff --git a/source/blender/editors/io/io_collada.c b/source/blender/editors/io/io_collada.c index 0982b4f034e..2004b18adf6 100644 --- a/source/blender/editors/io/io_collada.c +++ b/source/blender/editors/io/io_collada.c @@ -368,9 +368,8 @@ void WM_OT_collada_import(wmOperatorType *ot) WM_operator_properties_filesel(ot, FOLDERFILE | COLLADAFILE, FILE_BLENDER, FILE_OPENFILE, WM_FILESEL_FILEPATH, FILE_DEFAULTDISPLAY); - RNA_def_boolean(ot->srna, - "import_units", 0, "Import Units", - "If enabled use Units as defined in Collada Import, else keep Blender's current Units settings. "); + RNA_def_boolean(ot->srna, "import_units", 0, "Import Units", + "If enabled use Units as defined in Collada Import, else keep Blender's current Units settings"); } #endif