From 29dff8f84423852f01570334abf08fb922ffb51e Mon Sep 17 00:00:00 2001 From: Bastien Montagne Date: Tue, 2 Nov 2021 17:50:18 +0100 Subject: 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_`). --- source/blender/modifiers/intern/MOD_cloth.c | 2 +- source/blender/modifiers/intern/MOD_collision.c | 2 +- source/blender/modifiers/intern/MOD_decimate.c | 4 ++-- source/blender/modifiers/intern/MOD_dynamicpaint.c | 2 +- source/blender/modifiers/intern/MOD_fluid.c | 2 +- source/blender/modifiers/intern/MOD_ocean.c | 2 +- source/blender/modifiers/intern/MOD_particlesystem.c | 2 +- source/blender/modifiers/intern/MOD_remesh.c | 2 +- source/blender/modifiers/intern/MOD_softbody.c | 2 +- source/blender/modifiers/intern/MOD_subsurf.c | 9 +++++++-- source/blender/modifiers/intern/MOD_surface.c | 2 +- source/blender/modifiers/intern/MOD_ui_common.c | 2 +- 12 files changed, 19 insertions(+), 14 deletions(-) (limited to 'source/blender/modifiers') diff --git a/source/blender/modifiers/intern/MOD_cloth.c b/source/blender/modifiers/intern/MOD_cloth.c index cf0658d4b39..c9d5ef73c49 100644 --- a/source/blender/modifiers/intern/MOD_cloth.c +++ b/source/blender/modifiers/intern/MOD_cloth.c @@ -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); } diff --git a/source/blender/modifiers/intern/MOD_collision.c b/source/blender/modifiers/intern/MOD_collision.c index 521a93b199f..02e1f61b824 100644 --- a/source/blender/modifiers/intern/MOD_collision.c +++ b/source/blender/modifiers/intern/MOD_collision.c @@ -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); } diff --git a/source/blender/modifiers/intern/MOD_decimate.c b/source/blender/modifiers/intern/MOD_decimate.c index 56fcbbd8b7c..975f80a04f8 100644 --- a/source/blender/modifiers/intern/MOD_decimate.c +++ b/source/blender/modifiers/intern/MOD_decimate.c @@ -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); diff --git a/source/blender/modifiers/intern/MOD_dynamicpaint.c b/source/blender/modifiers/intern/MOD_dynamicpaint.c index 77ae5c4b6f1..a696ce216c7 100644 --- a/source/blender/modifiers/intern/MOD_dynamicpaint.c +++ b/source/blender/modifiers/intern/MOD_dynamicpaint.c @@ -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); } diff --git a/source/blender/modifiers/intern/MOD_fluid.c b/source/blender/modifiers/intern/MOD_fluid.c index e087b8411f8..a21eb603300 100644 --- a/source/blender/modifiers/intern/MOD_fluid.c +++ b/source/blender/modifiers/intern/MOD_fluid.c @@ -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); } diff --git a/source/blender/modifiers/intern/MOD_ocean.c b/source/blender/modifiers/intern/MOD_ocean.c index ff1055eff3b..4566cf93dd7 100644 --- a/source/blender/modifiers/intern/MOD_ocean.c +++ b/source/blender/modifiers/intern/MOD_ocean.c @@ -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 */ } diff --git a/source/blender/modifiers/intern/MOD_particlesystem.c b/source/blender/modifiers/intern/MOD_particlesystem.c index 71fc7f3e424..2a4cc1c2747 100644 --- a/source/blender/modifiers/intern/MOD_particlesystem.c +++ b/source/blender/modifiers/intern/MOD_particlesystem.c @@ -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)) { diff --git a/source/blender/modifiers/intern/MOD_remesh.c b/source/blender/modifiers/intern/MOD_remesh.c index fef1f76c051..937a73fddd9 100644 --- a/source/blender/modifiers/intern/MOD_remesh.c +++ b/source/blender/modifiers/intern/MOD_remesh.c @@ -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 */ } diff --git a/source/blender/modifiers/intern/MOD_softbody.c b/source/blender/modifiers/intern/MOD_softbody.c index 4187f9087a0..46e960e10d4 100644 --- a/source/blender/modifiers/intern/MOD_softbody.c +++ b/source/blender/modifiers/intern/MOD_softbody.c @@ -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); } diff --git a/source/blender/modifiers/intern/MOD_subsurf.c b/source/blender/modifiers/intern/MOD_subsurf.c index db0b769684e..7470f2abb15 100644 --- a/source/blender/modifiers/intern/MOD_subsurf.c +++ b/source/blender/modifiers/intern/MOD_subsurf.c @@ -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); diff --git a/source/blender/modifiers/intern/MOD_surface.c b/source/blender/modifiers/intern/MOD_surface.c index 3f2d0a06db8..c8be2bd2829 100644 --- a/source/blender/modifiers/intern/MOD_surface.c +++ b/source/blender/modifiers/intern/MOD_surface.c @@ -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); } diff --git a/source/blender/modifiers/intern/MOD_ui_common.c b/source/blender/modifiers/intern/MOD_ui_common.c index 5d564464e20..9937a2342c3 100644 --- a/source/blender/modifiers/intern/MOD_ui_common.c +++ b/source/blender/modifiers/intern/MOD_ui_common.c @@ -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); } } -- cgit v1.2.3