Implement localization all throughout ImHex

English only for now, additional languages will come in the future
This commit is contained in:
WerWolv
2021-02-11 23:09:45 +01:00
parent 9227fba474
commit 36a4930b35
26 changed files with 897 additions and 403 deletions

View File

@@ -29,26 +29,27 @@ namespace hex {
void ViewHelp::drawAboutPopup() {
if (ImGui::BeginPopupModal("About", &this->m_aboutWindowOpen, ImGuiWindowFlags_AlwaysAutoResize)) {
if (ImGui::BeginPopupModal("hex.view.help.about.title"_lang, &this->m_aboutWindowOpen, ImGuiWindowFlags_AlwaysAutoResize)) {
ImGui::Text("ImHex Hex Editor v%s by WerWolv -", IMHEX_VERSION);
#if defined(GIT_BRANCH) && defined(GIT_COMMIT_HASH)
ImGui::SameLine();
if (ImGui::Hyperlink(hex::format("%s@%s", GIT_BRANCH, GIT_COMMIT_HASH).c_str()))
hex::openWebpage("https://github.com/WerWolv/ImHex/commit/" GIT_COMMIT_HASH);
#endif
ImGui::TextUnformatted("hex.view.help.about.translator"_lang);
ImGui::TextUnformatted("Source code available on GitHub:"); ImGui::SameLine();
ImGui::TextUnformatted("hex.view.help.about.source"_lang); ImGui::SameLine();
if (ImGui::Hyperlink("WerWolv/ImHex"))
hex::openWebpage("https://github.com/WerWolv/ImHex");
ImGui::NewLine();
ImGui::Text("Donations");
ImGui::Text("hex.view.help.about.donations"_lang);
ImGui::Separator();
constexpr const char* Links[] = { "https://werwolv.net/donate", "https://www.patreon.com/werwolv", "https://github.com/sponsors/WerWolv" };
ImGui::TextWrapped("If you like my work, please consider donating to keep the project going. Thanks a lot <3");
ImGui::TextWrapped("hex.view.help.about.thanks"_lang);
ImGui::NewLine();
@@ -58,7 +59,7 @@ namespace hex {
}
ImGui::NewLine();
ImGui::Text("Libraries used");
ImGui::Text("hex.view.help.about.libs"_lang);
ImGui::Separator();
ImGui::PushStyleColor(ImGuiCol_ChildBg, ImVec4(0.2F, 0.2F, 0.2F, 0.3F));
ImGui::BulletText("ImGui by ocornut");