From 8f7daa9bd100345d7e23639604c9a3a50ce6448b Mon Sep 17 00:00:00 2001 From: rtk0c Date: Fri, 11 Jun 2021 13:35:35 -0700 Subject: Convert runtime-loaded l10n to string literals chosen at compile time --- core/src/Entrypoint/main.cpp | 11 ----------- 1 file changed, 11 deletions(-) (limited to 'core/src/Entrypoint') diff --git a/core/src/Entrypoint/main.cpp b/core/src/Entrypoint/main.cpp index d6f2cdf..3cd3862 100644 --- a/core/src/Entrypoint/main.cpp +++ b/core/src/Entrypoint/main.cpp @@ -1,6 +1,5 @@ #include "Entrypoint/Backend.hpp" #include "Model/GlobalStates.hpp" -#include "UI/Localization.hpp" #include "UI/UI.hpp" #include "Utils/I18n.hpp" #include "Utils/ScopeGuard.hpp" @@ -140,16 +139,6 @@ int main(int argc, char* argv[]) io.Fonts->AddFontFromFileTTF("fonts/FontAwesome5-Solid.otf", 14, &config, iconRanges); } - // Initialize localization utilities - { - I18n::OnLanguageChange.Connect([]() { LocaleStrings::Instance = std::make_unique(); }); - // Do i18n initialization after linking reload signals, so that when SetLanguage() is called, the locale strings will be initialized (without us writing the code another time outside the slot) - I18n::Init(); - I18n::SetLanguage("zh_CN"); - // All of our usage are cached in XxxTranslation objects, no need to keep key -> entry mappings anymore - I18n::Unload(); - } - auto dataDirOption = parser.get("--global-data-directory"); if (dataDirOption == "default") { GlobalStates::Init(); -- cgit v1.2.3-70-g09d2