Fix i18n-related points in T47265 - mostly, fix non-translated items in enum-search popup menu.

This commit is contained in:
Bastien Montagne 2016-01-29 15:05:51 +01:00
parent d3989a3140
commit 75838de7c3
2 changed files with 3 additions and 3 deletions

View File

@ -4322,7 +4322,7 @@ static void operator_enum_search_cb(const struct bContext *C, void *but, const c
EnumPropertyItem *item, *item_array;
bool do_free;
RNA_property_enum_items((bContext *)C, ptr, prop, &item_array, NULL, &do_free);
RNA_property_enum_items_gettexted((bContext *)C, ptr, prop, &item_array, NULL, &do_free);
for (item = item_array; item->identifier; item++) {
/* note: need to give the index rather than the identifier because the enum can be freed */

View File

@ -4300,12 +4300,12 @@ static void headerTranslation(TransInfo *t, const float vec[3], char str[MAX_INF
if ((snode->flag & SNODE_SKIP_INSOFFSET) == 0) {
const char *str_old = BLI_strdup(str);
const char *str_dir = (snode->insert_ofs_dir == SNODE_INSERTOFS_DIR_RIGHT) ? "right" : "left";
const char *str_dir = (snode->insert_ofs_dir == SNODE_INSERTOFS_DIR_RIGHT) ? IFACE_("right") : IFACE_("left");
char str_km[MAX_INFO_LEN];
WM_modalkeymap_items_to_string(t->keymap, TFM_MODAL_INSERTOFS_TOGGLE_DIR, true, sizeof(str_km), str_km);
ofs += BLI_snprintf(str, MAX_INFO_LEN, "Auto-offset set to %s - press %s to toggle direction | %s",
ofs += BLI_snprintf(str, MAX_INFO_LEN, IFACE_("Auto-offset set to %s - press %s to toggle direction | %s"),
str_dir, str_km, str_old);
MEM_freeN((void *)str_old);