I18n: disambiguate a few messages

- "Lens" can be a transparent object used in cameras, or specifically
  its property of focal length
- "Empty" can be an adjective meaning void, or an object type. The
  latter is already disambiguated using `ID_ID`
- "New" and "Old" are adjectives that can have agreements in some
  languages
- "Modified" is an adjective that can have agreement in some languages
- "Clipping" can be a property of a camera, or a behavior of the
  mirror modifier
- "Value" in HSV nodes, see #105113
- "Area" in the Face Area geometry node, can mean a measurement or a
  window type
- "New" is an adjective that can have agreement
- "Tab" can be a UI element or a whitespace character
- "Volume" can mean a measurement or an object type. The latter is
  already disambiguated using `ID_ID`

These changes introduce the new `BLT_I18NCONTEXT_TIME` translation
context.

They also remove `BLT_I18NCONTEXT_VIRTUAL_REALITY`, which I added at
one point but then couldn't find which messages I wanted to fix with
it.

Ref #43295

Pull Request: #106718
This commit is contained in:
Damien Picard
2023-02-23 22:00:57 +01:00
committed by Bastien Montagne
parent c31434a570
commit 5cf365554b
42 changed files with 95 additions and 43 deletions
@@ -592,6 +592,7 @@ class NODE_MT_category_GEO_VECTOR(Menu):
class NODE_MT_category_GEO_VOLUME(Menu):
bl_idname = "NODE_MT_category_GEO_VOLUME"
bl_label = "Volume"
bl_translation_context = i18n_contexts.id_id
def draw(self, context):
layout = self.layout
@@ -1,6 +1,7 @@
# SPDX-License-Identifier: GPL-2.0-or-later
import bpy
from bpy.types import Panel
from bpy.app.translations import contexts as i18n_contexts
from rna_prop_ui import PropertyPanel
from bl_ui.utils import PresetPanel
@@ -67,6 +68,7 @@ class DATA_PT_context_camera(CameraButtonsPanel, Panel):
class DATA_PT_lens(CameraButtonsPanel, Panel):
bl_label = "Lens"
bl_translation_context = i18n_contexts.id_camera
COMPAT_ENGINES = {
'BLENDER_RENDER',
'BLENDER_EEVEE',
@@ -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 DataButtonsPanel:
@@ -15,6 +16,7 @@ class DataButtonsPanel:
class DATA_PT_empty(DataButtonsPanel, Panel):
bl_label = "Empty"
bl_translation_context = i18n_contexts.id_id
def draw(self, context):
layout = self.layout
@@ -1,5 +1,6 @@
# SPDX-License-Identifier: GPL-2.0-or-later
import bpy
from bpy.app.translations import contexts as i18n_contexts
from bpy.types import Panel
from rna_prop_ui import PropertyPanel
@@ -89,7 +90,7 @@ class DATA_PT_EEVEE_light(DataButtonsPanel, Panel):
col.prop(light, "diffuse_factor", text="Diffuse")
col.prop(light, "specular_factor", text="Specular")
col.prop(light, "volume_factor", text="Volume")
col.prop(light, "volume_factor", text="Volume", text_ctxt=i18n_contexts.id_id)
col.separator()
@@ -1,6 +1,7 @@
# SPDX-License-Identifier: GPL-2.0-or-later
import bpy
from bpy.types import Menu, Panel, UIList
from bpy.app.translations import contexts as i18n_contexts
from rna_prop_ui import PropertyPanel
from bpy_extras.node_utils import find_node_input
@@ -176,6 +177,7 @@ class EEVEE_MATERIAL_PT_surface(MaterialButtonsPanel, Panel):
class EEVEE_MATERIAL_PT_volume(MaterialButtonsPanel, Panel):
bl_label = "Volume"
bl_translation_context = i18n_contexts.id_id
bl_context = "material"
bl_options = {'DEFAULT_CLOSED'}
COMPAT_ENGINES = {'BLENDER_EEVEE'}
+2 -2
View File
@@ -164,8 +164,8 @@ class RENDER_PT_time_stretching(RenderOutputButtonsPanel, Panel):
rd = context.scene.render
col = layout.column(align=True)
col.prop(rd, "frame_map_old", text="Old")
col.prop(rd, "frame_map_new", text="New")
col.prop(rd, "frame_map_old", text="Old", text_ctxt=i18n_contexts.time)
col.prop(rd, "frame_map_new", text="New", text_ctxt=i18n_contexts.time)
class RENDER_PT_post_processing(RenderOutputButtonsPanel, Panel):
@@ -1,5 +1,6 @@
# SPDX-License-Identifier: GPL-2.0-or-later
from bpy.types import Menu, Panel, UIList, ViewLayer
from bpy.app.translations import contexts as i18n_contexts
from rna_prop_ui import PropertyPanel
@@ -140,7 +141,7 @@ class VIEWLAYER_PT_eevee_layer_passes_light(ViewLayerButtonsPanel, Panel):
col.prop(view_layer, "use_pass_glossy_direct", text="Light")
col.prop(view_layer, "use_pass_glossy_color", text="Color")
col = layout.column(heading="Volume", align=True)
col = layout.column(heading="Volume", heading_ctxt=i18n_contexts.id_id, align=True)
col.prop(view_layer_eevee, "use_pass_volume_direct", text="Light")
col = layout.column(heading="Other", align=True)
@@ -1,6 +1,7 @@
# SPDX-License-Identifier: GPL-2.0-or-later
import bpy
from bpy.types import Panel
from bpy.app.translations import contexts as i18n_contexts
from rna_prop_ui import PropertyPanel
from bpy_extras.node_utils import find_node_input
@@ -115,6 +116,7 @@ class EEVEE_WORLD_PT_surface(WorldButtonsPanel, Panel):
class EEVEE_WORLD_PT_volume(WorldButtonsPanel, Panel):
bl_label = "Volume"
bl_translation_context = i18n_contexts.id_id
bl_options = {'DEFAULT_CLOSED'}
COMPAT_ENGINES = {'BLENDER_EEVEE'}
+1
View File
@@ -890,6 +890,7 @@ class CLIP_PT_tracking_lens(Panel):
bl_region_type = 'UI'
bl_category = "Track"
bl_label = "Lens"
bl_translation_context = i18n_contexts.id_camera
bl_parent_id = 'CLIP_PT_tracking_camera'
bl_options = {'DEFAULT_CLOSED'}
+2 -2
View File
@@ -1762,7 +1762,7 @@ class SEQUENCER_PT_scene(SequencerButtonsPanel, Panel):
sub.use_property_decorate = True
split = sub.split(factor=0.4, align=True)
split.alignment = 'RIGHT'
split.label(text="Volume")
split.label(text="Volume", text_ctxt=i18n_contexts.id_sound)
split.prop(scene, "audio_volume", text="")
sub.use_property_decorate = False
@@ -1993,7 +1993,7 @@ class SEQUENCER_PT_adjust_sound(SequencerButtonsPanel, Panel):
split = col.split(factor=0.4)
split.alignment = 'RIGHT'
split.label(text="Volume")
split.label(text="Volume", text_ctxt=i18n_contexts.id_sound)
split.prop(strip, "volume", text="")
audio_channels = context.scene.render.ffmpeg.audio_channels
+1 -1
View File
@@ -418,7 +418,7 @@ class USERPREF_PT_edit_objects_duplicate_data(EditingPanel, CenterAlignMixIn, Pa
col.prop(edit, "use_duplicate_surface", text="Surface")
col.prop(edit, "use_duplicate_text", text="Text")
# col.prop(edit, "use_duplicate_texture", text="Texture") # Not implemented.
col.prop(edit, "use_duplicate_volume", text="Volume")
col.prop(edit, "use_duplicate_volume", text="Volume", text_ctxt=i18n_contexts.id_id)
class USERPREF_PT_edit_cursor(EditingPanel, CenterAlignMixIn, Panel):
+1 -1
View File
@@ -2310,7 +2310,7 @@ class VIEW3D_MT_add(Menu):
layout.operator("object.text_add", text="Text", icon='OUTLINER_OB_FONT')
if context.preferences.experimental.use_new_point_cloud_type:
layout.operator("object.pointcloud_add", text="Point Cloud", icon='OUTLINER_OB_POINTCLOUD')
layout.menu("VIEW3D_MT_volume_add", text="Volume", icon='OUTLINER_OB_VOLUME')
layout.menu("VIEW3D_MT_volume_add", text="Volume", text_ctxt=i18n_contexts.id_id, icon='OUTLINER_OB_VOLUME')
layout.operator_menu_enum("object.gpencil_add", "type", text="Grease Pencil", icon='OUTLINER_OB_GREASEPENCIL')
layout.separator()