I18n: Disambiguate "Pattern"
- "Pattern" can mean type of texture. - It can also refer to refers to a type of matching wildcard. Issue reported by Hoang Duy Tran.
This commit is contained in:
committed by
Bastien Montagne
parent
5857000a65
commit
88dbe8dcd1
@@ -10,7 +10,10 @@ from bpy.props import (
|
||||
IntProperty,
|
||||
StringProperty,
|
||||
)
|
||||
from bpy.app.translations import pgettext_rpt as rpt_
|
||||
from bpy.app.translations import (
|
||||
pgettext_rpt as rpt_,
|
||||
contexts as i18n_contexts,
|
||||
)
|
||||
|
||||
|
||||
class SelectPattern(Operator):
|
||||
@@ -22,6 +25,7 @@ class SelectPattern(Operator):
|
||||
|
||||
pattern: StringProperty(
|
||||
name="Pattern",
|
||||
translation_context=i18n_contexts.id_text,
|
||||
description="Name filter using '*', '?' and "
|
||||
"'[abc]' unix style wildcards",
|
||||
maxlen=64,
|
||||
|
||||
@@ -74,6 +74,7 @@ class NODE_MT_category_texture_distort(Menu):
|
||||
class NODE_MT_category_texture_pattern(Menu):
|
||||
bl_idname = "NODE_MT_category_texture_pattern"
|
||||
bl_label = "Pattern"
|
||||
bl_translation_context = i18n_contexts.id_texture
|
||||
|
||||
def draw(self, _context):
|
||||
layout = self.layout
|
||||
|
||||
@@ -926,6 +926,7 @@ static void rna_def_texture_wood(BlenderRNA *brna)
|
||||
RNA_def_property_enum_sdna(prop, nullptr, "stype");
|
||||
RNA_def_property_enum_items(prop, prop_wood_stype);
|
||||
RNA_def_property_ui_text(prop, "Pattern", "");
|
||||
RNA_def_property_translation_context(prop, BLT_I18NCONTEXT_ID_TEXTURE);
|
||||
RNA_def_property_update(prop, 0, "rna_Texture_nodes_update");
|
||||
|
||||
prop = RNA_def_property(srna, "noise_basis_2", PROP_ENUM, PROP_NONE);
|
||||
@@ -995,6 +996,7 @@ static void rna_def_texture_marble(BlenderRNA *brna)
|
||||
RNA_def_property_enum_sdna(prop, nullptr, "stype");
|
||||
RNA_def_property_enum_items(prop, prop_marble_stype);
|
||||
RNA_def_property_ui_text(prop, "Pattern", "");
|
||||
RNA_def_property_translation_context(prop, BLT_I18NCONTEXT_ID_TEXTURE);
|
||||
RNA_def_property_update(prop, 0, "rna_Texture_nodes_update");
|
||||
|
||||
prop = RNA_def_property(srna, "noise_basis", PROP_ENUM, PROP_NONE);
|
||||
@@ -1129,6 +1131,7 @@ static void rna_def_texture_stucci(BlenderRNA *brna)
|
||||
RNA_def_property_enum_sdna(prop, nullptr, "stype");
|
||||
RNA_def_property_enum_items(prop, prop_stucci_stype);
|
||||
RNA_def_property_ui_text(prop, "Pattern", "");
|
||||
RNA_def_property_translation_context(prop, BLT_I18NCONTEXT_ID_TEXTURE);
|
||||
RNA_def_property_update(prop, 0, "rna_Texture_update");
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user