From 436379860855fe2d1b073a74f4bfa4e7acc96c5b Mon Sep 17 00:00:00 2001 From: Juan Linietsky Date: Tue, 12 May 2015 07:31:15 -0300 Subject: -Fixed bug in translation remaps, also added proper demo, maybe fixes #1729 --- tools/editor/project_settings.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'tools') diff --git a/tools/editor/project_settings.cpp b/tools/editor/project_settings.cpp index 85adbd3a3b..08a1191f41 100644 --- a/tools/editor/project_settings.cpp +++ b/tools/editor/project_settings.cpp @@ -916,8 +916,8 @@ void ProjectSettings::_translation_res_option_changed() { ERR_FAIL_COND(!remaps.has(key)); - StringArray r = remaps[key]; - ERR_FAIL_INDEX(idx,remaps.size()); + StringArray r = remaps[key]; + ERR_FAIL_INDEX(idx,r.size()); r.set(idx,path+":"+langs[which]); remaps[key]=r; @@ -1095,6 +1095,7 @@ void ProjectSettings::_update_translations() { t2->set_editable(1,true); t2->set_metadata(1,path); int idx = langs.find(locale); + print_line("find "+locale+" at "+itos(idx)); if (idx<0) idx=0; -- cgit v1.2.3