Fix T47045: add some missing UI i18n translations to texture buttons and freestyle render messages.

This commit is contained in:
Bastien Montagne 2015-12-28 17:46:48 +01:00
parent 6c99d342d8
commit 1dcae9e309
4 changed files with 26 additions and 15 deletions

@ -314,7 +314,7 @@ static void buttons_texture_modifier_foreach(void *userData, Object *ob, Modifie
prop = RNA_struct_find_property(&ptr, propname);
buttons_texture_user_property_add(users, &ob->id, ptr, prop,
"Modifiers", RNA_struct_ui_icon(ptr.type), md->name);
N_("Modifiers"), RNA_struct_ui_icon(ptr.type), md->name);
}
static void buttons_texture_users_from_context(ListBase *users, const bContext *C, SpaceButs *sbuts)
@ -366,13 +366,13 @@ static void buttons_texture_users_from_context(ListBase *users, const bContext *
BLI_listbase_clear(users);
if (ma && !limited_mode)
buttons_texture_users_find_nodetree(users, &ma->id, ma->nodetree, "Material");
buttons_texture_users_find_nodetree(users, &ma->id, ma->nodetree, N_("Material"));
if (la && !limited_mode)
buttons_texture_users_find_nodetree(users, &la->id, la->nodetree, "Lamp");
buttons_texture_users_find_nodetree(users, &la->id, la->nodetree, N_("Lamp"));
if (wrld && !limited_mode)
buttons_texture_users_find_nodetree(users, &wrld->id, wrld->nodetree, "World");
buttons_texture_users_find_nodetree(users, &wrld->id, wrld->nodetree, N_("World"));
if (linestyle && !limited_mode)
buttons_texture_users_find_nodetree(users, &linestyle->id, linestyle->nodetree, "Line Style");
buttons_texture_users_find_nodetree(users, &linestyle->id, linestyle->nodetree, N_("Line Style"));
if (ob) {
ParticleSystem *psys = psys_get_current(ob);
@ -394,8 +394,8 @@ static void buttons_texture_users_from_context(ListBase *users, const bContext *
RNA_pointer_create(&psys->part->id, &RNA_ParticleSettingsTextureSlot, mtex, &ptr);
prop = RNA_struct_find_property(&ptr, "texture");
buttons_texture_user_property_add(users, &psys->part->id, ptr, prop,
"Particles", RNA_struct_ui_icon(&RNA_ParticleSettings), psys->name);
buttons_texture_user_property_add(users, &psys->part->id, ptr, prop, N_("Particles"),
RNA_struct_ui_icon(&RNA_ParticleSettings), psys->name);
}
}
}
@ -409,7 +409,7 @@ static void buttons_texture_users_from_context(ListBase *users, const bContext *
prop = RNA_struct_find_property(&ptr, "texture");
buttons_texture_user_property_add(users, &ob->id, ptr, prop,
"Fields", ICON_FORCE_TEXTURE, "Texture Field");
N_("Fields"), ICON_FORCE_TEXTURE, IFACE_("Texture Field"));
}
}
@ -423,14 +423,14 @@ static void buttons_texture_users_from_context(ListBase *users, const bContext *
prop = RNA_struct_find_property(&ptr, "texture");
buttons_texture_user_property_add(users, &brush->id, ptr, prop,
"Brush", ICON_BRUSH_DATA, "Brush");
N_("Brush"), ICON_BRUSH_DATA, IFACE_("Brush"));
/* mask texture */
RNA_pointer_create(&brush->id, &RNA_BrushTextureSlot, &brush->mask_mtex, &ptr);
prop = RNA_struct_find_property(&ptr, "texture");
buttons_texture_user_property_add(users, &brush->id, ptr, prop,
"Brush", ICON_BRUSH_DATA, "Brush Mask");
N_("Brush"), ICON_BRUSH_DATA, IFACE_("Brush Mask"));
}
}
@ -563,7 +563,7 @@ static void template_texture_user_menu(bContext *C, uiLayout *layout, void *UNUS
/* add label per category */
if (!last_category || !STREQ(last_category, user->category)) {
uiItemL(layout, user->category, ICON_NONE);
uiItemL(layout, IFACE_(user->category), ICON_NONE);
but = block->buttons.last;
but->drawflag = UI_BUT_TEXT_LEFT;
}
@ -681,7 +681,7 @@ void uiTemplateTextureShow(uiLayout *layout, bContext *C, PointerRNA *ptr, Prope
uiBut *but;
but = uiDefIconBut(block, UI_BTYPE_BUT, 0, ICON_BUTS, 0, 0, UI_UNIT_X, UI_UNIT_Y,
NULL, 0.0, 0.0, 0.0, 0.0, "Show texture in texture tab");
NULL, 0.0, 0.0, 0.0, 0.0, TIP_("Show texture in texture tab"));
UI_but_func_set(but, template_texture_show, user->ptr.data, user->prop);
}
}

@ -556,6 +556,7 @@ set(INC
.
../blenkernel
../blenlib
../blentranslation
../imbuf
../makesdna
../makesrna
@ -574,6 +575,10 @@ set(INC_SYS
add_definitions(-DWITH_FREESTYLE)
if(WITH_INTERNATIONAL)
add_definitions(-DWITH_INTERNATIONAL)
endif()
if(WIN32)
list(APPEND INC_SYS
${PTHREADS_INC}

@ -9,6 +9,7 @@ incs = [
'#/extern/glew/include',
'../blenkernel',
'../blenlib',
'../blentranslation',
'../freestyle',
'../imbuf',
'../makesdna',
@ -27,6 +28,9 @@ defs = ['WITH_FREESTYLE']
if env['OURPLATFORM'] in ('win32-vc', 'win32-mingw', 'linuxcross', 'win64-vc'):
incs += ' ' + env['BF_PTHREADS_INC']
if env['WITH_BF_INTERNATIONAL']:
defs.append('WITH_INTERNATIONAL')
########################################################
# folders sources
########################################################

@ -54,6 +54,8 @@ extern "C" {
#include "BKE_text.h"
#include "BKE_context.h"
#include "BLT_translation.h"
#include "BLI_blenlib.h"
#include "BLI_math.h"
#include "BLI_callbacks.h"
@ -284,7 +286,7 @@ static bool test_edge_type_conditions(struct edge_type_condition *conditions,
static void prepare(Render *re, SceneRenderLayer *srl)
{
// load mesh
re->i.infostr = "Freestyle: Mesh loading";
re->i.infostr = TIP_("Freestyle: Mesh loading");
re->stats_draw(re->sdh, &re->i);
re->i.infostr = NULL;
if (controller->LoadMesh(re, srl)) // returns if scene cannot be loaded or if empty
@ -467,7 +469,7 @@ static void prepare(Render *re, SceneRenderLayer *srl)
return;
// compute view map
re->i.infostr = "Freestyle: View map creation";
re->i.infostr = TIP_("Freestyle: View map creation");
re->stats_draw(re->sdh, &re->i);
re->i.infostr = NULL;
controller->ComputeViewMap();
@ -622,7 +624,7 @@ Render *FRS_do_stroke_rendering(Render *re, SceneRenderLayer *srl, int render)
// render and composite Freestyle result
if (controller->_ViewMap) {
// render strokes
re->i.infostr = "Freestyle: Stroke rendering";
re->i.infostr = TIP_("Freestyle: Stroke rendering");
re->stats_draw(re->sdh, &re->i);
re->i.infostr = NULL;
g_freestyle.scene = re->scene;