Fix #76101: I18n: add new preference to translate reports #116804

Merged
Bastien Montagne merged 2 commits from pioverfour/blender:dp_translate_report_76101 into main 2024-01-12 13:37:41 +01:00
193 changed files with 781 additions and 684 deletions

View File

@ -16,7 +16,7 @@ from bpy.props import (
)
from bpy.app.translations import (
contexts as i18n_contexts,
pgettext_iface as iface_
pgettext_rpt as rpt_
)
from math import pi
@ -1602,50 +1602,62 @@ class CyclesPreferences(bpy.types.AddonPreferences):
if not found_device:
col = box.column(align=True)
col.label(text="No compatible GPUs found for Cycles", icon='INFO')
col.label(text=rpt_("No compatible GPUs found for Cycles"), icon='INFO', translate=False)
if device_type == 'CUDA':
compute_capability = "3.0"
col.label(text=iface_("Requires NVIDIA GPU with compute capability %s") % compute_capability,
col.label(text=rpt_("Requires NVIDIA GPU with compute capability %s") % compute_capability,
icon='BLANK1', translate=False)
elif device_type == 'OPTIX':
compute_capability = "5.0"
driver_version = "470"
col.label(text=iface_("Requires NVIDIA GPU with compute capability %s") % compute_capability,
col.label(text=rpt_("Requires NVIDIA GPU with compute capability %s") % compute_capability,
icon='BLANK1', translate=False)
col.label(text=iface_("and NVIDIA driver version %s or newer") % driver_version,
col.label(text=rpt_("and NVIDIA driver version %s or newer") % driver_version,
icon='BLANK1', translate=False)
elif device_type == 'HIP':
import sys
if sys.platform[:3] == "win":
driver_version = "21.Q4"
col.label(text="Requires AMD GPU with Vega or RDNA architecture", icon='BLANK1')
col.label(text=iface_("and AMD Radeon Pro %s driver or newer") % driver_version,
col.label(
text=rpt_("Requires AMD GPU with Vega or RDNA architecture"),
icon='BLANK1',
translate=False)
col.label(text=rpt_("and AMD Radeon Pro %s driver or newer") % driver_version,
icon='BLANK1', translate=False)
elif sys.platform.startswith("linux"):
driver_version = "22.10"
col.label(text="Requires AMD GPU with Vega or RDNA architecture", icon='BLANK1')
col.label(text=iface_("and AMD driver version %s or newer") % driver_version, icon='BLANK1',
col.label(
text=rpt_("Requires AMD GPU with Vega or RDNA architecture"),
icon='BLANK1',
translate=False)
col.label(text=rpt_("and AMD driver version %s or newer") % driver_version, icon='BLANK1',
translate=False)
elif device_type == 'ONEAPI':
import sys
if sys.platform.startswith("win"):
driver_version = "XX.X.101.4824"
col.label(text="Requires Intel GPU with Xe-HPG architecture", icon='BLANK1')
col.label(text=iface_("and Windows driver version %s or newer") % driver_version,
col.label(text=rpt_("Requires Intel GPU with Xe-HPG architecture"), icon='BLANK1', translate=False)
col.label(text=rpt_("and Windows driver version %s or newer") % driver_version,
icon='BLANK1', translate=False)
elif sys.platform.startswith("linux"):
driver_version = "XX.XX.25812.14"
col.label(text="Requires Intel GPU with Xe-HPG architecture and", icon='BLANK1')
col.label(text=" - intel-level-zero-gpu or intel-compute-runtime version", icon='BLANK1')
col.label(text=iface_(" %s or newer") % driver_version, icon='BLANK1', translate=False)
col.label(text=" - oneAPI Level-Zero Loader", icon='BLANK1')
col.label(
text=rpt_("Requires Intel GPU with Xe-HPG architecture and"),
icon='BLANK1',
translate=False)
col.label(
text=rpt_(" - intel-level-zero-gpu or intel-compute-runtime version"),
icon='BLANK1',
translate=False)
col.label(text=rpt_(" %s or newer") % driver_version, icon='BLANK1', translate=False)
col.label(text=rpt_(" - oneAPI Level-Zero Loader"), icon='BLANK1', translate=False)
elif device_type == 'METAL':
silicon_mac_version = "12.2"
amd_mac_version = "12.3"
col.label(text=iface_("Requires Apple Silicon with macOS %s or newer") % silicon_mac_version,
col.label(text=rpt_("Requires Apple Silicon with macOS %s or newer") % silicon_mac_version,
icon='BLANK1', translate=False)
col.label(text=iface_("or AMD with macOS %s or newer") % amd_mac_version, icon='BLANK1',
col.label(text=rpt_("or AMD with macOS %s or newer") % amd_mac_version, icon='BLANK1',
translate=False)
return

View File

@ -573,6 +573,7 @@ def dump_py_messages_from_files(msgs, reports, files, settings):
("pgettext", ("_",)),
("pgettext_iface", ("iface_",)),
("pgettext_tip", ("tip_",)),
("pgettext_rpt", ("rpt_",)),
("pgettext_data", ("data_",)),
)
pgettext_variants_args = {"msgid": (0, {"msgctxt": 1})}

View File

@ -243,14 +243,15 @@ _ctxt_re = _ctxt_re_gen("")
_msg_re = r"(?P<msg_raw>" + _str_whole_re.format(_="_msg") + r")"
PYGETTEXT_KEYWORDS = (() +
tuple((r"{}\(\s*" + _msg_re + r"\s*\)").format(it)
for it in ("IFACE_", "TIP_", "DATA_", "N_")) +
for it in ("IFACE_", "TIP_", "RPT_", "DATA_", "N_")) +
tuple((r"{}\(\s*" + _ctxt_re + r"\s*,\s*" + _msg_re + r"\s*\)").format(it)
for it in ("CTX_IFACE_", "CTX_TIP_", "CTX_DATA_", "CTX_N_")) +
for it in ("CTX_IFACE_", "CTX_TIP_", "CTX_RPT_", "CTX_DATA_", "CTX_N_")) +
tuple(("{}\\((?:[^\"',]+,){{1,2}}\\s*" + _msg_re + r"\s*(?:\)|,)").format(it)
for it in ("BKE_report", "BKE_reportf", "BKE_reports_prepend", "BKE_reports_prependf",
"CTX_wm_operator_poll_msg_set", "WM_report", "WM_reportf")) +
"CTX_wm_operator_poll_msg_set", "WM_report", "WM_reportf",
"UI_but_disable")) +
# bmesh operator errors
tuple(("{}\\((?:[^\"',]+,){{3}}\\s*" + _msg_re + r"\s*\)").format(it)

View File

@ -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'}

View File

@ -8,7 +8,7 @@ import bpy
from bpy.types import Operator
from bpy.app.translations import (
pgettext_data as data_,
pgettext_tip as tip_,
pgettext_rpt as rpt_,
)
@ -125,7 +125,7 @@ class ASSET_OT_open_containing_blend_file(Operator):
return {'RUNNING_MODAL'}
if returncode:
self.report({'WARNING'}, tip_("Blender sub-process exited with error code %d") % returncode)
self.report({'WARNING'}, rpt_("Blender sub-process exited with error code %d") % returncode)
if bpy.ops.asset.library_refresh.poll():
bpy.ops.asset.library_refresh()

View File

@ -9,7 +9,7 @@ from mathutils import (
Vector,
Matrix,
)
from bpy.app.translations import pgettext_tip as tip_
from bpy.app.translations import pgettext_rpt as rpt_
def CLIP_spaces_walk(context, all_screens, tarea, tspace, callback, *args):
@ -197,7 +197,7 @@ class CLIP_OT_filter_tracks(Operator):
def execute(self, context):
num_tracks = self._filter_values(context, self.track_threshold)
self.report({'INFO'}, tip_("Identified %d problematic tracks") % num_tracks)
self.report({'INFO'}, rpt_("Identified %d problematic tracks") % num_tracks)
return {'FINISHED'}

View File

@ -12,7 +12,7 @@ from bpy.props import (
CollectionProperty,
StringProperty,
)
from bpy.app.translations import pgettext_tip as tip_
from bpy.app.translations import pgettext_rpt as rpt_
# ########## Datablock previews... ##########
@ -126,7 +126,7 @@ class WM_OT_previews_batch_generate(Operator):
if not self.use_backups:
cmd.append("--no_backups")
if subprocess.call(cmd):
self.report({'ERROR'}, tip_("Previews generation process failed for file '%s'!") % blen_path)
self.report({'ERROR'}, rpt_("Previews generation process failed for file '%s'!") % blen_path)
context.window_manager.progress_end()
return {'CANCELLED'}
context.window_manager.progress_update(i + 1)
@ -237,7 +237,7 @@ class WM_OT_previews_batch_clear(Operator):
if not self.use_backups:
cmd.append("--no_backups")
if subprocess.call(cmd):
self.report({'ERROR'}, tip_("Previews clear process failed for file '%s'!") % blen_path)
self.report({'ERROR'}, rpt_("Previews clear process failed for file '%s'!") % blen_path)
context.window_manager.progress_end()
return {'CANCELLED'}
context.window_manager.progress_update(i + 1)

View File

@ -5,7 +5,7 @@
import bpy
from bpy.types import Operator
from bpy.props import StringProperty
from bpy.app.translations import pgettext_tip as tip_
from bpy.app.translations import pgettext_rpt as rpt_
class EditExternally(Operator):
@ -55,7 +55,7 @@ class EditExternally(Operator):
if not os.path.exists(filepath) or not os.path.isfile(filepath):
self.report({'ERROR'},
tip_("Image path %r not found, image may be packed or "
rpt_("Image path %r not found, image may be packed or "
"unsaved") % filepath)
return {'CANCELLED'}
@ -182,7 +182,7 @@ class ProjectApply(Operator):
image_name = ProjectEdit._proj_hack[0] # TODO, deal with this nicer
image = bpy.data.images.get((image_name, None))
if image is None:
self.report({'ERROR'}, tip_("Could not find image '%s'") % image_name)
self.report({'ERROR'}, rpt_("Could not find image '%s'") % image_name)
return {'CANCELLED'}
image.reload()

View File

@ -9,7 +9,7 @@ from bpy.props import (
EnumProperty,
IntProperty,
)
from bpy.app.translations import pgettext_tip as tip_
from bpy.app.translations import pgettext_rpt as rpt_
class MeshMirrorUV(Operator):
@ -169,18 +169,18 @@ class MeshMirrorUV(Operator):
if total_duplicates and total_no_active_UV:
self.report({'WARNING'},
tip_("%d mesh(es) with no active UV layer, "
rpt_("%d mesh(es) with no active UV layer, "
"%d duplicates found in %d mesh(es), mirror may be incomplete")
% (total_no_active_UV,
total_duplicates,
meshes_with_duplicates))
elif total_no_active_UV:
self.report({'WARNING'},
tip_("%d mesh(es) with no active UV layer")
rpt_("%d mesh(es) with no active UV layer")
% (total_no_active_UV,))
elif total_duplicates:
self.report({'WARNING'},
tip_("%d duplicates found in %d mesh(es), mirror may be incomplete")
rpt_("%d duplicates found in %d mesh(es), mirror may be incomplete")
% (total_duplicates, meshes_with_duplicates))
return {'FINISHED'}

View File

@ -20,7 +20,10 @@ from mathutils import (
Vector,
)
from bpy.app.translations import pgettext_tip as tip_
from bpy.app.translations import (
pgettext_tip as tip_,
pgettext_rpt as rpt_,
)
class NodeSetting(PropertyGroup):
@ -94,7 +97,7 @@ class NodeAddOperator:
except AttributeError as ex:
self.report(
{'ERROR_INVALID_INPUT'},
tip_("Node has no attribute %s") % setting.name)
rpt_("Node has no attribute %s") % setting.name)
print(str(ex))
# Continue despite invalid attribute

View File

@ -10,7 +10,7 @@ from bpy.props import (
IntProperty,
StringProperty,
)
from bpy.app.translations import pgettext_tip as tip_
from bpy.app.translations import pgettext_rpt as rpt_
class SelectPattern(Operator):
@ -367,12 +367,12 @@ class ShapeTransfer(Operator):
for ob_other in objects:
if ob_other.type != 'MESH':
self.report({'WARNING'},
tip_("Skipping '%s', not a mesh") % ob_other.name)
rpt_("Skipping '%s', not a mesh") % ob_other.name)
continue
me_other = ob_other.data
if len(me_other.vertices) != len(me.vertices):
self.report({'WARNING'},
tip_("Skipping '%s', vertex count differs") % ob_other.name)
rpt_("Skipping '%s', vertex count differs") % ob_other.name)
continue
target_normals = me_nos(me_other.vertices)
@ -511,7 +511,7 @@ class JoinUVs(Operator):
if not mesh.uv_layers:
self.report({'WARNING'},
tip_("Object: %s, Mesh: '%s' has no UVs")
rpt_("Object: %s, Mesh: '%s' has no UVs")
% (obj.name, mesh.name))
else:
nbr_loops = len(mesh.loops)
@ -535,7 +535,7 @@ class JoinUVs(Operator):
if len(mesh_other.loops) != nbr_loops:
self.report({'WARNING'},
tip_("Object: %s, Mesh: "
rpt_("Object: %s, Mesh: "
"'%s' has %d loops (for %d faces),"
" expected %d\n")
% (obj_other.name,
@ -552,7 +552,7 @@ class JoinUVs(Operator):
uv_other = mesh_other.uv_layers.active
if not uv_other:
self.report({'ERROR'},
tip_("Could not add "
rpt_("Could not add "
"a new UV map to object "
"'%s' (Mesh '%s')\n")
% (obj_other.name,
@ -795,7 +795,7 @@ class TransformsToDeltasAnim(Operator):
adt = obj.animation_data
if (adt is None) or (adt.action is None):
self.report({'WARNING'},
tip_("No animation data to convert on object: %r")
rpt_("No animation data to convert on object: %r")
% obj.name)
continue
@ -822,7 +822,7 @@ class TransformsToDeltasAnim(Operator):
if fcu.array_index in existingFCurves[dpath]:
# conflict
self.report({'ERROR'},
tip_("Object '%r' already has '%r' F-Curve(s). "
rpt_("Object '%r' already has '%r' F-Curve(s). "
"Remove these before trying again") %
(obj.name, dpath))
return {'CANCELLED'}

View File

@ -12,7 +12,7 @@ from bpy.props import (
IntProperty,
)
from bpy.app.translations import (
pgettext_tip as tip_,
pgettext_rpt as rpt_,
pgettext_data as data_,
)
@ -282,7 +282,7 @@ class QuickExplode(ObjectModeOperator, Operator):
for obj in mesh_objects:
if obj.particle_systems:
self.report({'ERROR'},
tip_("Object %r already has a "
rpt_("Object %r already has a "
"particle system") % obj.name)
return {'CANCELLED'}

View File

@ -13,7 +13,7 @@ from bpy.props import (
StringProperty,
)
from bpy.app.translations import (
pgettext_tip as tip_,
pgettext_rpt as rpt_,
pgettext_data as data_,
)
@ -191,7 +191,7 @@ class AddPresetBase:
else:
os.remove(filepath)
except BaseException as ex:
self.report({'ERROR'}, tip_("Unable to remove preset: %r") % ex)
self.report({'ERROR'}, rpt_("Unable to remove preset: %r") % ex)
import traceback
traceback.print_exc()
return {'CANCELLED'}
@ -241,7 +241,7 @@ class ExecutePreset(Operator):
ext = splitext(filepath)[1].lower()
if ext not in {".py", ".xml"}:
self.report({'ERROR'}, tip_("Unknown file type: %r") % ext)
self.report({'ERROR'}, rpt_("Unknown file type: %r") % ext)
return {'CANCELLED'}
if hasattr(preset_class, "reset_cb"):

View File

@ -6,7 +6,7 @@
import bpy
from bpy.types import Operator
from bpy.app.translations import pgettext_tip as tip_
from bpy.app.translations import pgettext_rpt as rpt_
def guess_player_path(preset):
@ -119,7 +119,7 @@ class PlayRenderedAnim(Operator):
file = rd.frame_path(frame=scene.frame_start, preview=scene.use_preview_range, view=view_suffix)
file = bpy.path.abspath(file) # expand '//'
if not os.path.exists(file):
err_msg = tip_("File %r not found") % file
err_msg = rpt_("File %r not found") % file
self.report({'WARNING'}, err_msg)
path_valid = False
@ -127,7 +127,7 @@ class PlayRenderedAnim(Operator):
if scene.use_preview_range and not path_valid:
file = rd.frame_path(frame=scene.frame_start, preview=False, view=view_suffix)
file = bpy.path.abspath(file) # expand '//'
err_msg = tip_("File %r not found") % file
err_msg = rpt_("File %r not found") % file
if not os.path.exists(file):
self.report({'WARNING'}, err_msg)
@ -195,7 +195,7 @@ class PlayRenderedAnim(Operator):
try:
subprocess.Popen(cmd)
except BaseException as ex:
err_msg = tip_("Couldn't run external animation player with command %r\n%s") % (cmd, ex)
err_msg = rpt_("Couldn't run external animation player with command %r\n%s") % (cmd, ex)
self.report(
{'ERROR'},
err_msg,

View File

@ -10,7 +10,7 @@ from bpy.props import (
FloatProperty,
IntProperty,
)
from bpy.app.translations import pgettext_tip as tip_
from bpy.app.translations import pgettext_rpt as rpt_
class SequencerCrossfadeSounds(Operator):
@ -236,7 +236,7 @@ class SequencerFadesAdd(Operator):
sequence.invalidate_cache('COMPOSITE')
sequence_string = "sequence" if len(faded_sequences) == 1 else "sequences"
self.report({'INFO'}, tip_("Added fade animation to %d %s") % (len(faded_sequences), sequence_string))
self.report({'INFO'}, rpt_("Added fade animation to %d %s") % (len(faded_sequences), sequence_string))
return {'FINISHED'}
def calculate_fade_duration(self, context, sequence):

View File

@ -16,7 +16,7 @@ from bpy.props import (
)
from bpy.app.translations import (
pgettext_iface as iface_,
pgettext_tip as tip_,
pgettext_tip as rpt_,
)
@ -229,7 +229,7 @@ class PREFERENCES_OT_keyconfig_import(Operator):
else:
shutil.move(self.filepath, path)
except BaseException as ex:
self.report({'ERROR'}, tip_("Installing keymap failed: %s") % ex)
self.report({'ERROR'}, rpt_("Installing keymap failed: %s") % ex)
return {'CANCELLED'}
# sneaky way to check we're actually running the code.
@ -455,7 +455,7 @@ class PREFERENCES_OT_addon_enable(Operator):
if info_ver > bpy.app.version:
self.report(
{'WARNING'},
tip_("This script was written Blender "
rpt_("This script was written Blender "
"version %d.%d.%d and might not "
"function (correctly), "
"though it is enabled")
@ -543,7 +543,7 @@ class PREFERENCES_OT_theme_install(Operator):
if not self.overwrite:
if os.path.exists(path_dest):
self.report({'WARNING'}, tip_("File already installed to %r\n") % path_dest)
self.report({'WARNING'}, rpt_("File already installed to %r\n") % path_dest)
return {'CANCELLED'}
try:
@ -657,7 +657,7 @@ class PREFERENCES_OT_addon_install(Operator):
pyfile_dir = os.path.dirname(pyfile)
for addon_path in addon_utils.paths():
if os.path.samefile(pyfile_dir, addon_path):
self.report({'ERROR'}, tip_("Source file is in the add-on search path: %r") % addon_path)
self.report({'ERROR'}, rpt_("Source file is in the add-on search path: %r") % addon_path)
return {'CANCELLED'}
del addon_path
del pyfile_dir
@ -681,7 +681,7 @@ class PREFERENCES_OT_addon_install(Operator):
for f in file_to_extract_root:
path_dest = os.path.join(path_addons, os.path.basename(f))
if os.path.exists(path_dest):
self.report({'WARNING'}, tip_("File already installed to %r\n") % path_dest)
self.report({'WARNING'}, rpt_("File already installed to %r\n") % path_dest)
return {'CANCELLED'}
try: # extract the file to "addons"
@ -696,7 +696,7 @@ class PREFERENCES_OT_addon_install(Operator):
if self.overwrite:
_module_filesystem_remove(path_addons, os.path.basename(pyfile))
elif os.path.exists(path_dest):
self.report({'WARNING'}, tip_("File already installed to %r\n") % path_dest)
self.report({'WARNING'}, rpt_("File already installed to %r\n") % path_dest)
return {'CANCELLED'}
# if not compressed file just copy into the addon path
@ -731,7 +731,7 @@ class PREFERENCES_OT_addon_install(Operator):
# print message
msg = (
tip_("Modules Installed (%s) from %r into %r") %
rpt_("Modules Installed (%s) from %r into %r") %
(", ".join(sorted(addons_new)), pyfile, path_addons)
)
print(msg)
@ -776,7 +776,7 @@ class PREFERENCES_OT_addon_remove(Operator):
path, isdir = PREFERENCES_OT_addon_remove.path_from_addon(self.module)
if path is None:
self.report({'WARNING'}, tip_("Add-on path %r could not be found") % path)
self.report({'WARNING'}, rpt_("Add-on path %r could not be found") % path)
return {'CANCELLED'}
# in case its enabled
@ -926,7 +926,7 @@ class PREFERENCES_OT_app_template_install(Operator):
for f in file_to_extract_root:
path_dest = os.path.join(path_app_templates, os.path.basename(f))
if os.path.exists(path_dest):
self.report({'WARNING'}, tip_("File already installed to %r\n") % path_dest)
self.report({'WARNING'}, rpt_("File already installed to %r\n") % path_dest)
return {'CANCELLED'}
try: # extract the file to "bl_app_templates_user"
@ -937,7 +937,7 @@ class PREFERENCES_OT_app_template_install(Operator):
else:
# Only support installing zip-files.
self.report({'WARNING'}, tip_("Expected a zip-file %r\n") % filepath)
self.report({'WARNING'}, rpt_("Expected a zip-file %r\n") % filepath)
return {'CANCELLED'}
app_templates_new = set(os.listdir(path_app_templates)) - app_templates_old
@ -947,7 +947,7 @@ class PREFERENCES_OT_app_template_install(Operator):
# print message
msg = (
tip_("Template Installed (%s) from %r into %r") %
rpt_("Template Installed (%s) from %r into %r") %
(", ".join(sorted(app_templates_new)), filepath, path_app_templates)
)
print(msg)
@ -1011,7 +1011,7 @@ class PREFERENCES_OT_studiolight_install(Operator):
# print message
msg = (
tip_("StudioLight Installed %r into %r") %
rpt_("StudioLight Installed %r into %r") %
(", ".join(e.name for e in self.files), path_studiolights)
)
print(msg)
@ -1069,7 +1069,7 @@ class PREFERENCES_OT_studiolight_new(Operator):
# print message
msg = (
tip_("StudioLight Installed %r into %r") %
rpt_("StudioLight Installed %r into %r") %
(self.filename, str(path_studiolights))
)
print(msg)

View File

@ -23,6 +23,7 @@ from bpy.props import (
from bpy.app.translations import (
pgettext_iface as iface_,
pgettext_tip as tip_,
pgettext_rpt as rpt_,
contexts as i18n_contexts,
)
@ -778,7 +779,7 @@ class WM_OT_operator_pie_enum(Operator):
try:
op_rna = op.get_rna_type()
except KeyError:
self.report({'ERROR'}, tip_("Operator not found: bpy.ops.%s") % data_path)
self.report({'ERROR'}, rpt_("Operator not found: bpy.ops.%s") % data_path)
return {'CANCELLED'}
def draw_cb(self, context):
@ -878,7 +879,7 @@ class WM_OT_context_collection_boolean_set(Operator):
elif value_orig is False:
pass
else:
self.report({'WARNING'}, tip_("Non boolean value found: %s[ ].%s") %
self.report({'WARNING'}, rpt_("Non boolean value found: %s[ ].%s") %
(data_path_iter, data_path_item))
return {'CANCELLED'}
@ -981,7 +982,7 @@ class WM_OT_context_modal_mouse(Operator):
(item, ) = self._values.keys()
header_text = header_text % eval("item.%s" % self.data_path_item)
else:
header_text = (self.header_text % delta) + tip_(" (delta)")
header_text = (self.header_text % delta) + rpt_(" (delta)")
context.area.header_text_set(header_text)
elif 'LEFTMOUSE' == event_type:
@ -1001,7 +1002,7 @@ class WM_OT_context_modal_mouse(Operator):
self._values_store(context)
if not self._values:
self.report({'WARNING'}, tip_("Nothing to operate on: %s[ ].%s") %
self.report({'WARNING'}, rpt_("Nothing to operate on: %s[ ].%s") %
(self.data_path_iter, self.data_path_item))
return {'CANCELLED'}
@ -1168,7 +1169,7 @@ class WM_OT_path_open(Operator):
filepath = os.path.normpath(filepath)
if not os.path.exists(filepath):
self.report({'ERROR'}, tip_("File '%s' not found") % filepath)
self.report({'ERROR'}, rpt_("File '%s' not found") % filepath)
return {'CANCELLED'}
if sys.platform[:3] == "win":
@ -1239,7 +1240,7 @@ def _wm_doc_get_id(doc_id, *, do_url=True, url_prefix="", report=None):
if rna_class is None:
if report is not None:
report({'ERROR'}, tip_("Type \"%s\" can not be found") % class_name)
report({'ERROR'}, rpt_("Type \"%s\" can not be found") % class_name)
return None
# Detect if this is a inherited member and use that name instead.
@ -1334,7 +1335,7 @@ class WM_OT_doc_view_manual(Operator):
if url is None:
self.report(
{'WARNING'},
tip_("No reference available %r, "
rpt_("No reference available %r, "
"Update info in 'rna_manual_reference.py' "
"or callback to bpy.utils.manual_map()") %
self.doc_id
@ -2317,7 +2318,7 @@ class WM_OT_tool_set_by_id(Operator):
tool_settings.workspace_tool_type = 'FALLBACK'
return {'FINISHED'}
else:
self.report({'WARNING'}, tip_("Tool %r not found for space %r") % (self.name, space_type))
self.report({'WARNING'}, rpt_("Tool %r not found for space %r") % (self.name, space_type))
return {'CANCELLED'}
@ -3188,7 +3189,7 @@ class WM_OT_batch_rename(Operator):
change_len += 1
total_len += 1
self.report({'INFO'}, tip_("Renamed %d of %d %s") % (change_len, total_len, descr))
self.report({'INFO'}, rpt_("Renamed %d of %d %s") % (change_len, total_len, descr))
return {'FINISHED'}

View File

@ -8,7 +8,7 @@ from rna_prop_ui import PropertyPanel
from bpy.app.translations import (
pgettext_iface as iface_,
pgettext_tip as tip_,
pgettext_tip as rpt_,
)
@ -581,7 +581,7 @@ def draw_attribute_warnings(context, layout):
if not colliding_names:
return
layout.label(text=tip_("Name collisions: ") + ", ".join(set(colliding_names)),
layout.label(text=rpt_("Name collisions: ") + ", ".join(set(colliding_names)),
icon='ERROR', translate=False)

View File

@ -8,7 +8,7 @@ from bl_ui.utils import PresetPanel
from bpy.app.translations import (
contexts as i18n_contexts,
pgettext_tip as tip_,
pgettext_iface as iface_,
)
@ -75,10 +75,10 @@ class RENDER_PT_format(RenderOutputButtonsPanel, Panel):
custom_framerate = (fps_rate not in {23.98, 24, 25, 29.97, 30, 50, 59.94, 60, 120, 240})
if custom_framerate is True:
fps_label_text = tip_("Custom (%.4g fps)") % fps_rate
fps_label_text = iface_("Custom (%.4g fps)") % fps_rate
show_framerate = True
else:
fps_label_text = tip_("%.4g fps") % fps_rate
fps_label_text = iface_("%.4g fps") % fps_rate
show_framerate = (preset_label == "Custom")
RENDER_PT_format._frame_rate_args_prev = args

View File

@ -8,6 +8,7 @@ from rna_prop_ui import PropertyPanel
from bpy.app.translations import (
contexts as i18n_contexts,
pgettext_iface as iface_,
pgettext_rpt as rpt_,
)
from bl_ui.utils import PresetPanel
@ -221,7 +222,7 @@ class PARTICLE_PT_context_particles(ParticleButtonsPanel, Panel):
row.template_ID(psys, "settings", new="particle.new")
if part.is_fluid:
layout.label(text=iface_("%d fluid particles for this frame") % part.count, translate=False)
layout.label(text=rpt_("%d fluid particles for this frame") % part.count, translate=False)
return
row = layout.row()
@ -432,10 +433,10 @@ class PARTICLE_PT_hair_dynamics(ParticleButtonsPanel, Panel):
label = "ERROR"
icon = 'ERROR'
box.label(text=label, icon=icon)
box.label(text=iface_("Iterations: %d .. %d (avg. %d)") %
box.label(text=rpt_("Iterations: %d .. %d (avg. %d)") %
(result.min_iterations, result.max_iterations, result.avg_iterations),
translate=False)
box.label(text=iface_("Error: %.5f .. %.5f (avg. %.5f)")
box.label(text=rpt_("Error: %.5f .. %.5f (avg. %.5f)")
% (result.min_error, result.max_error, result.avg_error),
translate=False)

View File

@ -10,6 +10,7 @@ from bl_ui.space_view3d import (
VIEW3D_PT_shading_options,
)
from bl_ui.utils import PresetPanel
from bpy.app.translations import pgettext_rpt as rpt_
class RenderButtonsPanel:
@ -829,7 +830,7 @@ class RENDER_PT_eevee_indirect_lighting(RenderButtonsPanel, Panel):
cache_info = scene.eevee.gi_cache_info
if cache_info:
col.label(text=cache_info)
col.label(text=rpt_(cache_info), translate=False)
col.prop(props, "gi_auto_bake")

View File

@ -6,6 +6,7 @@ import bpy
from bpy.types import Panel, Header, Menu, UIList
from bpy.app.translations import (
pgettext_iface as iface_,
pgettext_rpt as rpt_,
contexts as i18n_contexts,
)
from bl_ui.utils import PresetPanel
@ -170,7 +171,7 @@ class CLIP_HT_header(Header):
r = active_object.reconstruction
if r.is_valid and sc.view == 'CLIP':
layout.label(text=iface_("Solve error: %.2f px") %
layout.label(text=rpt_("Solve error: %.2f px") %
(r.average_error),
translate=False)
@ -769,7 +770,7 @@ class CLIP_PT_track(CLIP_PT_tracking_panel, Panel):
layout.prop(act_track, "weight_stab")
if act_track.has_bundle:
label_text = iface_("Average Error: %.2f px") % (act_track.average_error)
label_text = rpt_("Average Error: %.2f px") % (act_track.average_error)
layout.label(text=label_text, translate=False)
layout.use_property_split = False

View File

@ -11,6 +11,7 @@ from bpy.types import (
from bpy.app.translations import (
contexts as i18n_contexts,
pgettext_iface as iface_,
pgettext_rpt as rpt_,
)
from bl_ui.properties_grease_pencil_common import (
AnnotationDataPanel,
@ -1905,7 +1906,7 @@ class SEQUENCER_PT_mask(SequencerButtonsPanel, Panel):
if mask:
sta = mask.frame_start
end = mask.frame_end
layout.label(text=iface_("Original frame range: %d-%d (%d)") % (sta, end, end - sta + 1), translate=False)
layout.label(text=rpt_("Original frame range: %d-%d (%d)") % (sta, end, end - sta + 1), translate=False)
class SEQUENCER_PT_time(SequencerButtonsPanel, Panel):

View File

@ -11,7 +11,7 @@ from bpy.types import (
from bpy.app.translations import (
contexts as i18n_contexts,
pgettext_iface as iface_,
pgettext_tip as tip_,
pgettext_rpt as rpt_,
)
from bl_ui.utils import PresetPanel
@ -260,6 +260,7 @@ class USERPREF_PT_interface_translation(InterfacePanel, CenterAlignMixIn, Panel)
col.active = (bpy.app.translations.locale != "en_US")
col.prop(view, "use_translate_tooltips", text="Tooltips")
col.prop(view, "use_translate_interface", text="Interface")
col.prop(view, "use_translate_reports", text="Reports")
col.prop(view, "use_translate_new_dataname", text="New Data")
@ -2239,11 +2240,11 @@ class USERPREF_PT_addons(AddOnPanel, Panel):
if info["description"]:
split = colsub.row().split(factor=0.15)
split.label(text="Description:")
split.label(text=tip_(info["description"]))
split.label(text=iface_(info["description"]))
if info["location"]:
split = colsub.row().split(factor=0.15)
split.label(text="Location:")
split.label(text=tip_(info["location"]))
split.label(text=iface_(info["location"]))
if mod:
split = colsub.row().split(factor=0.15)
split.label(text="File:")
@ -2259,7 +2260,7 @@ class USERPREF_PT_addons(AddOnPanel, Panel):
if info["warning"]:
split = colsub.row().split(factor=0.15)
split.label(text="Warning:")
split.label(text=" " + info["warning"], icon='ERROR')
split.label(text=" " + iface_(info["warning"]), icon='ERROR')
user_addon = USERPREF_PT_addons.is_user_addon(mod, user_addon_paths)
if info["doc_url"] or info.get("tracker_url"):
@ -2370,7 +2371,7 @@ class StudioLightPanelMixin:
layout.label(text=self.get_error_message())
def get_error_message(self):
return tip_("No custom %s configured") % self.bl_label
return rpt_("No custom %s configured") % self.bl_label
def draw_studio_light(self, layout, studio_light):
box = layout.box()
@ -2398,7 +2399,7 @@ class USERPREF_PT_studiolight_matcaps(StudioLightPanel, StudioLightPanelMixin, P
layout.separator()
def get_error_message(self):
return tip_("No custom MatCaps configured")
return rpt_("No custom MatCaps configured")
class USERPREF_PT_studiolight_world(StudioLightPanel, StudioLightPanelMixin, Panel):
@ -2411,7 +2412,7 @@ class USERPREF_PT_studiolight_world(StudioLightPanel, StudioLightPanelMixin, Pan
layout.separator()
def get_error_message(self):
return tip_("No custom HDRIs configured")
return rpt_("No custom HDRIs configured")
class USERPREF_PT_studiolight_lights(StudioLightPanel, StudioLightPanelMixin, Panel):
@ -2426,7 +2427,7 @@ class USERPREF_PT_studiolight_lights(StudioLightPanel, StudioLightPanelMixin, Pa
layout.separator()
def get_error_message(self):
return tip_("No custom Studio Lights configured")
return rpt_("No custom Studio Lights configured")
class USERPREF_PT_studiolight_light_editor(StudioLightPanel, Panel):

View File

@ -24,7 +24,7 @@ from bl_ui.space_toolsystem_common import (
)
from bpy.app.translations import (
pgettext_iface as iface_,
pgettext_tip as tip_,
pgettext_rpt as rpt_,
contexts as i18n_contexts,
)
@ -2861,16 +2861,16 @@ class VIEW3D_MT_object_context_menu(Menu):
props.data_path_item = "data.lens"
props.input_scale = 0.1
if obj.data.lens_unit == 'MILLIMETERS':
props.header_text = tip_("Camera Focal Length: %.1fmm")
props.header_text = rpt_("Camera Focal Length: %.1fmm")
else:
props.header_text = tip_("Camera Focal Length: %.1f\u00B0")
props.header_text = rpt_("Camera Focal Length: %.1f\u00B0")
else:
props = layout.operator("wm.context_modal_mouse", text="Camera Lens Scale")
props.data_path_iter = "selected_editable_objects"
props.data_path_item = "data.ortho_scale"
props.input_scale = 0.01
props.header_text = tip_("Camera Lens Scale: %.3f")
props.header_text = rpt_("Camera Lens Scale: %.3f")
if not obj.data.dof.focus_object:
if view and view.camera == obj and view.region_3d.view_perspective == 'CAMERA':
@ -2880,7 +2880,7 @@ class VIEW3D_MT_object_context_menu(Menu):
props.data_path_iter = "selected_editable_objects"
props.data_path_item = "data.dof.focus_distance"
props.input_scale = 0.02
props.header_text = tip_("Focus Distance: %.3f")
props.header_text = rpt_("Focus Distance: %.3f")
layout.separator()
@ -2891,13 +2891,13 @@ class VIEW3D_MT_object_context_menu(Menu):
props.data_path_iter = "selected_editable_objects"
props.data_path_item = "data.extrude"
props.input_scale = 0.01
props.header_text = tip_("Extrude: %.3f")
props.header_text = rpt_("Extrude: %.3f")
props = layout.operator("wm.context_modal_mouse", text="Adjust Offset")
props.data_path_iter = "selected_editable_objects"
props.data_path_item = "data.offset"
props.input_scale = 0.01
props.header_text = tip_("Offset: %.3f")
props.header_text = rpt_("Offset: %.3f")
layout.separator()
@ -2908,7 +2908,7 @@ class VIEW3D_MT_object_context_menu(Menu):
props.data_path_iter = "selected_editable_objects"
props.data_path_item = "empty_display_size"
props.input_scale = 0.01
props.header_text = tip_("Empty Display Size: %.3f")
props.header_text = rpt_("Empty Display Size: %.3f")
layout.separator()
@ -2926,36 +2926,36 @@ class VIEW3D_MT_object_context_menu(Menu):
props.data_path_iter = "selected_editable_objects"
props.data_path_item = "data.energy"
props.input_scale = 1.0
props.header_text = tip_("Light Power: %.3f")
props.header_text = rpt_("Light Power: %.3f")
if light.type == 'AREA':
if light.shape in {'RECTANGLE', 'ELLIPSE'}:
props = layout.operator("wm.context_modal_mouse", text="Adjust Area Light X Size")
props.data_path_iter = "selected_editable_objects"
props.data_path_item = "data.size"
props.header_text = tip_("Light Size X: %.3f")
props.header_text = rpt_("Light Size X: %.3f")
props = layout.operator("wm.context_modal_mouse", text="Adjust Area Light Y Size")
props.data_path_iter = "selected_editable_objects"
props.data_path_item = "data.size_y"
props.header_text = tip_("Light Size Y: %.3f")
props.header_text = rpt_("Light Size Y: %.3f")
else:
props = layout.operator("wm.context_modal_mouse", text="Adjust Area Light Size")
props.data_path_iter = "selected_editable_objects"
props.data_path_item = "data.size"
props.header_text = tip_("Light Size: %.3f")
props.header_text = rpt_("Light Size: %.3f")
elif light.type in {'SPOT', 'POINT'}:
props = layout.operator("wm.context_modal_mouse", text="Adjust Light Radius")
props.data_path_iter = "selected_editable_objects"
props.data_path_item = "data.shadow_soft_size"
props.header_text = tip_("Light Radius: %.3f")
props.header_text = rpt_("Light Radius: %.3f")
elif light.type == 'SUN':
props = layout.operator("wm.context_modal_mouse", text="Adjust Sun Light Angle")
props.data_path_iter = "selected_editable_objects"
props.data_path_item = "data.angle"
props.header_text = tip_("Light Angle: %.3f")
props.header_text = rpt_("Light Angle: %.3f")
if light.type == 'SPOT':
layout.separator()
@ -2964,13 +2964,13 @@ class VIEW3D_MT_object_context_menu(Menu):
props.data_path_iter = "selected_editable_objects"
props.data_path_item = "data.spot_size"
props.input_scale = 0.01
props.header_text = tip_("Spot Size: %.2f")
props.header_text = rpt_("Spot Size: %.2f")
props = layout.operator("wm.context_modal_mouse", text="Adjust Spot Light Blend")
props.data_path_iter = "selected_editable_objects"
props.data_path_item = "data.spot_blend"
props.input_scale = -0.01
props.header_text = tip_("Spot Blend: %.2f")
props.header_text = rpt_("Spot Blend: %.2f")
layout.separator()

View File

@ -375,7 +375,7 @@ bool insert_keyframe_direct(ReportList *reports,
PointerRNA tmp_ptr;
if (RNA_path_resolve_property(&ptr, fcu->rna_path, &tmp_ptr, &prop) == false) {
const char *idname = (ptr.owner_id) ? ptr.owner_id->name : TIP_("<No ID pointer>");
const char *idname = (ptr.owner_id) ? ptr.owner_id->name : RPT_("<No ID pointer>");
BKE_reportf(reports,
RPT_ERROR,
@ -529,7 +529,7 @@ int insert_keyframe(Main *bmain,
reports,
RPT_ERROR,
"Could not insert keyframe, as RNA path is invalid for the given ID (ID = %s, path = %s)",
(id) ? id->name : TIP_("<Missing ID block>"),
(id) ? id->name : RPT_("<Missing ID block>"),
rna_path);
return 0;
}

View File

@ -137,7 +137,7 @@ bMotionPath *animviz_verify_motionpaths(ReportList *reports,
(pchan) ? pchan->name : ob->id.name,
avs->path_sf,
avs->path_ef,
(avs->path_sf == avs->path_ef) ? TIP_(", cannot have single-frame paths") : "");
(avs->path_sf == avs->path_ef) ? RPT_(", cannot have single-frame paths") : "");
return nullptr;
}

View File

@ -4761,16 +4761,16 @@ bool BKE_nurb_valid_message(const int pnts,
message_dst[0] = 0;
return false;
}
msg_template = TIP_("At least two points required");
msg_template = RPT_("At least two points required");
break;
case NURBSValidationStatus::MorePointsThanOrderRequired:
msg_template = TIP_("Must have more control points than Order");
msg_template = RPT_("Must have more control points than Order");
break;
case NURBSValidationStatus::MoreRowsForBezierRequired:
msg_template = TIP_("%d more %s row(s) needed for Bezier");
msg_template = RPT_("%d more %s row(s) needed for Bezier");
break;
case NURBSValidationStatus::MorePointsForBezierRequired:
msg_template = TIP_("%d more point(s) needed for Bezier");
msg_template = RPT_("%d more point(s) needed for Bezier");
break;
}

View File

@ -542,7 +542,7 @@ void BKE_gpencil_modifier_set_error(GpencilModifierData *md, const char *format,
{
char buffer[512];
va_list ap;
const char *format_tip = TIP_(format);
const char *format_tip = RPT_(format);
va_start(ap, format);
vsnprintf(buffer, sizeof(buffer), format_tip, ap);

View File

@ -419,7 +419,7 @@ void BKE_modifier_set_error(const Object *ob, ModifierData *md, const char *_for
{
char buffer[512];
va_list ap;
const char *format = TIP_(_format);
const char *format = RPT_(_format);
va_start(ap, _format);
vsnprintf(buffer, sizeof(buffer), format, ap);
@ -446,7 +446,7 @@ void BKE_modifier_set_warning(const Object *ob, ModifierData *md, const char *_f
{
char buffer[512];
va_list ap;
const char *format = TIP_(_format);
const char *format = RPT_(_format);
va_start(ap, _format);
vsnprintf(buffer, sizeof(buffer), format, ap);
@ -1263,7 +1263,7 @@ void BKE_modifier_blend_read_data(BlendDataReader *reader, ListBase *lb, Object
BLO_reportf_wrap(
BLO_read_data_reports(reader),
RPT_WARNING,
TIP_("Possible data loss when saving this file! %s modifier is deprecated (Object: %s)"),
RPT_("Possible data loss when saving this file! %s modifier is deprecated (Object: %s)"),
md->name,
ob->id.name + 2);
md = modifier_replace_with_fluid(reader, ob, lb, md);
@ -1273,7 +1273,7 @@ void BKE_modifier_blend_read_data(BlendDataReader *reader, ListBase *lb, Object
BLO_reportf_wrap(
BLO_read_data_reports(reader),
RPT_WARNING,
TIP_("Possible data loss when saving this file! %s modifier is deprecated (Object: %s)"),
RPT_("Possible data loss when saving this file! %s modifier is deprecated (Object: %s)"),
md->name,
ob->id.name + 2);
md = modifier_replace_with_fluid(reader, ob, lb, md);

View File

@ -915,12 +915,12 @@ static void object_blend_read_after_liblink(BlendLibReader *reader, ID *id)
if (ob->id.lib) {
BLO_reportf_wrap(reports,
RPT_INFO,
TIP_("Can't find object data of %s lib %s"),
RPT_("Can't find object data of %s lib %s"),
ob->id.name + 2,
ob->id.lib->filepath);
}
else {
BLO_reportf_wrap(reports, RPT_INFO, TIP_("Object %s lost data"), ob->id.name + 2);
BLO_reportf_wrap(reports, RPT_INFO, RPT_("Object %s lost data"), ob->id.name + 2);
}
reports->count.missing_obdata++;
}

View File

@ -3691,13 +3691,13 @@ void BKE_ptcache_update_info(PTCacheID *pid)
/* smoke doesn't use frame 0 as info frame so can't check based on totpoint */
if (pid->type == PTCACHE_TYPE_SMOKE_DOMAIN && totframes) {
SNPRINTF(cache->info, TIP_("%i frames found!"), totframes);
SNPRINTF(cache->info, RPT_("%i frames found!"), totframes);
}
else if (totframes && cache->totpoint) {
SNPRINTF(cache->info, TIP_("%i points found!"), cache->totpoint);
SNPRINTF(cache->info, RPT_("%i points found!"), cache->totpoint);
}
else {
STRNCPY(cache->info, TIP_("No valid data to read!"));
STRNCPY(cache->info, RPT_("No valid data to read!"));
}
return;
}
@ -3707,10 +3707,10 @@ void BKE_ptcache_update_info(PTCacheID *pid)
int totpoint = pid->totpoint(pid->calldata, 0);
if (cache->totpoint > totpoint) {
SNPRINTF(mem_info, TIP_("%i cells + High Resolution cached"), totpoint);
SNPRINTF(mem_info, RPT_("%i cells + High Resolution cached"), totpoint);
}
else {
SNPRINTF(mem_info, TIP_("%i cells cached"), totpoint);
SNPRINTF(mem_info, RPT_("%i cells cached"), totpoint);
}
}
else {
@ -3722,7 +3722,7 @@ void BKE_ptcache_update_info(PTCacheID *pid)
}
}
SNPRINTF(mem_info, TIP_("%i frames on disk"), totframes);
SNPRINTF(mem_info, RPT_("%i frames on disk"), totframes);
}
}
else {
@ -3750,14 +3750,14 @@ void BKE_ptcache_update_info(PTCacheID *pid)
BLI_str_format_int_grouped(formatted_tot, totframes);
BLI_str_format_byte_unit(formatted_mem, bytes, false);
SNPRINTF(mem_info, TIP_("%s frames in memory (%s)"), formatted_tot, formatted_mem);
SNPRINTF(mem_info, RPT_("%s frames in memory (%s)"), formatted_tot, formatted_mem);
}
if (cache->flag & PTCACHE_OUTDATED) {
SNPRINTF(cache->info, TIP_("%s, cache is outdated!"), mem_info);
SNPRINTF(cache->info, RPT_("%s, cache is outdated!"), mem_info);
}
else if (cache->flag & PTCACHE_FRAMES_SKIPPED) {
SNPRINTF(cache->info, TIP_("%s, not exact since frame %i"), mem_info, cache->last_exact);
SNPRINTF(cache->info, RPT_("%s, not exact since frame %i"), mem_info, cache->last_exact);
}
else {
SNPRINTF(cache->info, "%s.", mem_info);

View File

@ -29,25 +29,25 @@ const char *BKE_report_type_str(eReportType type)
{
switch (type) {
case RPT_DEBUG:
return TIP_("Debug");
return RPT_("Debug");
case RPT_INFO:
return TIP_("Info");
return RPT_("Info");
case RPT_OPERATOR:
return TIP_("Operator");
return RPT_("Operator");
case RPT_PROPERTY:
return TIP_("Property");
return RPT_("Property");
case RPT_WARNING:
return TIP_("Warning");
return RPT_("Warning");
case RPT_ERROR:
return TIP_("Error");
return RPT_("Error");
case RPT_ERROR_INVALID_INPUT:
return TIP_("Invalid Input Error");
return RPT_("Invalid Input Error");
case RPT_ERROR_INVALID_CONTEXT:
return TIP_("Invalid Context Error");
return RPT_("Invalid Context Error");
case RPT_ERROR_OUT_OF_MEMORY:
return TIP_("Out Of Memory Error");
return RPT_("Out Of Memory Error");
default:
return TIP_("Undefined Type");
return RPT_("Undefined Type");
}
}
@ -126,7 +126,7 @@ void BKE_report(ReportList *reports, eReportType type, const char *_message)
{
Report *report;
int len;
const char *message = TIP_(_message);
const char *message = RPT_(_message);
if (BKE_reports_print_test(reports, type)) {
printf("%s: %s\n", BKE_report_type_str(type), message);
@ -154,7 +154,7 @@ void BKE_reportf(ReportList *reports, eReportType type, const char *_format, ...
{
Report *report;
va_list args;
const char *format = TIP_(_format);
const char *format = RPT_(_format);
if (BKE_reports_print_test(reports, type)) {
printf("%s: ", BKE_report_type_str(type));
@ -207,7 +207,7 @@ void BKE_reports_prepend(ReportList *reports, const char *prepend)
if (!reports || !reports->list.first) {
return;
}
reports_prepend_impl(reports, TIP_(prepend));
reports_prepend_impl(reports, RPT_(prepend));
}
void BKE_reports_prependf(ReportList *reports, const char *prepend_format, ...)
@ -217,7 +217,7 @@ void BKE_reports_prependf(ReportList *reports, const char *prepend_format, ...)
}
va_list args;
va_start(args, prepend_format);
char *prepend = BLI_vsprintfN(TIP_(prepend_format), args);
char *prepend = BLI_vsprintfN(RPT_(prepend_format), args);
va_end(args);
reports_prepend_impl(reports, prepend);

View File

@ -1543,7 +1543,7 @@ static void scene_blend_read_after_liblink(BlendLibReader *reader, ID *id)
if (base_legacy->object == nullptr) {
BLO_reportf_wrap(BLO_read_lib_reports(reader),
RPT_WARNING,
TIP_("LIB: object lost from scene: '%s'"),
RPT_("LIB: object lost from scene: '%s'"),
sce->id.name + 2);
BLI_remlink(&sce->base, base_legacy);
if (base_legacy == sce->basact) {

View File

@ -1113,7 +1113,7 @@ static bool is_minversion_older_than_blender(FileData *fd, ReportList *reports)
}
BKE_reportf(reports,
RPT_ERROR,
TIP_("The file was saved by a newer version, open it with Blender %s or later"),
"The file was saved by a newer version, open it with Blender %s or later",
min_reader_ver_str);
CLOG_WARN(&LOG,
"%s: File saved by a newer version of Blender (%s), Blender %s or later is "
@ -1172,7 +1172,7 @@ static FileData *blo_filedata_from_file_descriptor(const char *filepath,
RPT_WARNING,
"Unable to read '%s': %s",
filepath,
errno ? strerror(errno) : TIP_("insufficient content"));
errno ? strerror(errno) : RPT_("insufficient content"));
if (rawfile) {
rawfile->close(rawfile);
}
@ -1232,7 +1232,7 @@ static FileData *blo_filedata_from_file_open(const char *filepath, BlendFileRead
RPT_WARNING,
"Unable to open '%s': %s",
filepath,
errno ? strerror(errno) : TIP_("unknown error reading file"));
errno ? strerror(errno) : RPT_("unknown error reading file"));
return nullptr;
}
return blo_filedata_from_file_descriptor(filepath, reports, file);
@ -1272,7 +1272,7 @@ FileData *blo_filedata_from_memory(const void *mem, int memsize, BlendFileReadRe
{
if (!mem || memsize < SIZEOFBLENDERHEADER) {
BKE_report(
reports->reports, RPT_WARNING, (mem) ? TIP_("Unable to read") : TIP_("Unable to open"));
reports->reports, RPT_WARNING, (mem) ? RPT_("Unable to read") : RPT_("Unable to open"));
return nullptr;
}
@ -2275,7 +2275,7 @@ static void direct_link_library(FileData *fd, Library *lib, Main *main)
if (BLI_path_cmp(newmain->curlib->filepath_abs, lib->filepath_abs) == 0) {
BLO_reportf_wrap(fd->reports,
RPT_WARNING,
TIP_("Library '%s', '%s' had multiple instances, save and reload!"),
RPT_("Library '%s', '%s' had multiple instances, save and reload!"),
lib->filepath,
lib->filepath_abs);
@ -4032,7 +4032,7 @@ static void expand_doit_library(void *fdhandle, Main *mainvar, void *old)
BLO_reportf_wrap(fd->reports,
RPT_WARNING,
TIP_("LIB: Data refers to main .blend file: '%s' from %s"),
RPT_("LIB: Data refers to main .blend file: '%s' from %s"),
idname,
mainvar->curlib->filepath_abs);
return;
@ -4546,7 +4546,7 @@ static void read_library_linked_id(
if (!is_valid) {
BLO_reportf_wrap(basefd->reports,
RPT_ERROR,
TIP_("LIB: %s: '%s' is directly linked from '%s' (parent '%s'), but is a "
RPT_("LIB: %s: '%s' is directly linked from '%s' (parent '%s'), but is a "
"non-linkable data type"),
BKE_idtype_idcode_to_name(GS(id->name)),
id->name + 2,
@ -4565,7 +4565,7 @@ static void read_library_linked_id(
else {
BLO_reportf_wrap(basefd->reports,
RPT_INFO,
TIP_("LIB: %s: '%s' missing from '%s', parent '%s'"),
RPT_("LIB: %s: '%s' missing from '%s', parent '%s'"),
BKE_idtype_idcode_to_name(GS(id->name)),
id->name + 2,
mainvar->curlib->filepath_abs,
@ -4679,7 +4679,7 @@ static FileData *read_library_file_data(FileData *basefd,
BLO_reportf_wrap(basefd->reports,
RPT_INFO,
TIP_("Read packed library: '%s', parent '%s'"),
RPT_("Read packed library: '%s', parent '%s'"),
mainptr->curlib->filepath,
library_parent_filepath(mainptr->curlib));
fd = blo_filedata_from_memory(pf->data, pf->size, basefd->reports);
@ -4691,7 +4691,7 @@ static FileData *read_library_file_data(FileData *basefd,
/* Read file on disk. */
BLO_reportf_wrap(basefd->reports,
RPT_INFO,
TIP_("Read library: '%s', '%s', parent '%s'"),
RPT_("Read library: '%s', '%s', parent '%s'"),
mainptr->curlib->filepath_abs,
mainptr->curlib->filepath,
library_parent_filepath(mainptr->curlib));
@ -4732,7 +4732,7 @@ static FileData *read_library_file_data(FileData *basefd,
if (fd == nullptr) {
BLO_reportf_wrap(
basefd->reports, RPT_INFO, TIP_("Cannot find lib '%s'"), mainptr->curlib->filepath_abs);
basefd->reports, RPT_INFO, RPT_("Cannot find lib '%s'"), mainptr->curlib->filepath_abs);
basefd->reports->count.missing_libraries++;
}

View File

@ -2961,7 +2961,7 @@ void do_versions_after_linking_280(FileData *fd, Main *bmain)
if (ob->type != OB_EMPTY && ob->instance_collection != nullptr) {
BLO_reportf_wrap(fd->reports,
RPT_INFO,
TIP_("Non-Empty object '%s' cannot duplicate collection '%s' "
RPT_("Non-Empty object '%s' cannot duplicate collection '%s' "
"anymore in Blender 2.80 and later, removed instancing"),
ob->id.name + 2,
ob->instance_collection->id.name + 2);

View File

@ -393,14 +393,14 @@ void do_versions_after_linking_400(FileData *fd, Main *bmain)
if (ob->id.lib) {
BLO_reportf_wrap(fd->reports,
RPT_INFO,
TIP_("Proxy lost from object %s lib %s\n"),
RPT_("Proxy lost from object %s lib %s\n"),
ob->id.name + 2,
ob->id.lib->filepath);
}
else {
BLO_reportf_wrap(fd->reports,
RPT_INFO,
TIP_("Proxy lost from object %s lib <NONE>\n"),
RPT_("Proxy lost from object %s lib <NONE>\n"),
ob->id.name + 2);
}
fd->reports->count.missing_obproxies++;

View File

@ -494,8 +494,8 @@ void blo_do_versions_userdef(UserDef *userdef)
USER_FLAG_UNUSED_6 | USER_FLAG_UNUSED_7 | USER_FLAG_UNUSED_9 |
USER_DEVELOPER_UI);
userdef->uiflag &= ~(USER_HEADER_BOTTOM);
userdef->transopts &= ~(USER_TR_UNUSED_2 | USER_TR_UNUSED_3 | USER_TR_UNUSED_4 |
USER_TR_UNUSED_6 | USER_TR_UNUSED_7);
userdef->transopts &= ~(USER_TR_UNUSED_3 | USER_TR_UNUSED_4 | USER_TR_UNUSED_6 |
USER_TR_UNUSED_7);
userdef->uiflag |= USER_LOCK_CURSOR_ADJUST;
}

View File

@ -19,14 +19,21 @@ extern "C" {
bool BLT_is_default_context(const char *msgctxt);
const char *BLT_pgettext(const char *msgctxt, const char *msgid);
/* translation */
/* Translation */
/* - iface includes buttons in the user interface: short labels displayed in windows, panels,
* menus.
* - tooltips only include the popup tooltips when hovering a button.
* - report is for longer, additional information displayed in the UI, such as error messages.
* - new_dataname is the actual user-created data such as objects, meshes, etc. */
bool BLT_translate(void);
bool BLT_translate_iface(void);
bool BLT_translate_tooltips(void);
bool BLT_translate_reports(void);
bool BLT_translate_new_dataname(void);
const char *BLT_translate_do(const char *msgctxt, const char *msgid);
const char *BLT_translate_do_iface(const char *msgctxt, const char *msgid);
const char *BLT_translate_do_tooltip(const char *msgctxt, const char *msgid);
const char *BLT_translate_do_report(const char *msgctxt, const char *msgid);
const char *BLT_translate_do_new_dataname(const char *msgctxt, const char *msgid);
/* The "translation-marker" macro. */
@ -37,9 +44,11 @@ const char *BLT_translate_do_new_dataname(const char *msgctxt, const char *msgid
/*# define _(msgid) BLT_gettext(msgid) */
#define IFACE_(msgid) BLT_translate_do_iface(NULL, msgid)
#define TIP_(msgid) BLT_translate_do_tooltip(NULL, msgid)
#define RPT_(msgid) BLT_translate_do_report(NULL, msgid)
#define DATA_(msgid) BLT_translate_do_new_dataname(NULL, msgid)
#define CTX_IFACE_(context, msgid) BLT_translate_do_iface(context, msgid)
#define CTX_TIP_(context, msgid) BLT_translate_do_tooltip(context, msgid)
#define CTX_RPT_(context, msgid) BLT_translate_do_report(context, msgid)
#define CTX_DATA_(context, msgid) BLT_translate_do_new_dataname(context, msgid)
/* Helper macro, when we want to define a same msgid for multiple msgctxt...

View File

@ -90,6 +90,15 @@ bool BLT_translate_tooltips()
#endif
}
bool BLT_translate_reports()
{
#ifdef WITH_INTERNATIONAL
return BLT_translate() && (U.transopts & USER_TR_REPORTS);
#else
return false;
#endif
}
bool BLT_translate_new_dataname()
{
#ifdef WITH_INTERNATIONAL
@ -144,6 +153,21 @@ const char *BLT_translate_do_tooltip(const char *msgctxt, const char *msgid)
#endif
}
const char *BLT_translate_do_report(const char *msgctxt, const char *msgid)
{
#ifdef WITH_INTERNATIONAL
if (BLT_translate_reports()) {
return BLT_pgettext(msgctxt, msgid);
}
return msgid;
#else
(void)msgctxt;
return msgid;
#endif
}
const char *BLT_translate_do_new_dataname(const char *msgctxt, const char *msgid)
{
#ifdef WITH_INTERNATIONAL

View File

@ -421,7 +421,7 @@ void ExecutionGroup::finalize_chunk_execution(int chunk_number, MemoryBuffer **m
bTree_->runtime->progress(bTree_->runtime->prh, progress);
char buf[128];
SNPRINTF(buf, TIP_("Compositing | Tile %u-%u"), chunks_finished_, chunks_len_);
SNPRINTF(buf, RPT_("Compositing | Tile %u-%u"), chunks_finished_, chunks_len_);
bTree_->runtime->stats_draw(bTree_->runtime->sdh, buf);
}
}

View File

@ -36,7 +36,7 @@ void FullFrameExecutionModel::execute(ExecutionSystem &exec_system)
{
const bNodeTree *node_tree = this->context_.get_bnodetree();
node_tree->runtime->stats_draw(node_tree->runtime->sdh,
TIP_("Compositing | Initializing execution"));
RPT_("Compositing | Initializing execution"));
DebugInfo::graphviz(&exec_system, "compositor_prior_rendering");
@ -281,7 +281,7 @@ void FullFrameExecutionModel::update_progress_bar()
char buf[128];
SNPRINTF(buf,
TIP_("Compositing | Operation %i-%li"),
RPT_("Compositing | Operation %i-%li"),
num_operations_finished_ + 1,
operations_.size());
tree->runtime->stats_draw(tree->runtime->sdh, buf);

View File

@ -23,7 +23,7 @@ TiledExecutionModel::TiledExecutionModel(CompositorContext &context,
{
const bNodeTree *node_tree = context.get_bnodetree();
node_tree->runtime->stats_draw(node_tree->runtime->sdh,
TIP_("Compositing | Determining resolution"));
RPT_("Compositing | Determining resolution"));
uint resolution[2];
for (ExecutionGroup *group : groups_) {
@ -103,7 +103,7 @@ void TiledExecutionModel::execute(ExecutionSystem &exec_system)
const bNodeTree *editingtree = this->context_.get_bnodetree();
editingtree->runtime->stats_draw(editingtree->runtime->sdh,
TIP_("Compositing | Initializing execution"));
RPT_("Compositing | Initializing execution"));
update_read_buffer_offset(operations_);
@ -122,7 +122,7 @@ void TiledExecutionModel::execute(ExecutionSystem &exec_system)
WorkScheduler::stop();
editingtree->runtime->stats_draw(editingtree->runtime->sdh,
TIP_("Compositing | De-initializing execution"));
RPT_("Compositing | De-initializing execution"));
for (NodeOperation *operation : operations_) {
operation->deinit_execution();

View File

@ -183,11 +183,11 @@ static void eevee_cache_finish(void *vedata)
}
if (g_data->queued_shaders_count > 0) {
SNPRINTF(ved->info, TIP_("Compiling Shaders (%d remaining)"), g_data->queued_shaders_count);
SNPRINTF(ved->info, RPT_("Compiling Shaders (%d remaining)"), g_data->queued_shaders_count);
}
else if (g_data->queued_optimise_shaders_count > 0) {
SNPRINTF(ved->info,
TIP_("Optimizing Shaders (%d remaining)"),
RPT_("Optimizing Shaders (%d remaining)"),
g_data->queued_optimise_shaders_count);
}
}

View File

@ -225,31 +225,31 @@ void EEVEE_lightcache_info_update(SceneEEVEE *eevee)
if (lcache != nullptr) {
if (!eevee_lightcache_version_check(lcache)) {
BLI_strncpy(eevee->light_cache_info,
TIP_("Incompatible Light cache version, please bake again"),
N_("Incompatible Light cache version, please bake again"),
sizeof(eevee->light_cache_info));
return;
}
if (lcache->cube_tx.tex_size[2] > GPU_max_texture_layers()) {
STRNCPY(eevee->light_cache_info,
TIP_("Error: Light cache is too big for the GPU to be loaded"));
N_("Error: Light cache is too big for the GPU to be loaded"));
return;
}
if (lcache->flag & LIGHTCACHE_INVALID) {
STRNCPY(eevee->light_cache_info,
TIP_("Error: Light cache dimensions not supported by the GPU"));
N_("Error: Light cache dimensions not supported by the GPU"));
return;
}
if (lcache->flag & LIGHTCACHE_BAKING) {
STRNCPY(eevee->light_cache_info, TIP_("Baking light cache"));
STRNCPY(eevee->light_cache_info, N_("Baking light cache"));
return;
}
if (!eevee_lightcache_can_be_saved(lcache)) {
STRNCPY(eevee->light_cache_info,
TIP_("Error: LightCache is too large and will not be saved to disk"));
N_("Error: LightCache is too large and will not be saved to disk"));
return;
}
@ -258,14 +258,16 @@ void EEVEE_lightcache_info_update(SceneEEVEE *eevee)
int irr_samples = eevee_lightcache_irradiance_sample_count(lcache);
/* This message needs to be translated here instead of the UI code, otherwise it would already
* be formatted and translation would not work. */
SNPRINTF(eevee->light_cache_info,
TIP_("%d Ref. Cubemaps, %d Irr. Samples (%s in memory)"),
RPT_("%d Ref. Cubemaps, %d Irr. Samples (%s in memory)"),
lcache->cube_len - 1,
irr_samples,
formatted_mem);
}
else {
STRNCPY(eevee->light_cache_info, TIP_("No light cache in this scene"));
STRNCPY(eevee->light_cache_info, N_("No light cache in this scene"));
}
}

View File

@ -5430,7 +5430,7 @@ static void draw_setting_widget(bAnimContext *ac,
!BKE_id_is_editable(ac->bmain, ale->id)))
{
if (setting != ACHANNEL_SETTING_EXPAND) {
UI_but_disable(but, TIP_("Can't edit this property from a linked data-block"));
UI_but_disable(but, "Can't edit this property from a linked data-block");
}
}

View File

@ -46,10 +46,10 @@ int getname_anim_fcurve(char *name, ID *id, FCurve *fcu)
if (ELEM(nullptr, id, fcu, fcu->rna_path)) {
if (fcu == nullptr) {
BLI_strncpy(name, TIP_("<invalid>"), name_maxncpy);
BLI_strncpy(name, RPT_("<invalid>"), name_maxncpy);
}
else if (fcu->rna_path == nullptr) {
BLI_strncpy(name, TIP_("<no path>"), name_maxncpy);
BLI_strncpy(name, RPT_("<no path>"), name_maxncpy);
}
else { /* id == nullptr */
BLI_snprintf(name, name_maxncpy, "%s[%d]", fcu->rna_path, fcu->array_index);

View File

@ -866,14 +866,14 @@ static void ed_marker_move_update_header(bContext *C, wmOperator *op)
if (totmark == 1 && selmarker) {
/* we print current marker value */
if (use_time) {
SNPRINTF(str, TIP_("Marker %.2f offset %s"), FRA2TIME(selmarker->frame), str_ofs);
SNPRINTF(str, RPT_("Marker %.2f offset %s"), FRA2TIME(selmarker->frame), str_ofs);
}
else {
SNPRINTF(str, TIP_("Marker %d offset %s"), selmarker->frame, str_ofs);
SNPRINTF(str, RPT_("Marker %d offset %s"), selmarker->frame, str_ofs);
}
}
else {
SNPRINTF(str, TIP_("Marker offset %s"), str_ofs);
SNPRINTF(str, RPT_("Marker offset %s"), str_ofs);
}
ED_area_status_text(CTX_wm_area(C), str);

View File

@ -129,7 +129,7 @@ void update_autoflags_fcurve(FCurve *fcu, bContext *C, ReportList *reports, Poin
/* try to get property we should be affecting */
if (RNA_path_resolve_property(ptr, fcu->rna_path, &tmp_ptr, &prop) == false) {
/* property not found... */
const char *idname = (ptr->owner_id) ? ptr->owner_id->name : TIP_("<No ID pointer>");
const char *idname = (ptr->owner_id) ? ptr->owner_id->name : RPT_("<No ID pointer>");
BKE_reportf(reports,
RPT_ERROR,

View File

@ -321,7 +321,7 @@ static bool poselib_blend_init_data(bContext *C, wmOperator *op, const wmEvent *
/* check if valid poselib */
Object *ob = get_poselib_object(C);
if (ELEM(nullptr, ob, ob->pose, ob->data)) {
BKE_report(op->reports, RPT_ERROR, TIP_("Pose lib is only for armatures in pose mode"));
BKE_report(op->reports, RPT_ERROR, "Pose lib is only for armatures in pose mode");
return false;
}
@ -500,10 +500,10 @@ static int poselib_blend_modal(bContext *C, wmOperator *op, const wmEvent *event
ED_slider_status_string_get(pbd->slider, slider_string, sizeof(slider_string));
if (pbd->state == POSE_BLEND_BLENDING) {
STRNCPY(tab_string, TIP_("[Tab] - Show original pose"));
STRNCPY(tab_string, RPT_("[Tab] - Show original pose"));
}
else {
STRNCPY(tab_string, TIP_("[Tab] - Show blended pose"));
STRNCPY(tab_string, RPT_("[Tab] - Show blended pose"));
}
SNPRINTF(status_string, "%s | %s | [Ctrl] - Flip Pose", tab_string, slider_string);

View File

@ -922,38 +922,38 @@ static void pose_slide_draw_status(bContext *C, tPoseSlideOp *pso)
switch (pso->mode) {
case POSESLIDE_PUSH:
STRNCPY(mode_str, TIP_("Push Pose"));
STRNCPY(mode_str, RPT_("Push Pose"));
break;
case POSESLIDE_RELAX:
STRNCPY(mode_str, TIP_("Relax Pose"));
STRNCPY(mode_str, RPT_("Relax Pose"));
break;
case POSESLIDE_BREAKDOWN:
STRNCPY(mode_str, TIP_("Breakdown"));
STRNCPY(mode_str, RPT_("Breakdown"));
break;
case POSESLIDE_BLEND:
STRNCPY(mode_str, TIP_("Blend to Neighbor"));
STRNCPY(mode_str, RPT_("Blend to Neighbor"));
break;
default:
/* Unknown. */
STRNCPY(mode_str, TIP_("Sliding-Tool"));
STRNCPY(mode_str, RPT_("Sliding-Tool"));
break;
}
switch (pso->axislock) {
case PS_LOCK_X:
STRNCPY(axis_str, TIP_("[X]/Y/Z axis only (X to clear)"));
STRNCPY(axis_str, RPT_("[X]/Y/Z axis only (X to clear)"));
break;
case PS_LOCK_Y:
STRNCPY(axis_str, TIP_("X/[Y]/Z axis only (Y to clear)"));
STRNCPY(axis_str, RPT_("X/[Y]/Z axis only (Y to clear)"));
break;
case PS_LOCK_Z:
STRNCPY(axis_str, TIP_("X/Y/[Z] axis only (Z to clear)"));
STRNCPY(axis_str, RPT_("X/Y/[Z] axis only (Z to clear)"));
break;
default:
if (ELEM(pso->channels, PS_TFM_LOC, PS_TFM_ROT, PS_TFM_SIZE)) {
STRNCPY(axis_str, TIP_("X/Y/Z = Axis Constraint"));
STRNCPY(axis_str, RPT_("X/Y/Z = Axis Constraint"));
}
else {
axis_str[0] = '\0';
@ -963,26 +963,26 @@ static void pose_slide_draw_status(bContext *C, tPoseSlideOp *pso)
switch (pso->channels) {
case PS_TFM_LOC:
SNPRINTF(limits_str, TIP_("[G]/R/S/B/C - Location only (G to clear) | %s"), axis_str);
SNPRINTF(limits_str, RPT_("[G]/R/S/B/C - Location only (G to clear) | %s"), axis_str);
break;
case PS_TFM_ROT:
SNPRINTF(limits_str, TIP_("G/[R]/S/B/C - Rotation only (R to clear) | %s"), axis_str);
SNPRINTF(limits_str, RPT_("G/[R]/S/B/C - Rotation only (R to clear) | %s"), axis_str);
break;
case PS_TFM_SIZE:
SNPRINTF(limits_str, TIP_("G/R/[S]/B/C - Scale only (S to clear) | %s"), axis_str);
SNPRINTF(limits_str, RPT_("G/R/[S]/B/C - Scale only (S to clear) | %s"), axis_str);
break;
case PS_TFM_BBONE_SHAPE:
STRNCPY(limits_str, TIP_("G/R/S/[B]/C - Bendy Bone properties only (B to clear) | %s"));
STRNCPY(limits_str, RPT_("G/R/S/[B]/C - Bendy Bone properties only (B to clear) | %s"));
break;
case PS_TFM_PROPS:
STRNCPY(limits_str, TIP_("G/R/S/B/[C] - Custom Properties only (C to clear) | %s"));
STRNCPY(limits_str, RPT_("G/R/S/B/[C] - Custom Properties only (C to clear) | %s"));
break;
default:
STRNCPY(limits_str, TIP_("G/R/S/B/C - Limit to Transform/Property Set"));
STRNCPY(limits_str, RPT_("G/R/S/B/C - Limit to Transform/Property Set"));
break;
}
STRNCPY(bone_vis_str, TIP_("[H] - Toggle bone visibility"));
STRNCPY(bone_vis_str, RPT_("[H] - Toggle bone visibility"));
ED_slider_status_string_get(pso->slider, slider_str, sizeof(slider_str));

View File

@ -363,8 +363,8 @@ static bool asset_clear_poll(bContext *C, const PointerRNAVec &ids)
IDVecStats ctx_stats = asset_operation_get_id_vec_stats_from_ids(ids);
if (!ctx_stats.has_asset) {
const char *msg_single = TIP_("Data-block is not marked as asset");
const char *msg_multiple = TIP_("No data-block selected that is marked as asset");
const char *msg_single = N_("Data-block is not marked as asset");
const char *msg_multiple = N_("No data-block selected that is marked as asset");
CTX_wm_operator_poll_msg_set(C, ctx_stats.is_single ? msg_single : msg_multiple);
return false;
}

View File

@ -59,7 +59,7 @@ class AssetCatalogSelectorTree : public ui::AbstractTreeView {
void build_tree() override
{
if (catalog_tree_.is_empty()) {
auto &item = add_tree_item<ui::BasicTreeViewItem>(TIP_("No applicable assets found"),
auto &item = add_tree_item<ui::BasicTreeViewItem>(RPT_("No applicable assets found"),
ICON_INFO);
item.disable_interaction();
return;

View File

@ -1960,7 +1960,7 @@ static void annotation_draw_status_indicators(bContext *C, tGPsdata *p)
/* Provide usage tips, since this is modal, and unintuitive without hints */
ED_workspace_status_text(
C,
TIP_("Annotation Create Poly: LMB click to place next stroke vertex | "
RPT_("Annotation Create Poly: LMB click to place next stroke vertex | "
"ESC/Enter to end (or click outside this area)"));
break;
default:
@ -1976,29 +1976,29 @@ static void annotation_draw_status_indicators(bContext *C, tGPsdata *p)
switch (p->paintmode) {
case GP_PAINTMODE_ERASER:
ED_workspace_status_text(C,
TIP_("Annotation Eraser: Hold and drag LMB or RMB to erase | "
RPT_("Annotation Eraser: Hold and drag LMB or RMB to erase | "
"ESC/Enter to end (or click outside this area)"));
break;
case GP_PAINTMODE_DRAW_STRAIGHT:
ED_workspace_status_text(C,
TIP_("Annotation Line Draw: Hold and drag LMB to draw | "
RPT_("Annotation Line Draw: Hold and drag LMB to draw | "
"ESC/Enter to end (or click outside this area)"));
break;
case GP_PAINTMODE_DRAW:
ED_workspace_status_text(C,
TIP_("Annotation Freehand Draw: Hold and drag LMB to draw | "
RPT_("Annotation Freehand Draw: Hold and drag LMB to draw | "
"E/ESC/Enter to end (or click outside this area)"));
break;
case GP_PAINTMODE_DRAW_POLY:
ED_workspace_status_text(
C,
TIP_("Annotation Create Poly: LMB click to place next stroke vertex | "
RPT_("Annotation Create Poly: LMB click to place next stroke vertex | "
"ESC/Enter to end (or click outside this area)"));
break;
default: /* unhandled future cases */
ED_workspace_status_text(
C, TIP_("Annotation Session: ESC/Enter to end (or click outside this area)"));
C, RPT_("Annotation Session: ESC/Enter to end (or click outside this area)"));
break;
}
break;

View File

@ -2298,11 +2298,11 @@ static void gpencil_fill_status_indicators(tGPDfill *tgpf)
char status_str[UI_MAX_DRAW_STR];
SNPRINTF(status_str,
TIP_("Fill: ESC/RMB cancel, LMB Fill, Shift Draw on Back, MMB Adjust Extend, S: "
RPT_("Fill: ESC/RMB cancel, LMB Fill, Shift Draw on Back, MMB Adjust Extend, S: "
"Switch Mode, D: "
"Stroke Collision | %s %s (%.3f)"),
(is_extend) ? TIP_("Extend") : TIP_("Radius"),
(is_extend && use_stroke_collide) ? TIP_("Stroke: ON") : TIP_("Stroke: OFF"),
(is_extend) ? RPT_("Extend") : RPT_("Radius"),
(is_extend && use_stroke_collide) ? RPT_("Stroke: ON") : RPT_("Stroke: OFF"),
tgpf->fill_extend_fac);
ED_workspace_status_text(tgpf->C, status_str);

View File

@ -598,7 +598,7 @@ static void gpencil_interpolate_status_indicators(bContext *C, tGPDinterpolate *
char status_str[UI_MAX_DRAW_STR];
char msg_str[UI_MAX_DRAW_STR];
STRNCPY(msg_str, TIP_("GPencil Interpolation: "));
STRNCPY(msg_str, RPT_("GPencil Interpolation: "));
if (hasNumInput(&p->num)) {
char str_ofs[NUM_STR_REP_LEN];
@ -612,7 +612,7 @@ static void gpencil_interpolate_status_indicators(bContext *C, tGPDinterpolate *
ED_area_status_text(p->area, status_str);
ED_workspace_status_text(
C, TIP_("ESC/RMB to cancel, Enter/LMB to confirm, WHEEL/MOVE to adjust factor"));
C, RPT_("ESC/RMB to cancel, Enter/LMB to confirm, WHEEL/MOVE to adjust factor"));
}
/* Update screen and stroke */

View File

@ -2615,20 +2615,20 @@ static void gpencil_draw_status_indicators(bContext *C, tGPsdata *p)
case GP_PAINTMODE_ERASER: {
ED_workspace_status_text(
C,
TIP_("Grease Pencil Erase Session: Hold and drag LMB or RMB to erase | "
RPT_("Grease Pencil Erase Session: Hold and drag LMB or RMB to erase | "
"ESC/Enter to end (or click outside this area)"));
break;
}
case GP_PAINTMODE_DRAW_STRAIGHT: {
ED_workspace_status_text(C,
TIP_("Grease Pencil Line Session: Hold and drag LMB to draw | "
RPT_("Grease Pencil Line Session: Hold and drag LMB to draw | "
"ESC/Enter to end (or click outside this area)"));
break;
}
case GP_PAINTMODE_SET_CP: {
ED_workspace_status_text(
C,
TIP_("Grease Pencil Guides: LMB click and release to place reference point | "
RPT_("Grease Pencil Guides: LMB click and release to place reference point | "
"Esc/RMB to cancel"));
break;
}
@ -2637,19 +2637,19 @@ static void gpencil_draw_status_indicators(bContext *C, tGPsdata *p)
if (guide->use_guide) {
ED_workspace_status_text(
C,
TIP_("Grease Pencil Freehand Session: Hold and drag LMB to draw | "
RPT_("Grease Pencil Freehand Session: Hold and drag LMB to draw | "
"M key to flip guide | O key to move reference point"));
}
else {
ED_workspace_status_text(
C, TIP_("Grease Pencil Freehand Session: Hold and drag LMB to draw"));
C, RPT_("Grease Pencil Freehand Session: Hold and drag LMB to draw"));
}
break;
}
default: /* unhandled future cases */
{
ED_workspace_status_text(
C, TIP_("Grease Pencil Session: ESC/Enter to end (or click outside this area)"));
C, RPT_("Grease Pencil Session: ESC/Enter to end (or click outside this area)"));
break;
}
}

View File

@ -421,38 +421,38 @@ static void gpencil_primitive_status_indicators(bContext *C, tGPDprimitive *tgpi
if (tgpi->type == GP_STROKE_LINE) {
BLI_strncpy(
msg_str,
TIP_("Line: ESC to cancel, LMB set origin, Enter/MMB to confirm, WHEEL/+- to "
RPT_("Line: ESC to cancel, LMB set origin, Enter/MMB to confirm, WHEEL/+- to "
"adjust subdivision number, Shift to align, Alt to center, E: extrude, G: grab"),
UI_MAX_DRAW_STR);
}
else if (tgpi->type == GP_STROKE_POLYLINE) {
BLI_strncpy(msg_str,
TIP_("Polyline: ESC to cancel, LMB to set, Enter/MMB to confirm, WHEEL/+- to "
RPT_("Polyline: ESC to cancel, LMB to set, Enter/MMB to confirm, WHEEL/+- to "
"adjust subdivision number, Shift to align, G: grab"),
UI_MAX_DRAW_STR);
}
else if (tgpi->type == GP_STROKE_BOX) {
BLI_strncpy(msg_str,
TIP_("Rectangle: ESC to cancel, LMB set origin, Enter/MMB to confirm, WHEEL/+- "
RPT_("Rectangle: ESC to cancel, LMB set origin, Enter/MMB to confirm, WHEEL/+- "
"to adjust subdivision number, Shift to square, Alt to center, G: grab"),
UI_MAX_DRAW_STR);
}
else if (tgpi->type == GP_STROKE_CIRCLE) {
BLI_strncpy(msg_str,
TIP_("Circle: ESC to cancel, Enter/MMB to confirm, WHEEL/+- to adjust subdivision "
RPT_("Circle: ESC to cancel, Enter/MMB to confirm, WHEEL/+- to adjust subdivision "
"number, Shift to square, Alt to center, G: grab"),
UI_MAX_DRAW_STR);
}
else if (tgpi->type == GP_STROKE_ARC) {
BLI_strncpy(
msg_str,
TIP_("Arc: ESC to cancel, Enter/MMB to confirm, WHEEL/+- to adjust subdivision number, "
RPT_("Arc: ESC to cancel, Enter/MMB to confirm, WHEEL/+- to adjust subdivision number, "
"Shift to square, Alt to center, M: Flip, E: extrude, G: grab"),
UI_MAX_DRAW_STR);
}
else if (tgpi->type == GP_STROKE_CURVE) {
BLI_strncpy(msg_str,
TIP_("Curve: ESC to cancel, Enter/MMB to confirm, WHEEL/+- to adjust subdivision "
RPT_("Curve: ESC to cancel, Enter/MMB to confirm, WHEEL/+- to adjust subdivision "
"number, Shift to square, Alt to center, E: extrude, G: grab"),
UI_MAX_DRAW_STR);
}

View File

@ -1138,7 +1138,7 @@ static void gpencil_sculpt_brush_header_set(bContext *C, tGP_BrushEditData *gso)
char str[UI_MAX_DRAW_STR] = "";
SNPRINTF(str,
TIP_("GPencil Sculpt: %s Stroke | LMB to paint | RMB/Escape to Exit"
RPT_("GPencil Sculpt: %s Stroke | LMB to paint | RMB/Escape to Exit"
" | Ctrl to Invert Action | Wheel Up/Down for Size "
" | Shift-Wheel Up/Down for Strength"),
brush->id.name + 2);

View File

@ -79,7 +79,7 @@ enum {
static void gpencil_uv_transform_update_header(wmOperator *op, bContext *C)
{
const int mode = RNA_enum_get(op->ptr, "mode");
const char *str = TIP_("Confirm: Enter/LClick, Cancel: (Esc/RClick) %s");
const char *str = RPT_("Confirm: Enter/LClick, Cancel: (Esc/RClick) %s");
char msg[UI_MAX_DRAW_STR];
ScrArea *area = CTX_wm_area(C);

View File

@ -691,7 +691,7 @@ static bool brush_smear_apply(tGP_BrushVertexpaintData *gso,
static void gpencil_vertexpaint_brush_header_set(bContext *C)
{
ED_workspace_status_text(C,
TIP_("GPencil Vertex Paint: LMB to paint | RMB/Escape to Exit"
RPT_("GPencil Vertex Paint: LMB to paint | RMB/Escape to Exit"
" | Ctrl to Invert Action"));
}

View File

@ -716,17 +716,17 @@ static void gpencil_weightpaint_brush_header_set(bContext *C, tGP_BrushWeightpai
{
switch (gso->brush->gpencil_weight_tool) {
case GPWEIGHT_TOOL_DRAW:
ED_workspace_status_text(C, TIP_("GPencil Weight Paint: LMB to paint | RMB/Escape to Exit"));
ED_workspace_status_text(C, RPT_("GPencil Weight Paint: LMB to paint | RMB/Escape to Exit"));
break;
case GPWEIGHT_TOOL_BLUR:
ED_workspace_status_text(C, TIP_("GPencil Weight Blur: LMB to blur | RMB/Escape to Exit"));
ED_workspace_status_text(C, RPT_("GPencil Weight Blur: LMB to blur | RMB/Escape to Exit"));
break;
case GPWEIGHT_TOOL_AVERAGE:
ED_workspace_status_text(
C, TIP_("GPencil Weight Average: LMB to set average | RMB/Escape to Exit"));
C, RPT_("GPencil Weight Average: LMB to set average | RMB/Escape to Exit"));
break;
case GPWEIGHT_TOOL_SMEAR:
ED_workspace_status_text(C, TIP_("GPencil Weight Smear: LMB to smear | RMB/Escape to Exit"));
ED_workspace_status_text(C, RPT_("GPencil Weight Smear: LMB to smear | RMB/Escape to Exit"));
break;
}
}

View File

@ -67,7 +67,7 @@ struct EyedropperGPencil {
static void eyedropper_gpencil_status_indicators(bContext *C)
{
char msg_str[UI_MAX_DRAW_STR];
STRNCPY(msg_str, TIP_("LMB: Stroke - Shift: Fill - Shift+Ctrl: Stroke + Fill"));
STRNCPY(msg_str, RPT_("LMB: Stroke - Shift: Fill - Shift+Ctrl: Stroke + Fill"));
ED_workspace_status_text(C, msg_str);
}

View File

@ -3035,7 +3035,7 @@ char *ui_but_string_get_dynamic(uiBut *but, int *r_str_size)
* Report a generic error prefix when evaluating a string with #BPY_run_string_as_number
* as the Python error on its own doesn't provide enough context.
*/
#define UI_NUMBER_EVAL_ERROR_PREFIX IFACE_("Error evaluating number, see Info editor for details")
#define UI_NUMBER_EVAL_ERROR_PREFIX RPT_("Error evaluating number, see Info editor for details")
static bool ui_number_from_string_units(
bContext *C, const char *str, const int unit_type, const UnitSettings *unit, double *r_value)
@ -4542,7 +4542,7 @@ static void ui_def_but_rna__panel_type(bContext *C, uiLayout *layout, void *but_
}
else {
char msg[256];
SNPRINTF(msg, TIP_("Missing Panel: %s"), panel_type);
SNPRINTF(msg, RPT_("Missing Panel: %s"), panel_type);
uiItemL(layout, msg, ICON_NONE);
}
}
@ -4571,7 +4571,7 @@ static void ui_def_but_rna__menu_type(bContext *C, uiLayout *layout, void *but_p
}
else {
char msg[256];
SNPRINTF(msg, TIP_("Missing Menu: %s"), menu_type);
SNPRINTF(msg, RPT_("Missing Menu: %s"), menu_type);
uiItemL(layout, msg, ICON_NONE);
}
}

View File

@ -1336,7 +1336,7 @@ static void ui_item_menu_hold(bContext *C, ARegion *butregion, uiBut *but)
UI_menutype_draw(C, mt, layout);
}
else {
uiItemL(layout, TIP_("Menu Missing:"), ICON_NONE);
uiItemL(layout, RPT_("Menu Missing:"), ICON_NONE);
uiItemL(layout, menu_id, ICON_NONE);
}
UI_popup_menu_end(C, pup);

View File

@ -578,7 +578,7 @@ void UI_popup_menu_reports(bContext *C, ReportList *reports)
if (pup == nullptr) {
char title[UI_MAX_DRAW_STR];
SNPRINTF(title, "%s: %s", IFACE_("Report"), report->typestr);
SNPRINTF(title, "%s: %s", RPT_("Report"), report->typestr);
/* popup_menu stuff does just what we need (but pass meaningful block name) */
pup = UI_popup_menu_begin_ex(C, title, __func__, ICON_NONE);
layout = UI_popup_menu_layout(pup);
@ -627,10 +627,10 @@ static void ui_popup_menu_create_from_menutype(bContext *C,
handle->can_refresh = true;
if (bool(mt->flag & MenuTypeFlag::SearchOnKeyPress)) {
ED_workspace_status_text(C, TIP_("Type to search..."));
ED_workspace_status_text(C, RPT_("Type to search..."));
}
else if (mt->idname[0]) {
ED_workspace_status_text(C, TIP_("Press spacebar to search..."));
ED_workspace_status_text(C, RPT_("Press spacebar to search..."));
}
}

View File

@ -2599,7 +2599,7 @@ void uiTemplateGpencilModifiers(uiLayout * /*layout*/, bContext *C)
/** \} */
#define ERROR_LIBDATA_MESSAGE TIP_("Can't edit external library data")
#define ERROR_LIBDATA_MESSAGE N_("Can't edit external library data")
/* -------------------------------------------------------------------- */
/** \name ShaderFx Template
@ -2715,7 +2715,7 @@ static eAutoPropButsReturn template_operator_property_buts_draw_single(
/* poll() on this operator may still fail,
* at the moment there is no nice feedback when this happens just fails silently. */
if (!WM_operator_repeat_check(C, op)) {
UI_block_lock_set(block, true, "Operator can't redo");
UI_block_lock_set(block, true, N_("Operator cannot redo"));
return return_info;
}
@ -2974,7 +2974,7 @@ void uiTemplateOperatorRedoProperties(uiLayout *layout, const bContext *C)
/** \name Constraint Header Template
* \{ */
#define ERROR_LIBDATA_MESSAGE TIP_("Can't edit external library data")
#define ERROR_LIBDATA_MESSAGE N_("Can't edit external library data")
static void constraint_active_func(bContext * /*C*/, void *ob_v, void *con_v)
{
@ -6537,9 +6537,9 @@ void uiTemplateInputStatus(uiLayout *layout, bContext *C)
uiLayout *row = uiLayoutRow(col, true);
uiLayoutSetAlignment(row, UI_LAYOUT_ALIGN_LEFT);
const char *msg = CTX_TIP_(BLT_I18NCONTEXT_OPERATOR_DEFAULT,
const char *msg = CTX_RPT_(BLT_I18NCONTEXT_OPERATOR_DEFAULT,
WM_window_cursor_keymap_status_get(win, i, 0));
const char *msg_drag = CTX_TIP_(BLT_I18NCONTEXT_OPERATOR_DEFAULT,
const char *msg_drag = CTX_RPT_(BLT_I18NCONTEXT_OPERATOR_DEFAULT,
WM_window_cursor_keymap_status_get(win, i, 1));
if (msg || (msg_drag == nullptr)) {
@ -6638,7 +6638,7 @@ void uiTemplateStatusInfo(uiLayout *layout, bContext *C)
BKE_blender_version_blendfile_string_from_values(
writer_ver_str, sizeof(writer_ver_str), bmain->versionfile, -1);
SNPRINTF(compat_error_msg,
TIP_("File saved by newer Blender\n(%s), expect loss of data"),
RPT_("File saved by newer Blender\n(%s), expect loss of data"),
writer_ver_str);
but = uiDefIconBut(block,
UI_BTYPE_BUT,
@ -6790,13 +6790,13 @@ bool uiTemplateEventFromKeymapItem(uiLayout *layout,
for (int j = 0; j < ARRAY_SIZE(icon_mod) && icon_mod[j]; j++) {
uiItemL(layout, "", icon_mod[j]);
}
uiItemL(layout, CTX_TIP_(BLT_I18NCONTEXT_ID_WINDOWMANAGER, text), icon);
uiItemL(layout, CTX_RPT_(BLT_I18NCONTEXT_ID_WINDOWMANAGER, text), icon);
ok = true;
}
else if (text_fallback) {
const char *event_text = WM_key_event_string(kmi->type, true);
uiItemL(layout, event_text, ICON_NONE);
uiItemL(layout, CTX_TIP_(BLT_I18NCONTEXT_ID_WINDOWMANAGER, text), ICON_NONE);
uiItemL(layout, CTX_RPT_(BLT_I18NCONTEXT_ID_WINDOWMANAGER, text), ICON_NONE);
ok = true;
}
return ok;
@ -6980,7 +6980,7 @@ void uiTemplateCacheFileProcedural(uiLayout *layout, const bContext *C, PointerR
if (!is_alembic) {
row = uiLayoutRow(layout, false);
uiItemL(row, TIP_("Only Alembic Procedurals supported"), ICON_INFO);
uiItemL(row, RPT_("Only Alembic Procedurals supported"), ICON_INFO);
}
else if (!engine_supports_procedural) {
row = uiLayoutRow(layout, false);
@ -6988,13 +6988,13 @@ void uiTemplateCacheFileProcedural(uiLayout *layout, const bContext *C, PointerR
if (BKE_scene_uses_cycles(scene) && !BKE_scene_uses_cycles_experimental_features(scene)) {
uiItemL(
row,
TIP_(
RPT_(
"The Cycles Alembic Procedural is only available with the experimental feature set"),
ICON_INFO);
}
else {
uiItemL(
row, TIP_("The active render engine does not have an Alembic Procedural"), ICON_INFO);
row, RPT_("The active render engine does not have an Alembic Procedural"), ICON_INFO);
}
}

View File

@ -170,7 +170,7 @@ static void edbm_bevel_update_status_text(bContext *C, wmOperator *op)
C, op->ptr, prop, RNA_property_enum_get(op->ptr, prop), &affect_str);
SNPRINTF(status_text,
TIP_("%s: Confirm, "
RPT_("%s: Confirm, "
"%s: Cancel, "
"%s: Width Type (%s), "
"%s: Width (%s), "

View File

@ -173,7 +173,7 @@ static int mesh_bisect_invoke(bContext *C, wmOperator *op, const wmEvent *event)
G.moving = G_TRANSFORM_EDIT;
/* Initialize modal callout. */
ED_workspace_status_text(C, TIP_("LMB: Click and drag to draw cut line"));
ED_workspace_status_text(C, RPT_("LMB: Click and drag to draw cut line"));
}
MEM_freeN(objects);
return ret;
@ -203,7 +203,7 @@ static int mesh_bisect_modal(bContext *C, wmOperator *op, const wmEvent *event)
/* update or clear modal callout */
if (event->type == EVT_MODAL_MAP) {
if (event->val == GESTURE_MODAL_BEGIN) {
ED_workspace_status_text(C, TIP_("LMB: Release to confirm cut line"));
ED_workspace_status_text(C, RPT_("LMB: Release to confirm cut line"));
}
else {
ED_workspace_status_text(C, nullptr);

View File

@ -71,7 +71,7 @@ static void edbm_inset_update_header(wmOperator *op, bContext *C)
{
InsetData *opdata = static_cast<InsetData *>(op->customdata);
const char *str = TIP_(
const char *str = RPT_(
"Confirm: Enter/LClick, Cancel: (Esc/RClick), Thickness: %s, "
"Depth (Ctrl to tweak): %s (%s), Outset (O): (%s), Boundary (B): (%s), Individual (I): "
"(%s)");

View File

@ -1113,7 +1113,7 @@ static void knife_update_header(bContext *C, wmOperator *op, KnifeTool_OpData *k
SNPRINTF(
header,
TIP_("%s: confirm, %s: cancel, %s: undo, "
RPT_("%s: confirm, %s: cancel, %s: undo, "
"%s: start/define cut, %s: close cut, %s: new cut, "
"%s: midpoint snap (%s), %s: ignore snap (%s), "
"%s: angle constraint %.2f(%.2f) (%s%s%s%s), %s: cut through (%s), "

View File

@ -477,7 +477,7 @@ static int loopcut_init(bContext *C, wmOperator *op, const wmEvent *event)
if (is_interactive) {
ED_workspace_status_text(
C,
TIP_("Select a ring to be cut, use mouse-wheel or page-up/down for number of cuts, "
RPT_("Select a ring to be cut, use mouse-wheel or page-up/down for number of cuts, "
"hold Alt for smooth"));
return OPERATOR_RUNNING_MODAL;
}
@ -699,7 +699,7 @@ static int loopcut_modal(bContext *C, wmOperator *op, const wmEvent *event)
BLI_snprintf(str_rep + NUM_STR_REP_LEN, NUM_STR_REP_LEN, "%.2f", smoothness);
}
SNPRINTF(
buf, TIP_("Number of Cuts: %s, Smooth: %s (Alt)"), str_rep, str_rep + NUM_STR_REP_LEN);
buf, RPT_("Number of Cuts: %s, Smooth: %s (Alt)"), str_rep, str_rep + NUM_STR_REP_LEN);
ED_workspace_status_text(C, buf);
}

View File

@ -8501,7 +8501,7 @@ static void point_normals_update_header(bContext *C, wmOperator *op)
op->type, (_id), true, UI_MAX_SHORTCUT_STR, &available_len, &p)
SNPRINTF(header,
TIP_("%s: confirm, %s: cancel, "
RPT_("%s: confirm, %s: cancel, "
"%s: point to mouse (%s), %s: point to Pivot, "
"%s: point to object origin, %s: reset normals, "
"%s: set & point to 3D cursor, %s: select & point to mesh item, "

View File

@ -592,7 +592,7 @@ static int voxel_size_edit_invoke(bContext *C, wmOperator *op, const wmEvent *ev
ED_region_tag_redraw(region);
const char *status_str = TIP_(
const char *status_str = RPT_(
"Move the mouse to change the voxel size. CTRL: Relative Scale, SHIFT: Precision Mode, "
"ENTER/LMB: Confirm Size, ESC/RMB: Cancel");
ED_workspace_status_text(C, status_str);

View File

@ -432,17 +432,17 @@ static void make_renderinfo_string(const RenderStats *rs,
/* local view */
if (rs->localview) {
ret_array[i++] = TIP_("3D Local View ");
ret_array[i++] = RPT_("3D Local View ");
ret_array[i++] = info_sep;
}
else if (v3d_override) {
ret_array[i++] = TIP_("3D View ");
ret_array[i++] = RPT_("3D View ");
ret_array[i++] = info_sep;
}
/* frame number */
SNPRINTF(info_buffers.frame, "%d ", scene->r.cfra);
ret_array[i++] = TIP_("Frame:");
ret_array[i++] = RPT_("Frame:");
ret_array[i++] = info_buffers.frame;
/* Previous and elapsed time. */
@ -464,7 +464,7 @@ static void make_renderinfo_string(const RenderStats *rs,
PIL_check_seconds_timer() - rs->starttime);
}
ret_array[i++] = TIP_("Time:");
ret_array[i++] = RPT_("Time:");
ret_array[i++] = info_time;
ret_array[i++] = info_space;
@ -479,13 +479,13 @@ static void make_renderinfo_string(const RenderStats *rs,
else {
if (rs->mem_peak == 0.0f) {
SNPRINTF(info_buffers.statistics,
TIP_("Mem:%.2fM (Peak %.2fM)"),
RPT_("Mem:%.2fM (Peak %.2fM)"),
megs_used_memory,
megs_peak_memory);
}
else {
SNPRINTF(
info_buffers.statistics, TIP_("Mem:%.2fM, Peak: %.2fM"), rs->mem_used, rs->mem_peak);
info_buffers.statistics, RPT_("Mem:%.2fM, Peak: %.2fM"), rs->mem_used, rs->mem_peak);
}
info_statistics = info_buffers.statistics;
}

View File

@ -250,7 +250,7 @@ static void screen_user_menu_draw(const bContext *C, Menu *menu)
}
else {
if (show_missing) {
SNPRINTF(label, TIP_("Missing: %s"), umi_op->op_idname);
SNPRINTF(label, RPT_("Missing: %s"), umi_op->op_idname);
uiItemL(menu->layout, label, ICON_NONE);
}
}
@ -264,7 +264,7 @@ static void screen_user_menu_draw(const bContext *C, Menu *menu)
}
else {
if (show_missing) {
SNPRINTF(label, TIP_("Missing: %s"), umi_mt->mt_idname);
SNPRINTF(label, RPT_("Missing: %s"), umi_mt->mt_idname);
uiItemL(menu->layout, label, ICON_NONE);
}
}
@ -313,7 +313,7 @@ static void screen_user_menu_draw(const bContext *C, Menu *menu)
}
if (!ok) {
if (show_missing) {
SNPRINTF(label, TIP_("Missing: %s.%s"), umi_pr->context_data_path, umi_pr->prop_id);
SNPRINTF(label, RPT_("Missing: %s.%s"), umi_pr->context_data_path, umi_pr->prop_id);
uiItemL(menu->layout, label, ICON_NONE);
}
}
@ -328,8 +328,8 @@ static void screen_user_menu_draw(const bContext *C, Menu *menu)
}
if (is_empty) {
uiItemL(menu->layout, TIP_("No menu items found"), ICON_NONE);
uiItemL(menu->layout, TIP_("Right click on buttons to add them to this menu"), ICON_NONE);
uiItemL(menu->layout, RPT_("No menu items found"), ICON_NONE);
uiItemL(menu->layout, RPT_("Right click on buttons to add them to this menu"), ICON_NONE);
}
}

View File

@ -403,34 +403,32 @@ CurvesSculptCommonContext::CurvesSculptCommonContext(const bContext &C)
void report_empty_original_surface(ReportList *reports)
{
BKE_report(reports, RPT_WARNING, TIP_("Original surface mesh is empty"));
BKE_report(reports, RPT_WARNING, "Original surface mesh is empty");
}
void report_empty_evaluated_surface(ReportList *reports)
{
BKE_report(reports, RPT_WARNING, TIP_("Evaluated surface mesh is empty"));
BKE_report(reports, RPT_WARNING, "Evaluated surface mesh is empty");
}
void report_missing_surface(ReportList *reports)
{
BKE_report(reports, RPT_WARNING, TIP_("Missing surface mesh"));
BKE_report(reports, RPT_WARNING, "Missing surface mesh");
}
void report_missing_uv_map_on_original_surface(ReportList *reports)
{
BKE_report(
reports, RPT_WARNING, TIP_("Missing UV map for attaching curves on original surface"));
BKE_report(reports, RPT_WARNING, "Missing UV map for attaching curves on original surface");
}
void report_missing_uv_map_on_evaluated_surface(ReportList *reports)
{
BKE_report(
reports, RPT_WARNING, TIP_("Missing UV map for attaching curves on evaluated surface"));
BKE_report(reports, RPT_WARNING, "Missing UV map for attaching curves on evaluated surface");
}
void report_invalid_uv_map(ReportList *reports)
{
BKE_report(reports, RPT_WARNING, TIP_("Invalid UV map: UV islands must not overlap"));
BKE_report(reports, RPT_WARNING, "Invalid UV map: UV islands must not overlap");
}
void CurvesConstraintSolver::initialize(const bke::CurvesGeometry &curves,

View File

@ -144,7 +144,7 @@ struct SlideOperationExecutor {
if (curves_orig_->surface_uv_coords().is_empty()) {
BKE_report(stroke_extension.reports,
RPT_WARNING,
TIP_("Curves do not have surface attachment information"));
"Curves do not have surface attachment information");
return;
}
const StringRefNull uv_map_name = curves_id_orig_->surface_uv_map;
@ -217,8 +217,7 @@ struct SlideOperationExecutor {
this->slide_with_symmetry();
if (found_invalid_uv_mapping_) {
BKE_report(
stroke_extension.reports, RPT_WARNING, TIP_("UV map or surface attachment is invalid"));
BKE_report(stroke_extension.reports, RPT_WARNING, "UV map or surface attachment is invalid");
}
curves_orig_->tag_positions_changed();

View File

@ -630,9 +630,9 @@ static void sample_color_update_header(SampleColorData *data, bContext *C)
if (area) {
SNPRINTF(msg,
TIP_("Sample color for %s"),
!data->sample_palette ? TIP_("Brush. Use Left Click to sample for palette instead") :
TIP_("Palette. Use Left Click to sample more colors"));
RPT_("Sample color for %s"),
!data->sample_palette ? RPT_("Brush. Use Left Click to sample for palette instead") :
RPT_("Palette. Use Left Click to sample more colors"));
ED_workspace_status_text(C, msg);
}
}

View File

@ -6405,10 +6405,10 @@ void ED_paint_data_warning(
BKE_reportf(reports,
RPT_WARNING,
"Missing%s%s%s%s detected!",
!has_uvs ? TIP_(" UVs,") : "",
!has_mat ? TIP_(" Materials,") : "",
!has_tex ? TIP_(" Textures (or linked),") : "",
!has_stencil ? TIP_(" Stencil,") : "");
!has_uvs ? RPT_(" UVs,") : "",
!has_mat ? RPT_(" Materials,") : "",
!has_tex ? RPT_(" Textures (or linked),") : "",
!has_stencil ? RPT_(" Stencil,") : "");
}
bool ED_paint_proj_mesh_data_check(Scene *scene,

View File

@ -315,7 +315,7 @@ static int sculpt_sample_detail_size_exec(bContext *C, wmOperator *op)
static int sculpt_sample_detail_size_invoke(bContext *C, wmOperator *op, const wmEvent * /*event*/)
{
ED_workspace_status_text(C, TIP_("Click on the mesh to set the detail"));
ED_workspace_status_text(C, RPT_("Click on the mesh to set the detail"));
WM_cursor_modal_set(CTX_wm_window(C), WM_CURSOR_EYEDROPPER);
WM_event_add_modal_handler(C, op);
return OPERATOR_RUNNING_MODAL;
@ -765,7 +765,7 @@ static int dyntopo_detail_size_edit_invoke(bContext *C, wmOperator *op, const wm
ss->draw_faded_cursor = true;
const char *status_str = TIP_(
const char *status_str = RPT_(
"Move the mouse to change the dyntopo detail size. LMB: confirm size, ESC/RMB: cancel, "
"SHIFT: precision mode, CTRL: sample detail size");
ED_workspace_status_text(C, status_str);

View File

@ -266,16 +266,16 @@ static int dyntopo_warning_popup(bContext *C, wmOperatorType *ot, enum WarnFlag
uiLayout *layout = UI_popup_menu_layout(pup);
if (flag & (VDATA | EDATA | LDATA)) {
const char *msg_error = TIP_("Attribute Data Detected");
const char *msg = TIP_("Dyntopo will not preserve colors, UVs, or other attributes");
const char *msg_error = RPT_("Attribute Data Detected");
const char *msg = RPT_("Dyntopo will not preserve colors, UVs, or other attributes");
uiItemL(layout, msg_error, ICON_INFO);
uiItemL(layout, msg, ICON_NONE);
uiItemS(layout);
}
if (flag & MODIFIER) {
const char *msg_error = TIP_("Generative Modifiers Detected!");
const char *msg = TIP_(
const char *msg_error = RPT_("Generative Modifiers Detected!");
const char *msg = RPT_(
"Keeping the modifiers will increase polycount when returning to object mode");
uiItemL(layout, msg_error, ICON_INFO);

View File

@ -714,13 +714,13 @@ static void sculpt_mesh_update_status_bar(bContext *C, wmOperator *op)
op->type, (_id), true, UI_MAX_SHORTCUT_STR, &available_len, &p)
SNPRINTF(header,
TIP_("%s: Confirm, %s: Cancel"),
RPT_("%s: Confirm, %s: Cancel"),
WM_MODALKEY(FILTER_MESH_MODAL_CONFIRM),
WM_MODALKEY(FILTER_MESH_MODAL_CANCEL));
#undef WM_MODALKEY
ED_workspace_status_text(C, TIP_(header));
ED_workspace_status_text(C, RPT_(header));
}
static void sculpt_mesh_filter_apply(bContext *C, wmOperator *op)

View File

@ -370,10 +370,10 @@ void ED_object_sculptmode_enter_ex(Main *bmain,
const char *message_unsupported = nullptr;
if (mesh->corners_num != mesh->faces_num * 3) {
message_unsupported = TIP_("non-triangle face");
message_unsupported = RPT_("non-triangle face");
}
else if (mmd != nullptr) {
message_unsupported = TIP_("multi-res modifier");
message_unsupported = RPT_("multi-res modifier");
}
else {
dyntopo::WarnFlag flag = dyntopo::check_attribute_warning(scene, ob);
@ -381,16 +381,16 @@ void ED_object_sculptmode_enter_ex(Main *bmain,
/* pass */
}
else if (flag & dyntopo::VDATA) {
message_unsupported = TIP_("vertex data");
message_unsupported = RPT_("vertex data");
}
else if (flag & dyntopo::EDATA) {
message_unsupported = TIP_("edge data");
message_unsupported = RPT_("edge data");
}
else if (flag & dyntopo::LDATA) {
message_unsupported = TIP_("face data");
message_unsupported = RPT_("face data");
}
else if (flag & dyntopo::MODIFIER) {
message_unsupported = TIP_("constructive modifier");
message_unsupported = RPT_("constructive modifier");
}
else {
BLI_assert(0);

View File

@ -698,9 +698,9 @@ void uiTemplateTextureShow(uiLayout *layout, const bContext *C, PointerRNA *ptr,
user_found ? user->ptr.data : nullptr,
user_found ? user->prop : nullptr);
if (ct == nullptr) {
UI_but_disable(but, TIP_("No (unpinned) Properties Editor found to display texture in"));
UI_but_disable(but, "No (unpinned) Properties Editor found to display texture in");
}
else if (!user_found) {
UI_but_disable(but, TIP_("No texture user found"));
UI_but_disable(but, "No texture user found");
}
}

View File

@ -800,27 +800,27 @@ void uiTemplateMovieclipInformation(uiLayout *layout,
char str[1024];
size_t ofs = 0;
ofs += BLI_snprintf_rlen(str + ofs, sizeof(str) - ofs, TIP_("%d x %d"), width, height);
ofs += BLI_snprintf_rlen(str + ofs, sizeof(str) - ofs, RPT_("%d x %d"), width, height);
if (ibuf) {
if (ibuf->float_buffer.data) {
if (ibuf->channels != 4) {
ofs += BLI_snprintf_rlen(
str + ofs, sizeof(str) - ofs, TIP_(", %d float channel(s)"), ibuf->channels);
str + ofs, sizeof(str) - ofs, RPT_(", %d float channel(s)"), ibuf->channels);
}
else if (ibuf->planes == R_IMF_PLANES_RGBA) {
ofs += BLI_strncpy_rlen(str + ofs, TIP_(", RGBA float"), sizeof(str) - ofs);
ofs += BLI_strncpy_rlen(str + ofs, RPT_(", RGBA float"), sizeof(str) - ofs);
}
else {
ofs += BLI_strncpy_rlen(str + ofs, TIP_(", RGB float"), sizeof(str) - ofs);
ofs += BLI_strncpy_rlen(str + ofs, RPT_(", RGB float"), sizeof(str) - ofs);
}
}
else {
if (ibuf->planes == R_IMF_PLANES_RGBA) {
ofs += BLI_strncpy_rlen(str + ofs, TIP_(", RGBA byte"), sizeof(str) - ofs);
ofs += BLI_strncpy_rlen(str + ofs, RPT_(", RGBA byte"), sizeof(str) - ofs);
}
else {
ofs += BLI_strncpy_rlen(str + ofs, TIP_(", RGB byte"), sizeof(str) - ofs);
ofs += BLI_strncpy_rlen(str + ofs, RPT_(", RGB byte"), sizeof(str) - ofs);
}
}
@ -829,12 +829,12 @@ void uiTemplateMovieclipInformation(uiLayout *layout,
float frs_sec_base;
if (IMB_anim_get_fps(clip->anim, true, &frs_sec, &frs_sec_base)) {
ofs += BLI_snprintf_rlen(
str + ofs, sizeof(str) - ofs, TIP_(", %.2f fps"), float(frs_sec) / frs_sec_base);
str + ofs, sizeof(str) - ofs, RPT_(", %.2f fps"), float(frs_sec) / frs_sec_base);
}
}
}
else {
ofs += BLI_strncpy_rlen(str + ofs, TIP_(", failed to load"), sizeof(str) - ofs);
ofs += BLI_strncpy_rlen(str + ofs, RPT_(", failed to load"), sizeof(str) - ofs);
}
uiItemL(col, str, ICON_NONE);
@ -842,10 +842,10 @@ void uiTemplateMovieclipInformation(uiLayout *layout,
/* Display current frame number. */
int framenr = BKE_movieclip_remap_scene_to_clip_frame(clip, user->framenr);
if (framenr <= clip->len) {
SNPRINTF(str, TIP_("Frame: %d / %d"), framenr, clip->len);
SNPRINTF(str, RPT_("Frame: %d / %d"), framenr, clip->len);
}
else {
SNPRINTF(str, TIP_("Frame: - / %d"), clip->len);
SNPRINTF(str, RPT_("Frame: - / %d"), clip->len);
}
uiItemL(col, str, ICON_NONE);
@ -862,7 +862,7 @@ void uiTemplateMovieclipInformation(uiLayout *layout,
file = "-";
}
SNPRINTF(str, TIP_("File: %s"), file);
SNPRINTF(str, RPT_("File: %s"), file);
uiItemL(col, str, ICON_NONE);
}

View File

@ -224,7 +224,7 @@ static int open_exec(bContext *C, wmOperator *op)
RPT_ERROR,
"Cannot read '%s': %s",
filepath,
errno ? strerror(errno) : TIP_("unsupported movie clip format"));
errno ? strerror(errno) : RPT_("unsupported movie clip format"));
return OPERATOR_CANCELLED;
}

View File

@ -146,7 +146,7 @@ void CLIP_OT_add_marker(wmOperatorType *ot)
static int add_marker_at_click_invoke(bContext *C, wmOperator *op, const wmEvent * /*event*/)
{
ED_workspace_status_text(C, TIP_("Use LMB click to define location where place the marker"));
ED_workspace_status_text(C, RPT_("Use LMB click to define location where place the marker"));
/* Add modal handler for ESC. */
WM_event_add_modal_handler(C, op);

View File

@ -376,11 +376,11 @@ bool AssetCatalogDropTarget::can_drop(const wmDrag &drag, const char **r_disable
* path and the catalog system will generate missing parents from the path). But it does
* appear broken to users, so disabling entirely. */
if (catalog_item_.catalog_path().is_contained_in(drag_catalog->path)) {
*r_disabled_hint = TIP_("Catalog cannot be dropped into itself");
*r_disabled_hint = RPT_("Catalog cannot be dropped into itself");
return false;
}
if (catalog_item_.catalog_path() == drag_catalog->path.parent()) {
*r_disabled_hint = TIP_("Catalog is already placed inside this catalog");
*r_disabled_hint = RPT_("Catalog is already placed inside this catalog");
return false;
}
return true;
@ -521,7 +521,7 @@ bool AssetCatalogDropTarget::has_droppable_asset(const wmDrag &drag, const char
}
}
*r_disabled_hint = TIP_("Only assets from this current file can be moved between catalogs");
*r_disabled_hint = RPT_("Only assets from this current file can be moved between catalogs");
return false;
}
@ -529,7 +529,7 @@ bool AssetCatalogDropTarget::can_modify_catalogs(const ::AssetLibrary &library,
const char **r_disabled_hint)
{
if (ED_asset_catalogs_read_only(library)) {
*r_disabled_hint = TIP_("Catalogs cannot be edited in this asset library");
*r_disabled_hint = RPT_("Catalogs cannot be edited in this asset library");
return false;
}
return true;
@ -607,7 +607,7 @@ bool AssetCatalogTreeViewAllItem::DropTarget::can_drop(const wmDrag &drag,
const AssetCatalog *drag_catalog = AssetCatalogDropTarget::get_drag_catalog(drag, library);
if (drag_catalog->path.parent() == "") {
*r_disabled_hint = TIP_("Catalog is already placed at the highest level");
*r_disabled_hint = RPT_("Catalog is already placed at the highest level");
return false;
}

View File

@ -1451,7 +1451,7 @@ static void file_draw_invalid_asset_library_hint(const bContext *C,
int sy = v2d->tot.ymax;
{
const char *message = TIP_("Path to asset library does not exist:");
const char *message = RPT_("Path to asset library does not exist:");
file_draw_string_multiline(sx, sy, message, width, line_height, text_col, nullptr, &sy);
sy -= line_height;
@ -1464,7 +1464,7 @@ static void file_draw_invalid_asset_library_hint(const bContext *C,
{
UI_icon_draw(sx, sy - UI_UNIT_Y, ICON_INFO);
const char *suggestion = TIP_(
const char *suggestion = RPT_(
"Asset Libraries are local directories that can contain .blend files with assets inside.\n"
"Manage Asset Libraries from the File Paths section in Preferences");
file_draw_string_multiline(
@ -1508,7 +1508,7 @@ static void file_draw_invalid_library_hint(const bContext * /*C*/,
int sy = v2d->tot.ymax;
{
const char *message = TIP_("Unreadable Blender library file:");
const char *message = RPT_("Unreadable Blender library file:");
file_draw_string_multiline(sx, sy, message, width, line_height, text_col, nullptr, &sy);
sy -= line_height;
@ -1532,7 +1532,7 @@ static void file_draw_invalid_library_hint(const bContext * /*C*/,
file_draw_string_multiline(sx + UI_UNIT_X,
sy,
TIP_(report->message),
RPT_(report->message),
width - UI_UNIT_X,
line_height,
text_col,

View File

@ -587,17 +587,17 @@ static void graph_panel_key_properties(const bContext *C, Panel *panel)
else {
if ((fcu->bezt == nullptr) && (fcu->modifiers.first)) {
/* modifiers only - so no keyframes to be active */
uiItemL(layout, TIP_("F-Curve only has F-Modifiers"), ICON_NONE);
uiItemL(layout, TIP_("See Modifiers panel below"), ICON_INFO);
uiItemL(layout, RPT_("F-Curve only has F-Modifiers"), ICON_NONE);
uiItemL(layout, RPT_("See Modifiers panel below"), ICON_INFO);
}
else if (fcu->fpt) {
/* samples only */
uiItemL(layout,
TIP_("F-Curve doesn't have any keyframes as it only contains sampled points"),
RPT_("F-Curve doesn't have any keyframes as it only contains sampled points"),
ICON_NONE);
}
else {
uiItemL(layout, TIP_("No active keyframe on F-Curve"), ICON_NONE);
uiItemL(layout, RPT_("No active keyframe on F-Curve"), ICON_NONE);
}
}
@ -686,30 +686,30 @@ static void driver_dvar_invalid_name_query_cb(bContext *C, void *dvar_v, void *
DriverVar *dvar = (DriverVar *)dvar_v;
if (dvar->flag & DVAR_FLAG_INVALID_EMPTY) {
uiItemL(layout, TIP_("It cannot be left blank"), ICON_ERROR);
uiItemL(layout, RPT_("It cannot be left blank"), ICON_ERROR);
}
if (dvar->flag & DVAR_FLAG_INVALID_START_NUM) {
uiItemL(layout, TIP_("It cannot start with a number"), ICON_ERROR);
uiItemL(layout, RPT_("It cannot start with a number"), ICON_ERROR);
}
if (dvar->flag & DVAR_FLAG_INVALID_START_CHAR) {
uiItemL(layout,
TIP_("It cannot start with a special character,"
RPT_("It cannot start with a special character,"
" including '$', '@', '!', '~', '+', '-', '_', '.', or ' '"),
ICON_NONE);
}
if (dvar->flag & DVAR_FLAG_INVALID_HAS_SPACE) {
uiItemL(layout, TIP_("It cannot contain spaces (e.g. 'a space')"), ICON_ERROR);
uiItemL(layout, RPT_("It cannot contain spaces (e.g. 'a space')"), ICON_ERROR);
}
if (dvar->flag & DVAR_FLAG_INVALID_HAS_DOT) {
uiItemL(layout, TIP_("It cannot contain dots (e.g. 'a.dot')"), ICON_ERROR);
uiItemL(layout, RPT_("It cannot contain dots (e.g. 'a.dot')"), ICON_ERROR);
}
if (dvar->flag & DVAR_FLAG_INVALID_HAS_SPECIAL) {
uiItemL(layout,
TIP_("It cannot contain special (non-alphabetical/numeric) characters"),
RPT_("It cannot contain special (non-alphabetical/numeric) characters"),
ICON_ERROR);
}
if (dvar->flag & DVAR_FLAG_INVALID_PY_KEYWORD) {
uiItemL(layout, TIP_("It cannot be a reserved keyword in Python"), ICON_INFO);
uiItemL(layout, RPT_("It cannot be a reserved keyword in Python"), ICON_INFO);
}
UI_popup_menu_end(C, pup);
@ -1054,28 +1054,28 @@ static void graph_draw_driver_settings_panel(uiLayout *layout,
block = uiLayoutGetBlock(col);
if (driver->flag & DRIVER_FLAG_INVALID) {
uiItemL(col, TIP_("ERROR: Invalid Python expression"), ICON_CANCEL);
uiItemL(col, RPT_("ERROR: Invalid Python expression"), ICON_CANCEL);
}
else if (!BKE_driver_has_simple_expression(driver)) {
if ((G.f & G_FLAG_SCRIPT_AUTOEXEC) == 0) {
/* TODO: Add button to enable? */
uiItemL(col, TIP_("Python restricted for security"), ICON_ERROR);
uiItemL(col, RPT_("Python restricted for security"), ICON_ERROR);
}
else {
uiItemL(col, TIP_("Slow Python expression"), ICON_INFO);
uiItemL(col, RPT_("Slow Python expression"), ICON_INFO);
}
}
/* Explicit bpy-references are evil. Warn about these to prevent errors */
/* TODO: put these in a box? */
if (bpy_data_expr_error || bpy_ctx_expr_error) {
uiItemL(col, TIP_("WARNING: Driver expression may not work correctly"), ICON_HELP);
uiItemL(col, RPT_("WARNING: Driver expression may not work correctly"), ICON_HELP);
if (bpy_data_expr_error) {
uiItemL(col, TIP_("TIP: Use variables instead of bpy.data paths (see below)"), ICON_ERROR);
uiItemL(col, RPT_("TIP: Use variables instead of bpy.data paths (see below)"), ICON_ERROR);
}
if (bpy_ctx_expr_error) {
uiItemL(col, TIP_("TIP: bpy.context is not safe for renderfarm usage"), ICON_ERROR);
uiItemL(col, RPT_("TIP: bpy.context is not safe for renderfarm usage"), ICON_ERROR);
}
}
}
@ -1085,7 +1085,7 @@ static void graph_draw_driver_settings_panel(uiLayout *layout,
block = uiLayoutGetBlock(col);
if (driver->flag & DRIVER_FLAG_INVALID) {
uiItemL(col, TIP_("ERROR: Invalid target channel(s)"), ICON_ERROR);
uiItemL(col, RPT_("ERROR: Invalid target channel(s)"), ICON_ERROR);
}
/* Warnings about a lack of variables
@ -1095,11 +1095,11 @@ static void graph_draw_driver_settings_panel(uiLayout *layout,
* property animation
*/
if (BLI_listbase_is_empty(&driver->variables)) {
uiItemL(col, TIP_("ERROR: Driver is useless without any inputs"), ICON_ERROR);
uiItemL(col, RPT_("ERROR: Driver is useless without any inputs"), ICON_ERROR);
if (!BLI_listbase_is_empty(&fcu->modifiers)) {
uiItemL(col, TIP_("TIP: Use F-Curves for procedural animation instead"), ICON_INFO);
uiItemL(col, TIP_("F-Modifiers can generate curves for those too"), ICON_INFO);
uiItemL(col, RPT_("TIP: Use F-Curves for procedural animation instead"), ICON_INFO);
uiItemL(col, RPT_("F-Modifiers can generate curves for those too"), ICON_INFO);
}
}
}

View File

@ -1802,7 +1802,7 @@ static ListBase /*tEulerFilter*/ euler_filter_group_channels(
BKE_reportf(reports,
RPT_WARNING,
"Euler Rotation F-Curve has invalid index (ID='%s', Path='%s', Index=%d)",
(ale->id) ? ale->id->name : TIP_("<No ID>"),
(ale->id) ? ale->id->name : RPT_("<No ID>"),
fcu->rna_path,
fcu->array_index);
continue;

View File

@ -127,7 +127,7 @@ static void common_draw_status_header(bContext *C, tGraphSliderOp *gso, const ch
ED_slider_status_string_get(gso->slider, slider_string, UI_MAX_DRAW_STR);
STRNCPY(mode_str, TIP_(operator_name));
STRNCPY(mode_str, RPT_(operator_name));
if (hasNumInput(&gso->num)) {
char str_ofs[NUM_STR_REP_LEN];
@ -451,7 +451,7 @@ static void decimate_draw_status(bContext *C, tGraphSliderOp *gso)
ED_slider_status_string_get(gso->slider, slider_string, UI_MAX_DRAW_STR);
STRNCPY(mode_str, TIP_("Decimate Keyframes"));
STRNCPY(mode_str, RPT_("Decimate Keyframes"));
if (hasNumInput(&gso->num)) {
char str_ofs[NUM_STR_REP_LEN];
@ -1451,7 +1451,7 @@ static void shear_draw_status_header(bContext *C, tGraphSliderOp *gso)
char slider_string[UI_MAX_DRAW_STR];
ED_slider_status_string_get(gso->slider, slider_string, UI_MAX_DRAW_STR);
STRNCPY(mode_str, TIP_("Shear Keys"));
STRNCPY(mode_str, RPT_("Shear Keys"));
if (hasNumInput(&gso->num)) {
char str_ofs[NUM_STR_REP_LEN];
@ -2338,7 +2338,7 @@ static void scale_from_neighbor_draw_status_header(bContext *C, wmOperator *op)
break;
}
STRNCPY(mode_str, TIP_("Scale from Neighbor Keys"));
STRNCPY(mode_str, RPT_("Scale from Neighbor Keys"));
if (hasNumInput(&gso->num)) {
char str_ofs[NUM_STR_REP_LEN];

View File

@ -1039,7 +1039,7 @@ void uiTemplateImageSettings(uiLayout *layout, PointerRNA *imfptr, bool color_ma
if (imf->imtype == R_IMF_IMTYPE_CINEON) {
#if 1
uiItemL(col, TIP_("Hard coded Non-Linear, Gamma:1.7"), ICON_NONE);
uiItemL(col, RPT_("Hard coded Non-Linear, Gamma:1.7"), ICON_NONE);
#else
uiItemR(col, imfptr, "use_cineon_log", UI_ITEM_NONE, nullptr, ICON_NONE);
uiItemR(col, imfptr, "cineon_black", UI_ITEM_NONE, nullptr, ICON_NONE);
@ -1195,40 +1195,40 @@ void uiTemplateImageInfo(uiLayout *layout, bContext *C, Image *ima, ImageUser *i
uiLayoutSetAlignment(col, UI_LAYOUT_ALIGN_RIGHT);
if (ibuf == nullptr) {
uiItemL(col, TIP_("Can't Load Image"), ICON_NONE);
uiItemL(col, RPT_("Can't Load Image"), ICON_NONE);
}
else {
char str[MAX_IMAGE_INFO_LEN] = {0};
const int len = MAX_IMAGE_INFO_LEN;
int ofs = 0;
ofs += BLI_snprintf_rlen(str + ofs, len - ofs, TIP_("%d \u00D7 %d, "), ibuf->x, ibuf->y);
ofs += BLI_snprintf_rlen(str + ofs, len - ofs, RPT_("%d \u00D7 %d, "), ibuf->x, ibuf->y);
if (ibuf->float_buffer.data) {
if (ibuf->channels != 4) {
ofs += BLI_snprintf_rlen(
str + ofs, len - ofs, TIP_("%d float channel(s)"), ibuf->channels);
str + ofs, len - ofs, RPT_("%d float channel(s)"), ibuf->channels);
}
else if (ibuf->planes == R_IMF_PLANES_RGBA) {
ofs += BLI_strncpy_rlen(str + ofs, TIP_(" RGBA float"), len - ofs);
ofs += BLI_strncpy_rlen(str + ofs, RPT_(" RGBA float"), len - ofs);
}
else {
ofs += BLI_strncpy_rlen(str + ofs, TIP_(" RGB float"), len - ofs);
ofs += BLI_strncpy_rlen(str + ofs, RPT_(" RGB float"), len - ofs);
}
}
else {
if (ibuf->planes == R_IMF_PLANES_RGBA) {
ofs += BLI_strncpy_rlen(str + ofs, TIP_(" RGBA byte"), len - ofs);
ofs += BLI_strncpy_rlen(str + ofs, RPT_(" RGBA byte"), len - ofs);
}
else {
ofs += BLI_strncpy_rlen(str + ofs, TIP_(" RGB byte"), len - ofs);
ofs += BLI_strncpy_rlen(str + ofs, RPT_(" RGB byte"), len - ofs);
}
}
eGPUTextureFormat texture_format = IMB_gpu_get_texture_format(
ibuf, ima->flag & IMA_HIGH_BITDEPTH, ibuf->planes >= 8);
const char *texture_format_description = GPU_texture_format_name(texture_format);
ofs += BLI_snprintf_rlen(str + ofs, len - ofs, TIP_(", %s"), texture_format_description);
ofs += BLI_snprintf_rlen(str + ofs, len - ofs, RPT_(", %s"), texture_format_description);
uiItemL(col, str, ICON_NONE);
}
@ -1250,16 +1250,16 @@ void uiTemplateImageInfo(uiLayout *layout, bContext *C, Image *ima, ImageUser *i
if (duration > 0) {
/* Movie duration */
SNPRINTF(str, TIP_("Frame %d / %d"), framenr, duration);
SNPRINTF(str, RPT_("Frame %d / %d"), framenr, duration);
}
else if (ima->source == IMA_SRC_SEQUENCE && ibuf) {
/* Image sequence frame number + filename */
const char *filename = BLI_path_basename(ibuf->filepath);
SNPRINTF(str, TIP_("Frame %d: %s"), framenr, filename);
SNPRINTF(str, RPT_("Frame %d: %s"), framenr, filename);
}
else {
/* Frame number */
SNPRINTF(str, TIP_("Frame %d"), framenr);
SNPRINTF(str, RPT_("Frame %d"), framenr);
}
uiItemL(col, str, ICON_NONE);

View File

@ -1287,7 +1287,7 @@ static Image *image_open_single(Main *bmain,
RPT_ERROR,
"Cannot read '%s': %s",
range->filepath,
errno ? strerror(errno) : TIP_("unsupported image format"));
errno ? strerror(errno) : RPT_("unsupported image format"));
return nullptr;
}

View File

@ -559,13 +559,14 @@ static void get_stats_string(char *info,
if (obedit) {
if (BKE_keyblock_from_object(obedit)) {
*ofs += BLI_strncpy_rlen(info + *ofs, TIP_("(Key) "), len - *ofs);
*ofs += BLI_strncpy_rlen(info + *ofs, RPT_("(Key) "), len - *ofs);
}
if (obedit->type == OB_MESH) {
*ofs += BLI_snprintf_rlen(info + *ofs,
len - *ofs,
TIP_("Verts:%s/%s | Edges:%s/%s | Faces:%s/%s | Tris:%s"),
RPT_("Verts:%s/%s | Edges:%s/%s | Faces:%s/%s | Tris:%s"),
stats_fmt->totvertsel,
stats_fmt->totvert,
stats_fmt->totedgesel,
@ -577,7 +578,8 @@ static void get_stats_string(char *info,
else if (obedit->type == OB_ARMATURE) {
*ofs += BLI_snprintf_rlen(info + *ofs,
len - *ofs,
TIP_("Joints:%s/%s | Bones:%s/%s"),
RPT_("Joints:%s/%s | Bones:%s/%s"),
stats_fmt->totvertsel,
stats_fmt->totvert,
stats_fmt->totbonesel,
@ -585,17 +587,18 @@ static void get_stats_string(char *info,
}
else {
*ofs += BLI_snprintf_rlen(
info + *ofs, len - *ofs, TIP_("Verts:%s/%s"), stats_fmt->totvertsel, stats_fmt->totvert);
info + *ofs, len - *ofs, RPT_("Verts:%s/%s"), stats_fmt->totvertsel, stats_fmt->totvert);
}
}
else if (ob && (object_mode & OB_MODE_POSE)) {
*ofs += BLI_snprintf_rlen(
info + *ofs, len - *ofs, TIP_("Bones:%s/%s"), stats_fmt->totbonesel, stats_fmt->totbone);
info + *ofs, len - *ofs, RPT_("Bones:%s/%s"), stats_fmt->totbonesel, stats_fmt->totbone);
}
else if ((ob) && (ob->type == OB_GPENCIL_LEGACY)) {
*ofs += BLI_snprintf_rlen(info + *ofs,
len - *ofs,
TIP_("Layers:%s | Frames:%s | Strokes:%s | Points:%s"),
RPT_("Layers:%s | Frames:%s | Strokes:%s | Points:%s"),
stats_fmt->totgplayer,
stats_fmt->totgpframe,
stats_fmt->totgpstroke,
@ -605,14 +608,16 @@ static void get_stats_string(char *info,
if (stats_is_object_dynamic_topology_sculpt(ob)) {
*ofs += BLI_snprintf_rlen(info + *ofs,
len - *ofs,
TIP_("Verts:%s | Tris:%s"),
RPT_("Verts:%s | Tris:%s"),
stats_fmt->totvertsculpt,
stats_fmt->tottri);
}
else {
*ofs += BLI_snprintf_rlen(info + *ofs,
len - *ofs,
TIP_("Verts:%s | Faces:%s"),
RPT_("Verts:%s | Faces:%s"),
stats_fmt->totvertsculpt,
stats_fmt->totfacesculpt);
}
@ -620,7 +625,8 @@ static void get_stats_string(char *info,
else {
*ofs += BLI_snprintf_rlen(info + *ofs,
len - *ofs,
TIP_("Verts:%s | Faces:%s | Tris:%s"),
RPT_("Verts:%s | Faces:%s | Tris:%s"),
stats_fmt->totvert,
stats_fmt->totface,
stats_fmt->tottri);
@ -629,7 +635,8 @@ static void get_stats_string(char *info,
if (!STREQ(&stats_fmt->totobj[0], "0")) {
*ofs += BLI_snprintf_rlen(info + *ofs,
len - *ofs,
TIP_(" | Objects:%s/%s"),
RPT_(" | Objects:%s/%s"),
stats_fmt->totobjsel,
stats_fmt->totobj);
}
@ -667,7 +674,8 @@ const char *ED_info_statusbar_string_ex(Main *bmain,
timecode, sizeof(timecode), -2, FRA2TIME(frame_count), FPS, U.timecode_style);
ofs += BLI_snprintf_rlen(info + ofs,
len - ofs,
TIP_("Duration: %s (Frame %i/%i)"),
RPT_("Duration: %s (Frame %i/%i)"),
timecode,
relative_current_frame,
frame_count);
@ -680,7 +688,7 @@ const char *ED_info_statusbar_string_ex(Main *bmain,
}
uintptr_t mem_in_use = MEM_get_memory_in_use();
BLI_str_format_byte_unit(formatted_mem, mem_in_use, false);
ofs += BLI_snprintf_rlen(info + ofs, len, TIP_("Memory: %s"), formatted_mem);
ofs += BLI_snprintf_rlen(info + ofs, len, RPT_("Memory: %s"), formatted_mem);
}
/* GPU VRAM status. */
@ -695,13 +703,14 @@ const char *ED_info_statusbar_string_ex(Main *bmain,
if (gpu_free_mem_kb && gpu_tot_mem_kb) {
ofs += BLI_snprintf_rlen(info + ofs,
len - ofs,
TIP_("VRAM: %.1f/%.1f GiB"),
RPT_("VRAM: %.1f/%.1f GiB"),
gpu_total_gb - gpu_free_gb,
gpu_total_gb);
}
else {
/* Can only show amount of GPU VRAM available. */
ofs += BLI_snprintf_rlen(info + ofs, len - ofs, TIP_("VRAM: %.1f GiB Free"), gpu_free_gb);
ofs += BLI_snprintf_rlen(info + ofs, len - ofs, RPT_("VRAM: %.1f GiB Free"), gpu_free_gb);
}
}
@ -710,7 +719,7 @@ const char *ED_info_statusbar_string_ex(Main *bmain,
if (info[0]) {
ofs += BLI_snprintf_rlen(info + ofs, len - ofs, " | ");
}
ofs += BLI_snprintf_rlen(info + ofs, len - ofs, TIP_("%s"), BKE_blender_version_string());
ofs += BLI_snprintf_rlen(info + ofs, len - ofs, RPT_("%s"), BKE_blender_version_string());
}
return info;
@ -785,18 +794,18 @@ void ED_info_draw_stats(
};
char labels[MAX_LABELS_COUNT][64];
STRNCPY_UTF8(labels[OBJ], IFACE_("Objects"));
STRNCPY_UTF8(labels[VERTS], IFACE_("Vertices"));
STRNCPY_UTF8(labels[EDGES], IFACE_("Edges"));
STRNCPY_UTF8(labels[FACES], IFACE_("Faces"));
STRNCPY_UTF8(labels[TRIS], IFACE_("Triangles"));
STRNCPY_UTF8(labels[JOINTS], IFACE_("Joints"));
STRNCPY_UTF8(labels[BONES], IFACE_("Bones"));
STRNCPY_UTF8(labels[LAYERS], IFACE_("Layers"));
STRNCPY_UTF8(labels[FRAMES], IFACE_("Frames"));
STRNCPY_UTF8(labels[STROKES], IFACE_("Strokes"));
STRNCPY_UTF8(labels[POINTS], IFACE_("Points"));
STRNCPY_UTF8(labels[LIGHTS], IFACE_("Lights"));
STRNCPY_UTF8(labels[OBJ], RPT_("Objects"));
STRNCPY_UTF8(labels[VERTS], RPT_("Vertices"));
STRNCPY_UTF8(labels[EDGES], RPT_("Edges"));
STRNCPY_UTF8(labels[FACES], RPT_("Faces"));
STRNCPY_UTF8(labels[TRIS], RPT_("Triangles"));
STRNCPY_UTF8(labels[JOINTS], RPT_("Joints"));
STRNCPY_UTF8(labels[BONES], RPT_("Bones"));
STRNCPY_UTF8(labels[LAYERS], RPT_("Layers"));
STRNCPY_UTF8(labels[FRAMES], RPT_("Frames"));
STRNCPY_UTF8(labels[STROKES], RPT_("Strokes"));
STRNCPY_UTF8(labels[POINTS], RPT_("Points"));
STRNCPY_UTF8(labels[LIGHTS], RPT_("Lights"));
int longest_label = 0;
for (int i = 0; i < MAX_LABELS_COUNT; ++i) {

View File

@ -2554,7 +2554,7 @@ static NodeExtraInfoRow row_from_used_named_attribute(
NodeExtraInfoRow row;
row.text = std::to_string(attributes_num) +
(attributes_num == 1 ? TIP_(" Named Attribute") : TIP_(" Named Attributes"));
(attributes_num == 1 ? RPT_(" Named Attribute") : RPT_(" Named Attributes"));
row.icon = ICON_SPREADSHEET;
row.tooltip_fn = named_attribute_tooltip;
row.tooltip_fn_arg = new NamedAttributeTooltipArg{usage_by_attribute_name};

View File

@ -939,7 +939,7 @@ static void ui_node_draw_input(uiLayout &layout,
}
if (dependency_loop) {
uiItemL(row, IFACE_("Dependency Loop"), ICON_ERROR);
uiItemL(row, RPT_("Dependency Loop"), ICON_ERROR);
add_dummy_decorator = true;
}
else if (lnode) {

View File

@ -2271,7 +2271,7 @@ static void outliner_draw_mode_column_toggle(uiBlock *block,
(ID_IS_OVERRIDE_LIBRARY_REAL(ob) &&
(ob->id.override_library->flag & LIBOVERRIDE_FLAG_SYSTEM_DEFINED) != 0))
{
UI_but_disable(but, TIP_("Can't edit library or non-editable override data"));
UI_but_disable(but, "Can't edit library or non-editable override data");
}
}

View File

@ -2145,7 +2145,7 @@ static int outliner_orphans_purge_invoke(bContext *C, wmOperator *op, const wmEv
}
DynStr *dyn_str = BLI_dynstr_new();
BLI_dynstr_appendf(dyn_str, TIP_("Purging %d unused data-blocks ("), num_tagged[INDEX_ID_NULL]);
BLI_dynstr_appendf(dyn_str, RPT_("Purging %d unused data-blocks ("), num_tagged[INDEX_ID_NULL]);
bool is_first = true;
for (int i = 0; i < INDEX_ID_MAX - 2; i++) {
if (num_tagged[i] != 0) {
@ -2158,10 +2158,10 @@ static int outliner_orphans_purge_invoke(bContext *C, wmOperator *op, const wmEv
BLI_dynstr_appendf(dyn_str,
"%d %s",
num_tagged[i],
TIP_(BKE_idtype_idcode_to_name_plural(BKE_idtype_idcode_from_index(i))));
RPT_(BKE_idtype_idcode_to_name_plural(BKE_idtype_idcode_from_index(i))));
}
}
BLI_dynstr_append(dyn_str, TIP_("). Click here to proceed..."));
BLI_dynstr_append(dyn_str, RPT_("). Click here to proceed..."));
char *message = BLI_dynstr_get_cstring(dyn_str);
int ret = WM_operator_confirm_message(C, op, message);

Some files were not shown because too many files have changed in this diff Show More