1
0
mirror of https://github.com/godotengine/godot.git synced 2025-11-15 13:51:40 +00:00

Reworked translation system

-Label and Button reload translation on the fly
-Resources are loaded and reload depending on locale
This commit is contained in:
Juan Linietsky
2017-06-28 17:00:18 -03:00
parent 9e54e1f34f
commit db3b05d289
23 changed files with 248 additions and 52 deletions

View File

@@ -65,7 +65,12 @@ void Label::_notification(int p_what) {
if (p_what == NOTIFICATION_TRANSLATION_CHANGED) {
xl_text = XL_MESSAGE(text);
String new_text = XL_MESSAGE(text);
if (new_text == xl_text)
return; //nothing new
xl_text = new_text;
regenerate_word_cache();
minimum_size_changed();
update();
}