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:
2021-11-02 17:50:18 +01:00
parent 20b163b533
commit 29dff8f844
24 changed files with 67 additions and 57 deletions

View File

@@ -285,7 +285,7 @@ static void panel_draw(const bContext *UNUSED(C), Panel *panel)
PointerRNA *ptr = modifier_panel_get_property_pointers(panel, NULL);
uiItemL(layout, IFACE_("Settings are inside the Physics tab"), ICON_NONE);
uiItemL(layout, TIP_("Settings are inside the Physics tab"), ICON_NONE);
modifier_panel_end(layout, ptr);
}

View File

@@ -263,7 +263,7 @@ static void panel_draw(const bContext *UNUSED(C), Panel *panel)
PointerRNA *ptr = modifier_panel_get_property_pointers(panel, NULL);
uiItemL(layout, IFACE_("Settings are inside the Physics tab"), ICON_NONE);
uiItemL(layout, TIP_("Settings are inside the Physics tab"), ICON_NONE);
modifier_panel_end(layout, ptr);
}

View File

@@ -236,8 +236,8 @@ static void panel_draw(const bContext *UNUSED(C), Panel *panel)
PointerRNA *ptr = modifier_panel_get_property_pointers(panel, &ob_ptr);
int decimate_type = RNA_enum_get(ptr, "decimate_type");
char count_info[32];
snprintf(count_info, 32, "%s: %d", IFACE_("Face Count"), RNA_int_get(ptr, "face_count"));
char count_info[64];
snprintf(count_info, 32, TIP_("Face Count: %d"), RNA_int_get(ptr, "face_count"));
uiItemR(layout, ptr, "decimate_type", UI_ITEM_R_EXPAND, NULL, ICON_NONE);

View File

@@ -193,7 +193,7 @@ static void panel_draw(const bContext *UNUSED(C), Panel *panel)
PointerRNA *ptr = modifier_panel_get_property_pointers(panel, NULL);
uiItemL(layout, IFACE_("Settings are inside the Physics tab"), ICON_NONE);
uiItemL(layout, TIP_("Settings are inside the Physics tab"), ICON_NONE);
modifier_panel_end(layout, ptr);
}

View File

@@ -247,7 +247,7 @@ static void panel_draw(const bContext *UNUSED(C), Panel *panel)
PointerRNA *ptr = modifier_panel_get_property_pointers(panel, NULL);
uiItemL(layout, IFACE_("Settings are inside the Physics tab"), ICON_NONE);
uiItemL(layout, TIP_("Settings are inside the Physics tab"), ICON_NONE);
modifier_panel_end(layout, ptr);
}

View File

@@ -552,7 +552,7 @@ static void panel_draw(const bContext *UNUSED(C), Panel *panel)
modifier_panel_end(layout, ptr);
#else /* WITH_OCEANSIM */
uiItemL(layout, IFACE_("Built without Ocean modifier"), ICON_NONE);
uiItemL(layout, TIP_("Built without Ocean modifier"), ICON_NONE);
#endif /* WITH_OCEANSIM */
}

View File

@@ -277,7 +277,7 @@ static void panel_draw(const bContext *UNUSED(C), Panel *panel)
ModifierData *md = (ModifierData *)ptr->data;
ParticleSystem *psys = ((ParticleSystemModifierData *)md)->psys;
uiItemL(layout, IFACE_("Settings are in the particle tab"), ICON_NONE);
uiItemL(layout, TIP_("Settings are in the particle tab"), ICON_NONE);
if (!(ob->mode & OB_MODE_PARTICLE_EDIT)) {
if (ELEM(psys->part->ren_as, PART_DRAW_GR, PART_DRAW_OB)) {

View File

@@ -273,7 +273,7 @@ static void panel_draw(const bContext *UNUSED(C), Panel *panel)
modifier_panel_end(layout, ptr);
#else /* WITH_MOD_REMESH */
uiItemL(layout, IFACE_("Built without Remesh modifier"), ICON_NONE);
uiItemL(layout, TIP_("Built without Remesh modifier"), ICON_NONE);
#endif /* WITH_MOD_REMESH */
}

View File

@@ -92,7 +92,7 @@ static void panel_draw(const bContext *UNUSED(C), Panel *panel)
PointerRNA *ptr = modifier_panel_get_property_pointers(panel, NULL);
uiItemL(layout, IFACE_("Settings are inside the Physics tab"), ICON_NONE);
uiItemL(layout, TIP_("Settings are inside the Physics tab"), ICON_NONE);
modifier_panel_end(layout, ptr);
}

View File

@@ -27,6 +27,7 @@
#include "MEM_guardedalloc.h"
#include "BLI_string.h"
#include "BLI_utildefines.h"
#include "BLT_translation.h"
@@ -414,8 +415,12 @@ static void panel_draw(const bContext *C, Panel *panel)
float preview = MAX2(RNA_float_get(&cycles_ptr, "preview_dicing_rate") *
RNA_float_get(&ob_cycles_ptr, "dicing_rate"),
0.1f);
char output[64];
snprintf(output, 64, "Final Scale: Render %.2f px, Viewport %.2f px", render, preview);
char output[256];
BLI_snprintf(output,
sizeof(output),
TIP_("Final Scale: Render %.2f px, Viewport %.2f px"),
render,
preview);
uiItemL(layout, output, ICON_NONE);
uiItemS(layout);

View File

@@ -207,7 +207,7 @@ static void panel_draw(const bContext *UNUSED(C), Panel *panel)
PointerRNA *ptr = modifier_panel_get_property_pointers(panel, NULL);
uiItemL(layout, IFACE_("Settings are inside the Physics tab"), ICON_NONE);
uiItemL(layout, TIP_("Settings are inside the Physics tab"), ICON_NONE);
modifier_panel_end(layout, ptr);
}

View File

@@ -108,7 +108,7 @@ void modifier_panel_end(uiLayout *layout, PointerRNA *ptr)
ModifierData *md = ptr->data;
if (md->error) {
uiLayout *row = uiLayoutRow(layout, false);
uiItemL(row, IFACE_(md->error), ICON_ERROR);
uiItemL(row, TIP_(md->error), ICON_ERROR);
}
}