I18n: fix printf-style format translation in release/scripts/startup

Many reports and a few labels used string formatting without
explicitly calling tip_() or iface_(), so the untranslated message
was used instead of the translated one, even when it was extracted.

Differential Revision: https://developer.blender.org/D16405
This commit is contained in:
Damien Picard
2022-11-16 12:06:14 +01:00
committed by Bastien Montagne
parent 2683b74cb3
commit f415051a57
20 changed files with 139 additions and 103 deletions

View File

@@ -3,8 +3,10 @@ import bpy
from bpy.types import Menu, Panel, UIList
from rna_prop_ui import PropertyPanel
from bpy.app.translations import pgettext_tip as tip_
from bpy.app.translations import (
pgettext_tip as iface_,
pgettext_tip as tip_,
)
class MESH_MT_vertex_group_context_menu(Menu):
bl_label = "Vertex Group Specials"
@@ -549,7 +551,8 @@ class MESH_UL_attributes(UIList):
sub = split.row()
sub.alignment = 'RIGHT'
sub.active = False
sub.label(text="%s%s" % (domain_name, data_type.name))
sub.label(text="%s%s" % (iface_(domain_name), iface_(data_type.name)),
translate=False)
class DATA_PT_mesh_attributes(MeshButtonsPanel, Panel):
@@ -650,7 +653,8 @@ class MESH_UL_color_attributes(UIList, ColorAttributesListBase):
sub = split.row()
sub.alignment = 'RIGHT'
sub.active = False
sub.label(text="%s%s" % (domain_name, data_type.name))
sub.label(text="%s%s" % (iface_(domain_name), iface_(data_type.name)),
translate=False)
active_render = _index == data.color_attributes.render_color_index