You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-05 12:10:55 +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:
@@ -689,6 +689,7 @@ Error ResourceInteractiveLoaderBinary::poll() {
|
||||
|
||||
f->close();
|
||||
resource = res;
|
||||
resource->set_as_translation_remapped(translation_remapped);
|
||||
error = ERR_FILE_EOF;
|
||||
|
||||
} else {
|
||||
@@ -706,6 +707,11 @@ int ResourceInteractiveLoaderBinary::get_stage_count() const {
|
||||
return external_resources.size() + internal_resources.size();
|
||||
}
|
||||
|
||||
void ResourceInteractiveLoaderBinary::set_translation_remapped(bool p_remapped) {
|
||||
|
||||
translation_remapped = p_remapped;
|
||||
}
|
||||
|
||||
static void save_ustring(FileAccess *f, const String &p_string) {
|
||||
|
||||
CharString utf8 = p_string.utf8();
|
||||
@@ -920,6 +926,7 @@ ResourceInteractiveLoaderBinary::ResourceInteractiveLoaderBinary() {
|
||||
endian_swap = false;
|
||||
use_real64 = false;
|
||||
error = OK;
|
||||
translation_remapped = false;
|
||||
}
|
||||
|
||||
ResourceInteractiveLoaderBinary::~ResourceInteractiveLoaderBinary() {
|
||||
|
||||
Reference in New Issue
Block a user