Fix part of T84004: Some 2.92 alpha UI strings can't be translated.
Not sure why, but py files from `bl_operators` were never considered for i18n string extraction... They do define some UI strings though.
This commit is contained in:
parent
c9c3bf9833
commit
c34ba26856
|
@ -504,6 +504,7 @@ MO_FILE_NAME = DOMAIN + ".mo"
|
|||
# Where to search for py files that may contain ui strings (relative to one of the 'resource_path' of Blender).
|
||||
CUSTOM_PY_UI_FILES = [
|
||||
os.path.join("scripts", "startup", "bl_ui"),
|
||||
os.path.join("scripts", "startup", "bl_operators"),
|
||||
os.path.join("scripts", "modules", "rna_prop_ui.py"),
|
||||
]
|
||||
|
||||
|
|
|
@ -181,23 +181,20 @@ class MeshMirrorUV(Operator):
|
|||
bpy.ops.object.mode_set(mode='EDIT', toggle=False)
|
||||
|
||||
if total_duplicates and total_no_active_UV:
|
||||
self.report({'WARNING'}, "%d %s with no active UV layer. "
|
||||
"%d duplicates found in %d %s, mirror may be incomplete."
|
||||
self.report({'WARNING'},
|
||||
"%d mesh(es) with no active UV layer, "
|
||||
"%d duplicates found in %d mesh(es), mirror may be incomplete"
|
||||
% (total_no_active_UV,
|
||||
"mesh" if total_no_active_UV == 1 else "meshes",
|
||||
total_duplicates,
|
||||
meshes_with_duplicates,
|
||||
"mesh" if meshes_with_duplicates == 1 else "meshes"))
|
||||
meshes_with_duplicates))
|
||||
elif total_no_active_UV:
|
||||
self.report({'WARNING'}, "%d %s with no active UV layer."
|
||||
% (total_no_active_UV,
|
||||
"mesh" if total_no_active_UV == 1 else "meshes"))
|
||||
self.report({'WARNING'},
|
||||
"%d mesh(es) with no active UV layer"
|
||||
% (total_no_active_UV,))
|
||||
elif total_duplicates:
|
||||
self.report({'WARNING'}, "%d duplicates found in %d %s,"
|
||||
" mirror may be incomplete."
|
||||
% (total_duplicates,
|
||||
meshes_with_duplicates,
|
||||
"mesh" if meshes_with_duplicates == 1 else "meshes"))
|
||||
self.report({'WARNING'},
|
||||
"%d duplicates found in %d mesh(es), mirror may be incomplete"
|
||||
% (total_duplicates, meshes_with_duplicates))
|
||||
|
||||
return {'FINISHED'}
|
||||
|
||||
|
|
|
@ -566,7 +566,7 @@ class JoinUVs(Operator):
|
|||
uv_other = mesh_other.uv_layers.active
|
||||
if not uv_other:
|
||||
self.report({'ERROR'}, "Could not add "
|
||||
"a new UV map tp object "
|
||||
"a new UV map to object "
|
||||
"'%s' (Mesh '%s')\n"
|
||||
% (obj_other.name,
|
||||
mesh_other.name,
|
||||
|
|
|
@ -254,7 +254,7 @@ class ExecutePreset(Operator):
|
|||
ext = splitext(filepath)[1].lower()
|
||||
|
||||
if ext not in {".py", ".xml"}:
|
||||
self.report({'ERROR'}, "unknown filetype: %r" % ext)
|
||||
self.report({'ERROR'}, "Unknown file type: %r" % ext)
|
||||
return {'CANCELLED'}
|
||||
|
||||
if hasattr(preset_class, "reset_cb"):
|
||||
|
|
|
@ -242,7 +242,7 @@ class SequencerFadesAdd(Operator):
|
|||
sequence.invalidate_cache('COMPOSITE')
|
||||
|
||||
sequence_string = "sequence" if len(faded_sequences) == 1 else "sequences"
|
||||
self.report({'INFO'}, "Added fade animation to %d %s." % (len(faded_sequences), sequence_string))
|
||||
self.report({'INFO'}, "Added fade animation to %d %s" % (len(faded_sequences), sequence_string))
|
||||
return {'FINISHED'}
|
||||
|
||||
def calculate_fade_duration(self, context, sequence):
|
||||
|
|
|
@ -1625,7 +1625,7 @@ class WM_OT_operator_cheat_sheet(Operator):
|
|||
textblock = bpy.data.texts.new("OperatorList.txt")
|
||||
textblock.write('# %d Operators\n\n' % tot)
|
||||
textblock.write('\n'.join(op_strings))
|
||||
self.report({'INFO'}, "See OperatorList.txt textblock")
|
||||
self.report({'INFO'}, "See OperatorList.txt text block")
|
||||
return {'FINISHED'}
|
||||
|
||||
|
||||
|
@ -1717,7 +1717,7 @@ class WM_OT_tool_set_by_id(Operator):
|
|||
tool_settings.workspace_tool_type = 'FALLBACK'
|
||||
return {'FINISHED'}
|
||||
else:
|
||||
self.report({'WARNING'}, "Tool %r not found for space %r." % (self.name, space_type))
|
||||
self.report({'WARNING'}, "Tool %r not found for space %r" % (self.name, space_type))
|
||||
return {'CANCELLED'}
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue