I18n: extract and disambiguate a few messages
Extract: - EEVEE: Compiling Shaders (the same message exists in EEVEE Next, but it uses string concatenation and I don't know yet how to deal with those--see T92758) Disambiguate: - Pan (audio, camera) - Box (TextSequence) - Mix (noun in constraints, GP materials) - Volume (object type, file system) - Floor (math integer part, 3D viewport horizontal plane) - Impossible to disambiguate the constraint name because bConstraintTypeInfo doesn't have a context field. - Show Overlay (in the sequence editor, use the same message as other editors to avoid a confusion with the Frame Overlay feature, also called "Show Overlay") Additionally, fix a few issues reported by Joan Pujolar (@jpujolar) in T101830. Reviewed By: mont29 Differential Revision: https://developer.blender.org/D17114
This commit is contained in:
parent
75c772391d
commit
db87e2a638
Notes:
blender-bot
2023-02-13 23:16:02 +01:00
Referenced by commit1649921791
, Fix: Sequencer "Pan" label using incorrect keyword 'heading_ctxt' Referenced by commit31a6400279
, Fix error referencing transition context which doesn't exist
|
@ -1,5 +1,6 @@
|
|||
# SPDX-License-Identifier: GPL-2.0-or-later
|
||||
from bpy.types import Panel
|
||||
from bpy.app.translations import contexts as i18n_contexts
|
||||
|
||||
|
||||
class ObjectConstraintPanel:
|
||||
|
@ -397,7 +398,7 @@ class ConstraintButtonsPanel:
|
|||
sub.prop(con, "invert_z", text="Z", toggle=True)
|
||||
row.label(icon='BLANK1')
|
||||
|
||||
layout.prop(con, "mix_mode", text="Mix")
|
||||
layout.prop(con, "mix_mode", text="Mix", text_ctxt=i18n_contexts.constraint)
|
||||
|
||||
self.space_template(layout, con)
|
||||
|
||||
|
@ -488,7 +489,7 @@ class ConstraintButtonsPanel:
|
|||
self.target_template(layout, con)
|
||||
|
||||
layout.prop(con, "remove_target_shear")
|
||||
layout.prop(con, "mix_mode", text="Mix")
|
||||
layout.prop(con, "mix_mode", text="Mix", text_ctxt=i18n_contexts.constraint)
|
||||
|
||||
self.space_template(layout, con)
|
||||
|
||||
|
@ -513,7 +514,7 @@ class ConstraintButtonsPanel:
|
|||
subsub.prop(con, "eval_time", text="")
|
||||
row.prop_decorator(con, "eval_time")
|
||||
|
||||
layout.prop(con, "mix_mode", text="Mix")
|
||||
layout.prop(con, "mix_mode", text="Mix", text_ctxt=i18n_contexts.constraint)
|
||||
|
||||
self.draw_influence(layout, con)
|
||||
|
||||
|
@ -1024,7 +1025,7 @@ class ConstraintButtonsSubPanel:
|
|||
col.prop(con, "to_min_z" + ext, text="Min")
|
||||
col.prop(con, "to_max_z" + ext, text="Max")
|
||||
|
||||
layout.prop(con, "mix_mode" + ext, text="Mix")
|
||||
layout.prop(con, "mix_mode" + ext, text="Mix", text_ctxt=i18n_contexts.constraint)
|
||||
|
||||
def draw_armature_bones(self, context):
|
||||
layout = self.layout
|
||||
|
|
|
@ -8,6 +8,8 @@ from bpy_extras import (
|
|||
asset_utils,
|
||||
)
|
||||
|
||||
from bpy.app.translations import contexts as i18n_contexts
|
||||
|
||||
|
||||
class FILEBROWSER_HT_header(Header):
|
||||
bl_space_type = 'FILE_BROWSER'
|
||||
|
@ -229,6 +231,7 @@ class FILEBROWSER_PT_bookmarks_volumes(Panel):
|
|||
bl_region_type = 'TOOLS'
|
||||
bl_category = "Bookmarks"
|
||||
bl_label = "Volumes"
|
||||
bl_translation_context = i18n_contexts.editor_filebrowser
|
||||
|
||||
@classmethod
|
||||
def poll(cls, context):
|
||||
|
|
|
@ -1579,7 +1579,7 @@ class SEQUENCER_PT_effect_text_style(SequencerButtonsPanel, Panel):
|
|||
subsub.prop(strip, "shadow_color", text="")
|
||||
row.prop_decorator(strip, "shadow_color")
|
||||
|
||||
row = layout.row(align=True, heading="Box")
|
||||
row = layout.row(align=True, heading="Box", heading_ctxt=i18n_contexts.id_sequence)
|
||||
row.use_property_decorate = False
|
||||
sub = row.row(align=True)
|
||||
sub.prop(strip, "use_box", text="")
|
||||
|
@ -1996,7 +1996,7 @@ class SEQUENCER_PT_adjust_sound(SequencerButtonsPanel, Panel):
|
|||
|
||||
split = col.split(factor=0.4)
|
||||
split.alignment = 'RIGHT'
|
||||
split.label(text="Pan")
|
||||
split.label(text="Pan", heading_ctxt=i18n_contexts.id_sound)
|
||||
split.prop(strip, "pan", text="")
|
||||
split.enabled = pan_enabled
|
||||
|
||||
|
|
|
@ -2246,6 +2246,7 @@ class VIEW3D_MT_camera_add(Menu):
|
|||
class VIEW3D_MT_volume_add(Menu):
|
||||
bl_idname = "VIEW3D_MT_volume_add"
|
||||
bl_label = "Volume"
|
||||
bl_translation_context = i18n_contexts.id_id
|
||||
|
||||
def draw(self, _context):
|
||||
layout = self.layout
|
||||
|
@ -6293,7 +6294,7 @@ class VIEW3D_PT_overlay_guides(Panel):
|
|||
(view.region_3d.is_orthographic_side_view and not view.region_3d.is_perspective)
|
||||
)
|
||||
row_el.active = grid_active
|
||||
row.prop(overlay, "show_floor", text="Floor")
|
||||
row.prop(overlay, "show_floor", text="Floor", text_ctxt=i18n_contexts.editor_view3d)
|
||||
|
||||
if overlay.show_floor or overlay.show_ortho_grid:
|
||||
sub = col.row(align=True)
|
||||
|
|
|
@ -124,6 +124,7 @@ const char *BLT_translate_do_new_dataname(const char *msgctxt, const char *msgid
|
|||
|
||||
/* Editors-types contexts. */
|
||||
#define BLT_I18NCONTEXT_EDITOR_VIEW3D "View3D"
|
||||
#define BLT_I18NCONTEXT_EDITOR_FILEBROWSER "File browser"
|
||||
|
||||
/* Helper for bpy.app.i18n object... */
|
||||
typedef struct {
|
||||
|
@ -188,6 +189,7 @@ typedef struct {
|
|||
BLT_I18NCONTEXTS_ITEM(BLT_I18NCONTEXT_ID_WORKSPACE, "id_workspace"), \
|
||||
BLT_I18NCONTEXTS_ITEM(BLT_I18NCONTEXT_ID_WINDOWMANAGER, "id_windowmanager"), \
|
||||
BLT_I18NCONTEXTS_ITEM(BLT_I18NCONTEXT_EDITOR_VIEW3D, "editor_view3d"), \
|
||||
BLT_I18NCONTEXTS_ITEM(BLT_I18NCONTEXT_EDITOR_FILEBROWSER, "editor_filebrowser"), \
|
||||
{ \
|
||||
NULL, NULL, NULL \
|
||||
} \
|
||||
|
|
|
@ -11,6 +11,8 @@
|
|||
|
||||
#include "BLI_rand.h"
|
||||
|
||||
#include "BLT_translation.h"
|
||||
|
||||
#include "BKE_object.h"
|
||||
|
||||
#include "DEG_depsgraph_query.h"
|
||||
|
@ -174,7 +176,7 @@ static void eevee_cache_finish(void *vedata)
|
|||
}
|
||||
|
||||
if (g_data->queued_shaders_count > 0) {
|
||||
SNPRINTF(ved->info, "Compiling Shaders (%d remaining)", g_data->queued_shaders_count);
|
||||
SNPRINTF(ved->info, TIP_("Compiling Shaders (%d remaining)"), g_data->queued_shaders_count);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -13,6 +13,8 @@
|
|||
|
||||
#include "BLI_math.h"
|
||||
|
||||
#include "BLT_translation.h"
|
||||
|
||||
#include "BKE_customdata.h"
|
||||
|
||||
#include "RNA_define.h"
|
||||
|
@ -530,6 +532,7 @@ static void rna_def_material_greasepencil(BlenderRNA *brna)
|
|||
RNA_def_property_float_sdna(prop, NULL, "mix_factor");
|
||||
RNA_def_property_range(prop, 0.0f, 1.0f);
|
||||
RNA_def_property_ui_text(prop, "Mix", "Mix Factor");
|
||||
RNA_def_property_translation_context(prop, BLT_I18NCONTEXT_ID_GPENCIL);
|
||||
RNA_def_property_update(prop, NC_GPENCIL | ND_SHADING, "rna_MaterialGpencil_update");
|
||||
|
||||
/* Stroke Mix factor */
|
||||
|
@ -537,6 +540,7 @@ static void rna_def_material_greasepencil(BlenderRNA *brna)
|
|||
RNA_def_property_float_sdna(prop, NULL, "mix_stroke_factor");
|
||||
RNA_def_property_range(prop, 0.0f, 1.0f);
|
||||
RNA_def_property_ui_text(prop, "Mix", "Mix Stroke Factor");
|
||||
RNA_def_property_translation_context(prop, BLT_I18NCONTEXT_ID_GPENCIL);
|
||||
RNA_def_property_update(prop, NC_GPENCIL | ND_SHADING, "rna_MaterialGpencil_update");
|
||||
|
||||
/* Texture angle */
|
||||
|
|
|
@ -6826,7 +6826,7 @@ static void rna_def_modifier_normaledit(BlenderRNA *brna)
|
|||
prop = RNA_def_property(srna, "mix_factor", PROP_FLOAT, PROP_FACTOR);
|
||||
RNA_def_property_range(prop, 0.0, 1.0);
|
||||
RNA_def_property_ui_text(
|
||||
prop, "Mix Factor", "How much of generated normals to mix with exiting ones");
|
||||
prop, "Mix Factor", "How much of generated normals to mix with existing ones");
|
||||
RNA_def_property_update(prop, 0, "rna_Modifier_update");
|
||||
|
||||
prop = RNA_def_property(srna, "mix_limit", PROP_FLOAT, PROP_ANGLE);
|
||||
|
|
|
@ -954,7 +954,7 @@ static void rna_api_nlatrack_strips(BlenderRNA *brna, PropertyRNA *cprop)
|
|||
RNA_def_property_srna(cprop, "NlaStrips");
|
||||
srna = RNA_def_struct(brna, "NlaStrips", NULL);
|
||||
RNA_def_struct_sdna(srna, "NlaTrack");
|
||||
RNA_def_struct_ui_text(srna, "Nla Strips", "Collection of Nla Strips");
|
||||
RNA_def_struct_ui_text(srna, "NLA Strips", "Collection of NLA Strips");
|
||||
|
||||
func = RNA_def_function(srna, "new", "rna_NlaStrip_new");
|
||||
RNA_def_function_flag(func,
|
||||
|
@ -994,7 +994,7 @@ static void rna_def_nlatrack(BlenderRNA *brna)
|
|||
|
||||
srna = RNA_def_struct(brna, "NlaTrack", NULL);
|
||||
RNA_def_struct_ui_text(
|
||||
srna, "NLA Track", "A animation layer containing Actions referenced as NLA strips");
|
||||
srna, "NLA Track", "An animation layer containing Actions referenced as NLA strips");
|
||||
RNA_def_struct_ui_icon(srna, ICON_NLA);
|
||||
|
||||
/* strips collection */
|
||||
|
|
|
@ -4968,6 +4968,7 @@ static void def_float_to_int(StructRNA *srna)
|
|||
RNA_def_property_enum_items(prop, rna_enum_node_float_to_int_items);
|
||||
RNA_def_property_ui_text(
|
||||
prop, "Rounding Mode", "Method used to convert the float to an integer");
|
||||
RNA_def_property_translation_context(prop, BLT_I18NCONTEXT_ID_NODETREE);
|
||||
RNA_def_property_update(prop, NC_NODE | NA_EDITED, "rna_Node_update");
|
||||
}
|
||||
|
||||
|
@ -4979,6 +4980,7 @@ static void def_vector_math(StructRNA *srna)
|
|||
RNA_def_property_enum_sdna(prop, NULL, "custom1");
|
||||
RNA_def_property_enum_items(prop, rna_enum_node_vec_math_items);
|
||||
RNA_def_property_ui_text(prop, "Operation", "");
|
||||
RNA_def_struct_translation_context(srna, BLT_I18NCONTEXT_ID_NODETREE);
|
||||
RNA_def_property_update(prop, NC_NODE | NA_EDITED, "rna_ShaderNode_socket_update");
|
||||
}
|
||||
|
||||
|
|
|
@ -2840,6 +2840,7 @@ static void rna_def_sound(BlenderRNA *brna)
|
|||
RNA_def_property_range(prop, -FLT_MAX, FLT_MAX);
|
||||
RNA_def_property_ui_range(prop, -2, 2, 1, 2);
|
||||
RNA_def_property_ui_text(prop, "Pan", "Playback panning of the sound (only for Mono sources)");
|
||||
RNA_def_property_translation_context(prop, BLT_I18NCONTEXT_ID_SOUND);
|
||||
RNA_def_property_float_funcs(prop, NULL, NULL, "rna_Sequence_pan_range");
|
||||
RNA_def_property_update(prop, NC_SCENE | ND_SEQUENCER, "rna_Sequence_audio_update");
|
||||
|
||||
|
@ -3223,6 +3224,7 @@ static void rna_def_text(StructRNA *srna)
|
|||
prop = RNA_def_property(srna, "use_box", PROP_BOOLEAN, PROP_NONE);
|
||||
RNA_def_property_boolean_sdna(prop, NULL, "flag", SEQ_TEXT_BOX);
|
||||
RNA_def_property_ui_text(prop, "Box", "Display colored box behind text");
|
||||
RNA_def_property_translation_context(prop, BLT_I18NCONTEXT_ID_SEQUENCE);
|
||||
RNA_def_property_update(prop, NC_SCENE | ND_SEQUENCER, "rna_Sequence_invalidate_raw_update");
|
||||
|
||||
prop = RNA_def_property(srna, "use_bold", PROP_BOOLEAN, PROP_NONE);
|
||||
|
|
|
@ -5934,7 +5934,7 @@ static void rna_def_space_sequencer(BlenderRNA *brna)
|
|||
/* Overlay settings. */
|
||||
prop = RNA_def_property(srna, "show_overlays", PROP_BOOLEAN, PROP_NONE);
|
||||
RNA_def_property_boolean_sdna(prop, NULL, "flag", SEQ_SHOW_OVERLAY);
|
||||
RNA_def_property_ui_text(prop, "Show Overlay", "");
|
||||
RNA_def_property_ui_text(prop, "Show Overlays", "");
|
||||
RNA_def_property_update(prop, NC_SPACE | ND_SPACE_SEQUENCER, NULL);
|
||||
|
||||
prop = RNA_def_property(srna, "preview_overlay", PROP_POINTER, PROP_NONE);
|
||||
|
|
Loading…
Reference in New Issue