I18n: Go over TIP_ and IFACE_ usages, change to RPT_ when relevant
The previous commit introduced a new `RPT_()` macro to translate strings which are not tooltips or regular interface elements, but longer reports or statuses. This commit uses the new macro to translate many strings all over the UI. Most of it is a simple replace from `TIP_()` or `IFACE_()` to `RPT_()`, but there are some additional changes: - A few translations inside `BKE_report()` are removed altogether because they are already handled by the translation system. - Messages inside `UI_but_disable()` are no longer translated manually, but they are handled by a new regex in the translation system. Pull Request: https://projects.blender.org/blender/blender/pulls/116804 Pull Request: https://projects.blender.org/blender/blender/pulls/116804
This commit is contained in:
@@ -14,7 +14,7 @@ from bpy.props import (
|
||||
StringProperty,
|
||||
)
|
||||
from bpy.app.translations import (
|
||||
pgettext_tip as tip_,
|
||||
pgettext_rpt as rpt_,
|
||||
contexts as i18n_contexts,
|
||||
)
|
||||
|
||||
@@ -114,7 +114,7 @@ class ANIM_OT_keying_set_export(Operator):
|
||||
if not found:
|
||||
self.report(
|
||||
{'WARN'},
|
||||
tip_("Could not find material or light using Shader Node Tree - %s") %
|
||||
rpt_("Could not find material or light using Shader Node Tree - %s") %
|
||||
(ksp.id))
|
||||
elif ksp.id.bl_rna.identifier.startswith("CompositorNodeTree"):
|
||||
# Find compositor node-tree using this node tree.
|
||||
@@ -123,7 +123,7 @@ class ANIM_OT_keying_set_export(Operator):
|
||||
id_bpy_path = "bpy.data.scenes[\"%s\"].node_tree" % (scene.name)
|
||||
break
|
||||
else:
|
||||
self.report({'WARN'}, tip_("Could not find scene using Compositor Node Tree - %s") % (ksp.id))
|
||||
self.report({'WARN'}, rpt_("Could not find scene using Compositor Node Tree - %s") % (ksp.id))
|
||||
elif ksp.id.bl_rna.name == "Key":
|
||||
# "keys" conflicts with a Python keyword, hence the simple solution won't work
|
||||
id_bpy_path = "bpy.data.shape_keys[\"%s\"]" % (ksp.id.name)
|
||||
@@ -358,7 +358,7 @@ class ClearUselessActions(Operator):
|
||||
action.user_clear()
|
||||
removed += 1
|
||||
|
||||
self.report({'INFO'}, tip_("Removed %d empty and/or fake-user only Actions")
|
||||
self.report({'INFO'}, rpt_("Removed %d empty and/or fake-user only Actions")
|
||||
% removed)
|
||||
return {'FINISHED'}
|
||||
|
||||
@@ -443,7 +443,7 @@ class UpdateAnimatedTransformConstraint(Operator):
|
||||
print(log)
|
||||
text = bpy.data.texts.new("UpdateAnimatedTransformConstraint Report")
|
||||
text.from_string(log)
|
||||
self.report({'INFO'}, tip_("Complete report available on '%s' text datablock") % text.name)
|
||||
self.report({'INFO'}, rpt_("Complete report available on '%s' text datablock") % text.name)
|
||||
return {'FINISHED'}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user