Fix lots of missing messages i18n handling in uiItemL calls.
Also fix several wrong usages of `IFACE_` (as a reminder, error/info messages should use `TIP_`, not `IFACE_`).
This commit is contained in:
@@ -4450,7 +4450,7 @@ static void ui_def_but_rna__panel_type(bContext *C, uiLayout *layout, void *but_
|
||||
}
|
||||
else {
|
||||
char msg[256];
|
||||
SNPRINTF(msg, "Missing Panel: %s", panel_type);
|
||||
SNPRINTF(msg, TIP_("Missing Panel: %s"), panel_type);
|
||||
uiItemL(layout, msg, ICON_NONE);
|
||||
}
|
||||
}
|
||||
@@ -4479,7 +4479,7 @@ static void ui_def_but_rna__menu_type(bContext *C, uiLayout *layout, void *but_p
|
||||
}
|
||||
else {
|
||||
char msg[256];
|
||||
SNPRINTF(msg, "Missing Menu: %s", menu_type);
|
||||
SNPRINTF(msg, TIP_("Missing Menu: %s"), menu_type);
|
||||
uiItemL(layout, msg, ICON_NONE);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1339,7 +1339,7 @@ static void ui_item_menu_hold(struct bContext *C, ARegion *butregion, uiBut *but
|
||||
UI_menutype_draw(C, mt, layout);
|
||||
}
|
||||
else {
|
||||
uiItemL(layout, "Menu Missing:", ICON_NONE);
|
||||
uiItemL(layout, TIP_("Menu Missing:"), ICON_NONE);
|
||||
uiItemL(layout, menu_id, ICON_NONE);
|
||||
}
|
||||
UI_popup_menu_end(C, pup);
|
||||
|
||||
@@ -2743,7 +2743,7 @@ static void draw_constraint_header(uiLayout *layout, Object *ob, bConstraint *co
|
||||
uiItemR(row, &ptr, "name", 0, "", ICON_NONE);
|
||||
}
|
||||
else {
|
||||
uiItemL(row, con->name, ICON_NONE);
|
||||
uiItemL(row, IFACE_(con->name), ICON_NONE);
|
||||
}
|
||||
|
||||
/* proxy-protected constraints cannot be edited, so hide up/down + close buttons */
|
||||
@@ -6142,8 +6142,8 @@ void uiTemplateInputStatus(uiLayout *layout, struct bContext *C)
|
||||
uiLayout *row = uiLayoutRow(col, true);
|
||||
uiLayoutSetAlignment(row, UI_LAYOUT_ALIGN_LEFT);
|
||||
|
||||
const char *msg = WM_window_cursor_keymap_status_get(win, i, 0);
|
||||
const char *msg_drag = WM_window_cursor_keymap_status_get(win, i, 1);
|
||||
const char *msg = TIP_(WM_window_cursor_keymap_status_get(win, i, 0));
|
||||
const char *msg_drag = TIP_(WM_window_cursor_keymap_status_get(win, i, 1));
|
||||
|
||||
if (msg || (msg_drag == NULL)) {
|
||||
uiItemL(row, msg ? msg : "", (ICON_MOUSE_LMB + i));
|
||||
@@ -6498,12 +6498,15 @@ void uiTemplateCacheFile(uiLayout *layout,
|
||||
row = uiLayoutRow(layout, false);
|
||||
/* For Cycles, verify that experimental features are enabled. */
|
||||
if (BKE_scene_uses_cycles(scene) && !BKE_scene_uses_cycles_experimental_features(scene)) {
|
||||
uiItemL(row,
|
||||
"The Cycles Alembic Procedural is only available with the experimental feature set",
|
||||
ICON_INFO);
|
||||
uiItemL(
|
||||
row,
|
||||
TIP_(
|
||||
"The Cycles Alembic Procedural is only available with the experimental feature set"),
|
||||
ICON_INFO);
|
||||
}
|
||||
else {
|
||||
uiItemL(row, "The active render engine does not have an Alembic Procedural", ICON_INFO);
|
||||
uiItemL(
|
||||
row, TIP_("The active render engine does not have an Alembic Procedural"), ICON_INFO);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -660,7 +660,7 @@ void BasicTreeViewItem::add_label(uiLayout &layout, StringRefNull label_override
|
||||
if (icon == ICON_NONE && !is_collapsible()) {
|
||||
uiItemS_ex(&layout, 0.8f);
|
||||
}
|
||||
uiItemL(&layout, label.c_str(), icon);
|
||||
uiItemL(&layout, IFACE_(label.c_str()), icon);
|
||||
}
|
||||
|
||||
void BasicTreeViewItem::on_activate()
|
||||
|
||||
Reference in New Issue
Block a user