aboutsummaryrefslogtreecommitdiff
path: root/core/src/Entrypoint
diff options
context:
space:
mode:
authorrtk0c <[email protected]>2021-06-11 13:35:35 -0700
committerrtk0c <[email protected]>2021-06-11 13:35:35 -0700
commit8f7daa9bd100345d7e23639604c9a3a50ce6448b (patch)
tree4b0c4934f29dfca933e1e955a8af2e61c2719ca1 /core/src/Entrypoint
parent222cfec6ad882196d8927f73e30d905daae89556 (diff)
Convert runtime-loaded l10n to string literals chosen at compile time
Diffstat (limited to 'core/src/Entrypoint')
-rw-r--r--core/src/Entrypoint/main.cpp11
1 files changed, 0 insertions, 11 deletions
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<LocaleStrings>(); });
- // 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<std::string>("--global-data-directory");
if (dataDirOption == "default") {
GlobalStates::Init();