From 30dc8889fef46b0ec1244a28d067f173fd22db9f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pa=CC=84vels=20Nadtoc=CC=8Cajevs?= <7645683+bruvzg@users.noreply.github.com> Date: Tue, 3 Feb 2026 19:13:16 +0200 Subject: [PATCH] [Export] Load translation files to check locale for ICU data export. (cherry picked from commit 1ea927cadcd7803af49cf2476512c6d91bfecd8a) --- editor/export/editor_export_platform.cpp | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/editor/export/editor_export_platform.cpp b/editor/export/editor_export_platform.cpp index ee4eb922dd..68a68b0088 100644 --- a/editor/export/editor_export_platform.cpp +++ b/editor/export/editor_export_platform.cpp @@ -44,6 +44,7 @@ #include "core/io/resource_uid.h" #include "core/math/random_pcg.h" #include "core/os/shared_object.h" +#include "core/string/translation_server.h" #include "core/version.h" #include "editor/editor_node.h" #include "editor/editor_string_names.h" @@ -1008,13 +1009,16 @@ Dictionary EditorExportPlatform::get_internal_export_files(const Ref translations = get_project_setting(p_preset, "internationalization/locale/translations"); - translations.push_back(get_project_setting(p_preset, "internationalization/locale/fallback")); for (const String &t : translations) { - if (TS->is_locale_using_support_data(t)) { + Ref tr = ResourceLoader::load(t); + if (tr.is_valid() && TS->is_locale_using_support_data(tr->get_locale())) { include_data = true; break; } } + if (TS->is_locale_using_support_data(get_project_setting(p_preset, "internationalization/locale/fallback"))) { + include_data = true; + } } if (include_data) { String ts_name = TS->get_support_data_filename();