I18n: extract and disambiguate a few messages
Extract:
- Compositor error messages.
- `bUnitDef`s were broken after cleanup commit 2b77cd726d. Since each
unit's "display name" is now preceded by a consistent "name_display"
comment, the regex which extracts the unit is greatly simplified.
It now relies on the presence of the comment instead of the struct
order.
- "Preset" menu and "Apply Preset" button from the curveprofile
template.
- Operator labels from the catalog context menu.
Disambiguate:
- "Bake Data": can mean "Which data to bake" (verb), or "The data that
were baked" (noun).
- "Cache" in the Simulation Nodes panel is a verb, not a noun.
- "Mix" in the snapping menu is a noun, not a verb.
- "Top" and "Bottom" can mean the upper part of an object or the
highest point or element of something like a menu or list.
Pull Request: https://projects.blender.org/blender/blender/pulls/115963
This commit is contained in:
committed by
Bastien Montagne
parent
4ef5d9f60f
commit
faefaa4447
@@ -81,7 +81,10 @@
|
||||
|
||||
/* clang-format on */
|
||||
|
||||
/* Define a single unit. */
|
||||
/* Define a single unit.
|
||||
* When changing the format, please check that the PYGETTEXT_KEYWORDS regex
|
||||
* used to extract the unit names for translation still works
|
||||
* in scripts/modules/bl_i18n_utils/settings.py. */
|
||||
struct bUnitDef {
|
||||
const char *name;
|
||||
/** Abused a bit for the display name. */
|
||||
|
||||
@@ -18,6 +18,8 @@
|
||||
|
||||
#include "BLF_api.h"
|
||||
|
||||
#include "BLT_translation.h"
|
||||
|
||||
#include "BKE_colortools.h"
|
||||
#include "BKE_context.hh"
|
||||
#include "BKE_curve.hh"
|
||||
@@ -1151,7 +1153,7 @@ void DRW_draw_region_engine_info(int xoffset, int *yoffset, int line_height)
|
||||
BLF_shadow(font_id, 5, blender::float4{0.0f, 0.0f, 0.0f, 1.0f});
|
||||
BLF_shadow_offset(font_id, 1, -1);
|
||||
|
||||
const char *buf_step = data->info;
|
||||
const char *buf_step = IFACE_(data->info);
|
||||
do {
|
||||
const char *buf = buf_step;
|
||||
buf_step = BLI_strchr_or_end(buf, '\n');
|
||||
|
||||
@@ -5301,8 +5301,15 @@ static void CurveProfile_buttons_layout(uiLayout *layout, PointerRNA *ptr, RNAUp
|
||||
/* There is probably potential to use simpler "uiItemR" functions here, but automatic updating
|
||||
* after a preset is selected would be more complicated. */
|
||||
uiLayout *row = uiLayoutRow(layout, true);
|
||||
bt = uiDefBlockBut(
|
||||
block, CurveProfile_buttons_presets, profile, "Preset", 0, 0, UI_UNIT_X, UI_UNIT_X, "");
|
||||
bt = uiDefBlockBut(block,
|
||||
CurveProfile_buttons_presets,
|
||||
profile,
|
||||
IFACE_("Preset"),
|
||||
0,
|
||||
0,
|
||||
UI_UNIT_X,
|
||||
UI_UNIT_X,
|
||||
"");
|
||||
UI_but_funcN_set(bt, rna_update_cb, MEM_dupallocN(cb), nullptr);
|
||||
|
||||
/* Show a "re-apply" preset button when it has been changed from the preset. */
|
||||
@@ -5313,7 +5320,7 @@ static void CurveProfile_buttons_layout(uiLayout *layout, PointerRNA *ptr, RNAUp
|
||||
UI_BTYPE_BUT,
|
||||
0,
|
||||
ICON_NONE,
|
||||
"Apply Preset",
|
||||
IFACE_("Apply Preset"),
|
||||
0,
|
||||
0,
|
||||
UI_UNIT_X,
|
||||
|
||||
@@ -294,7 +294,7 @@ void AssetCatalogTreeViewItem::build_context_menu(bContext &C, uiLayout &column)
|
||||
|
||||
uiItemFullO(&column,
|
||||
"ASSET_OT_catalog_new",
|
||||
"New Catalog",
|
||||
IFACE_("New Catalog"),
|
||||
ICON_NONE,
|
||||
nullptr,
|
||||
WM_OP_INVOKE_DEFAULT,
|
||||
@@ -306,14 +306,14 @@ void AssetCatalogTreeViewItem::build_context_menu(bContext &C, uiLayout &column)
|
||||
BLI_uuid_format(catalog_id_str_buffer, catalog_item_.get_catalog_id());
|
||||
uiItemFullO(&column,
|
||||
"ASSET_OT_catalog_delete",
|
||||
"Delete Catalog",
|
||||
IFACE_("Delete Catalog"),
|
||||
ICON_NONE,
|
||||
nullptr,
|
||||
WM_OP_INVOKE_DEFAULT,
|
||||
UI_ITEM_NONE,
|
||||
&props);
|
||||
RNA_string_set(&props, "catalog_id", catalog_id_str_buffer);
|
||||
uiItemO(&column, "Rename", ICON_NONE, "UI_OT_view_item_rename");
|
||||
uiItemO(&column, IFACE_("Rename"), ICON_NONE, "UI_OT_view_item_rename");
|
||||
|
||||
/* Doesn't actually exist right now, but could be defined in Python. Reason that this isn't done
|
||||
* in Python yet is that catalogs are not exposed in BPY, and we'd somehow pass the clicked on
|
||||
|
||||
@@ -42,7 +42,7 @@ static void node_declare(NodeDeclarationBuilder &b)
|
||||
node_storage(node).mode = GEO_NODE_EXTRUDE_MESH_FACES;
|
||||
});
|
||||
b.add_output<decl::Geometry>("Mesh").propagate_all();
|
||||
b.add_output<decl::Bool>("Top").field_on_all();
|
||||
b.add_output<decl::Bool>("Top").field_on_all().translation_context(BLT_I18NCONTEXT_ID_NODETREE);
|
||||
b.add_output<decl::Bool>("Side").field_on_all();
|
||||
}
|
||||
|
||||
|
||||
@@ -52,8 +52,9 @@ static void node_declare(NodeDeclarationBuilder &b)
|
||||
.subtype(PROP_DISTANCE)
|
||||
.description("Height of the generated cone");
|
||||
b.add_output<decl::Geometry>("Mesh");
|
||||
b.add_output<decl::Bool>("Top").field_on_all();
|
||||
b.add_output<decl::Bool>("Bottom").field_on_all();
|
||||
b.add_output<decl::Bool>("Top").field_on_all().translation_context(BLT_I18NCONTEXT_ID_NODETREE);
|
||||
b.add_output<decl::Bool>("Bottom").field_on_all().translation_context(
|
||||
BLT_I18NCONTEXT_ID_NODETREE);
|
||||
b.add_output<decl::Bool>("Side").field_on_all();
|
||||
b.add_output<decl::Vector>("UV Map").field_on_all();
|
||||
}
|
||||
|
||||
@@ -47,9 +47,10 @@ static void node_declare(NodeDeclarationBuilder &b)
|
||||
.subtype(PROP_DISTANCE)
|
||||
.description("The height of the cylinder");
|
||||
b.add_output<decl::Geometry>("Mesh");
|
||||
b.add_output<decl::Bool>("Top").field_on_all();
|
||||
b.add_output<decl::Bool>("Top").field_on_all().translation_context(BLT_I18NCONTEXT_ID_NODETREE);
|
||||
b.add_output<decl::Bool>("Side").field_on_all();
|
||||
b.add_output<decl::Bool>("Bottom").field_on_all();
|
||||
b.add_output<decl::Bool>("Bottom").field_on_all().translation_context(
|
||||
BLT_I18NCONTEXT_ID_NODETREE);
|
||||
b.add_output<decl::Vector>("UV Map").field_on_all();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user