From 38ad7650ac4f723fd6109e3f55b3ea1c47ec4af9 Mon Sep 17 00:00:00 2001 From: T-Bonhagen <75760084+T-Bonhagen@users.noreply.github.com> Date: Fri, 11 Dec 2020 18:42:59 +0100 Subject: new xml Tag for en and de (#708) * new xml Tag for en and de * add linux support for env LANG * precopiled header into TrueCrypt.fdp to substitute '_()' with 'LangString[]' * more LangString in Code * add Language xml's to Linux Setup location * backup language for linux is en * remove Language.en.xml install * rearange new xml lines to end * yes/no dialogs now translated * All OK/Cancel Button now support international Co-authored-by: tb@tbon.de --- src/Main/GraphicUserInterface.cpp | 21 +++++++++++---------- 1 file changed, 11 insertions(+), 10 deletions(-) (limited to 'src/Main/GraphicUserInterface.cpp') diff --git a/src/Main/GraphicUserInterface.cpp b/src/Main/GraphicUserInterface.cpp index f1bb87b2..04e98855 100755 --- a/src/Main/GraphicUserInterface.cpp +++ b/src/Main/GraphicUserInterface.cpp @@ -58,7 +58,7 @@ namespace VeraCrypt #ifdef TC_MACOSX g_customIdCmdV = wxNewId(); g_customIdCmdA = wxNewId(); - wxApp::s_macHelpMenuTitleName = _("&Help"); + wxApp::s_macHelpMenuTitleName = LangString["MENU_HELP"]; #endif } @@ -466,7 +466,7 @@ namespace VeraCrypt } else { - wxPasswordEntryDialog dialog (Gui->GetActiveWindow(), _("Enter your user password or administrator password:"), _("Administrator privileges required")); + wxPasswordEntryDialog dialog (Gui->GetActiveWindow(), LangString["LINUX_ADMIN_PW_QUERY"], LangString["LINUX_ADMIN_PW_QUERY_TITLE"]); if (dialog.ShowModal() != wxID_OK) throw UserAbort (SRC_POS); sValue = dialog.GetValue(); @@ -885,7 +885,7 @@ namespace VeraCrypt #ifdef TC_LINUX if (volume && !Preferences.NonInteractive && !Preferences.DisableKernelEncryptionModeWarning && volume->EncryptionModeName != L"XTS" - && !AskYesNo (LangString["ENCRYPTION_MODE_NOT_SUPPORTED_BY_KERNEL"] + _("\n\nDo you want to show this message next time you mount such a volume?"), true, true)) + && !AskYesNo (LangString["ENCRYPTION_MODE_NOT_SUPPORTED_BY_KERNEL"] + LangString["LINUX_MESSAGE_ON_MOUNT_AGAIN"], true, true)) { UserPreferences prefs = GetPreferences(); prefs.DisableKernelEncryptionModeWarning = true; @@ -986,7 +986,7 @@ namespace VeraCrypt if (write (showFifo, buf, 1) == 1) { close (showFifo); - Gui->ShowInfo (_("VeraCrypt is already running.")); + Gui->ShowInfo (LangString["LINUX_VC_RUNNING_ALREADY"]); Application::SetExitCode (0); return false; } @@ -1018,7 +1018,7 @@ namespace VeraCrypt wxLog::FlushActive(); Application::SetExitCode (1); - Gui->ShowInfo (_("VeraCrypt is already running.")); + Gui->ShowInfo (LangStrin["LINUX_VC_RUNNING_ALREADY"]); return false; #endif } @@ -1887,9 +1887,9 @@ namespace VeraCrypt else { if (style & wxICON_EXCLAMATION) - caption = wxString (_("Warning")) + L':'; + caption = wxString (LangString["LINUX_WARNING"]) + L':'; else if (style & wxICON_ERROR || style & wxICON_HAND) - caption = wxString (_("Error")) + L':'; + caption = wxString (LangString["LINUX_ERROR"]) + L':'; else caption.clear(); } @@ -1907,8 +1907,9 @@ namespace VeraCrypt style |= wxSTAY_ON_TOP; } - - return wxMessageBox (subMessage, caption, style, GetActiveWindow()); + wxMessageDialog cur(GetActiveWindow(), subMessage, caption, style); + cur.SetYesNoLabels(LangString["UISTR_YES"], LangString["UISTR_NO"]); + return (cur.ShowModal() == wxID_YES ? wxYES : wxNO) ; } } @@ -1923,7 +1924,7 @@ namespace VeraCrypt void GraphicUserInterface::ThrowTextModeRequired () const { - Gui->ShowError (_("This feature is currently supported only in text mode.")); + Gui->ShowError (LangString["LINUX_ONLY_TEXTMODE"]); throw UserAbort (SRC_POS); } -- cgit v1.2.3