VeraCrypt
aboutsummaryrefslogtreecommitdiff
path: root/src/Main/Forms/MainFrame.cpp
diff options
context:
space:
mode:
authorT-Bonhagen <75760084+T-Bonhagen@users.noreply.github.com>2020-12-11 18:42:59 +0100
committerGitHub <noreply@github.com>2020-12-11 18:42:59 +0100
commit38ad7650ac4f723fd6109e3f55b3ea1c47ec4af9 (patch)
tree5d70c7e1afc0fe83dae7a55d3dd62af18593aeff /src/Main/Forms/MainFrame.cpp
parentcb7adbfa26a5f47c5ef6dfd5bea46545480656f1 (diff)
downloadVeraCrypt-38ad7650ac4f723fd6109e3f55b3ea1c47ec4af9.tar.gz
VeraCrypt-38ad7650ac4f723fd6109e3f55b3ea1c47ec4af9.zip
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 <tb@tbon.de>
Diffstat (limited to 'src/Main/Forms/MainFrame.cpp')
-rw-r--r--src/Main/Forms/MainFrame.cpp45
1 files changed, 23 insertions, 22 deletions
diff --git a/src/Main/Forms/MainFrame.cpp b/src/Main/Forms/MainFrame.cpp
index 417c2a63..b744ebbd 100644
--- a/src/Main/Forms/MainFrame.cpp
+++ b/src/Main/Forms/MainFrame.cpp
@@ -219,7 +219,7 @@ namespace VeraCrypt
L"cmd.exe", args.c_str(), nullptr, SW_SHOW);
#else
# ifdef TC_MACOSX
- Gui->ShowInfo (_("Disk Utility will be launched after you press 'OK'.\n\nPlease select your volume in the Disk Utility window and press 'Verify Disk' or 'Repair Disk' button on the 'First Aid' page."));
+ Gui->ShowInfo (LangString["LINUX_FIRST_AID"]);
# endif
Core->CheckFilesystem (selectedVolume, repair);
UpdateVolumeList();
@@ -282,15 +282,15 @@ namespace VeraCrypt
VolumeStaticBoxSizer->Detach (VolumeGridBagSizer);
VolumeStaticBoxSizer->Add (VolumeGridBagSizer, 1, wxEXPAND, 0);
- ExitButton->SetLabel (_("Close"));
- MountAllDevicesButton->SetLabel (_("Mount All Devices"));
+ ExitButton->SetLabel (LangString["CLOSE"]);
+ MountAllDevicesButton->SetLabel (LangString["LINUX_MOUNT_ALL_DEV"]);
#endif
#ifdef TC_WINDOWS
SlotListCtrl->InsertColumn (ColumnSlot, LangString["DRIVE"], wxLIST_FORMAT_LEFT, 1);
colPermilles.push_back (75);
#else
- SlotListCtrl->InsertColumn (ColumnSlot, _("Slot"), wxLIST_FORMAT_LEFT, 1);
+ SlotListCtrl->InsertColumn (ColumnSlot, LangString["TOKEN_SLOT_ID"], wxLIST_FORMAT_LEFT, 1);
colPermilles.push_back (82);
#endif
@@ -493,7 +493,7 @@ namespace VeraCrypt
catch (exception &e)
{
Gui->ShowError (e);
- Gui->ShowError (_("Error while loading configuration files located in ") + wstring (Application::GetConfigFilePath (L"")));
+ Gui->ShowError (LangString["LINUX_ERROR_LOADING_CONFIG"] + wstring (Application::GetConfigFilePath (L"")));
}
}
@@ -514,8 +514,8 @@ namespace VeraCrypt
Gui->AppendToMenu (*popup, LangString[Gui->IsInBackgroundMode() ? "SHOW_TC" : "HIDE_TC"], this, wxCommandEventHandler (TaskBarIcon::OnShowHideMenuItemSelected));
popup->AppendSeparator();
- Gui->AppendToMenu (*popup, _("Mount All Favorite Volumes"), this, wxCommandEventHandler (TaskBarIcon::OnMountAllFavoritesMenuItemSelected))->Enable (!Busy);
- Gui->AppendToMenu (*popup, _("Dismount All Mounted Volumes"), this, wxCommandEventHandler (TaskBarIcon::OnDismountAllMenuItemSelected))->Enable (!Busy);
+ Gui->AppendToMenu (*popup, LangString["IDM_MOUNT_FAVORITE_VOLUMES"], this, wxCommandEventHandler (TaskBarIcon::OnMountAllFavoritesMenuItemSelected))->Enable (!Busy);
+ Gui->AppendToMenu (*popup, LangString["HK_DISMOUNT_ALL"], this, wxCommandEventHandler (TaskBarIcon::OnDismountAllMenuItemSelected))->Enable (!Busy);
// Favorite volumes
if (Gui->GetPreferences().BackgroundTaskMenuMountItemsEnabled && !Frame->FavoriteVolumesMenuMap.empty())
@@ -524,7 +524,8 @@ namespace VeraCrypt
typedef pair <int, FavoriteVolume> FavMapPair;
foreach (FavMapPair fp, Frame->FavoriteVolumesMenuMap)
{
- Gui->AppendToMenu (*popup, LangString["MOUNT"] + L" " + wstring (fp.second.Path) + (fp.second.MountPoint.IsEmpty() ? L"" : L" " + wstring (fp.second.MountPoint)),
+ //TBH Gui->AppendToMenu (*popup, LangString["MOUNT"] + L" " + wstring (fp.second.Path) + (fp.second.MountPoint.IsEmpty() ? L"" : L" " + wstring (fp.second.MountPoint)),
+ Gui->AppendToMenu (*popup, LangString["MOUNT_BUTTON"] + L" " + wstring (fp.second.Path) + (fp.second.MountPoint.IsEmpty() ? L"" : L" " + wstring (fp.second.MountPoint)),
this, wxCommandEventHandler (TaskBarIcon::OnFavoriteVolumeMenuItemSelected), fp.first)->Enable (!Busy);
}
}
@@ -569,10 +570,10 @@ namespace VeraCrypt
}
popup->AppendSeparator();
- Gui->AppendToMenu (*popup, _("Preferences..."), this, wxCommandEventHandler (TaskBarIcon::OnPreferencesMenuItemSelected))->Enable (!Busy);
+ Gui->AppendToMenu (*popup, LangString["IDM_PREFERENCES"], this, wxCommandEventHandler (TaskBarIcon::OnPreferencesMenuItemSelected))->Enable (!Busy);
#ifndef TC_MACOSX
popup->AppendSeparator();
- Gui->AppendToMenu (*popup, _("Exit"), this, wxCommandEventHandler (TaskBarIcon::OnExitMenuItemSelected))->Enable (!Busy && Frame->CanExit());
+ Gui->AppendToMenu (*popup, LangString["EXIT"], this, wxCommandEventHandler (TaskBarIcon::OnExitMenuItemSelected))->Enable (!Busy && Frame->CanExit());
#endif
return popup.release();
}
@@ -692,7 +693,7 @@ namespace VeraCrypt
{
if (!IsFreeSlotSelected())
{
- Gui->ShowWarning (_("Please select a free drive slot from the list."));
+ Gui->ShowWarning (LangString["LINUX_SELECT_FREE_SLOT"]);
return;
}
@@ -1143,10 +1144,10 @@ namespace VeraCrypt
{
Gui->AppendToMenu (popup, LangString["DISMOUNT"], this, wxCommandEventHandler (MainFrame::OnDismountVolumeMenuItemSelected));
Gui->AppendToMenu (popup, LangString["OPEN"], this, wxCommandEventHandler (MainFrame::OnOpenVolumeMenuItemSelected));
- Gui->AppendToMenu (popup, _("Deselect"), this, wxCommandEventHandler (MainFrame::OnClearSlotSelectionMenuItemSelected));
+ Gui->AppendToMenu (popup, LangString["LINUX_DESELECT"], this, wxCommandEventHandler (MainFrame::OnClearSlotSelectionMenuItemSelected));
popup.AppendSeparator();
- Gui->AppendToMenu (popup, _("Add to Favorites..."), this, wxCommandEventHandler (MainFrame::OnAddToFavoritesMenuItemSelected));
+ Gui->AppendToMenu (popup, LangString["IDPM_ADD_TO_FAVORITES"], this, wxCommandEventHandler (MainFrame::OnAddToFavoritesMenuItemSelected));
popup.AppendSeparator();
Gui->AppendToMenu (popup, LangString["IDPM_CHECK_FILESYS"], this, wxCommandEventHandler (MainFrame::OnCheckFilesystemMenuItemSelected));
@@ -1159,7 +1160,7 @@ namespace VeraCrypt
}
else if (IsFreeSlotSelected())
{
- Gui->AppendToMenu (popup, _("Mount Volume"), this, wxCommandEventHandler (MainFrame::OnMountVolumeMenuItemSelected));
+ Gui->AppendToMenu (popup, LangString["IDM_MOUNT_VOLUME"], this, wxCommandEventHandler (MainFrame::OnMountVolumeMenuItemSelected));
popup.AppendSeparator();
@@ -1168,7 +1169,7 @@ namespace VeraCrypt
popup.AppendSeparator();
- Gui->AppendToMenu (popup, _("Deselect"), this, wxCommandEventHandler (MainFrame::OnClearSlotSelectionMenuItemSelected));
+ Gui->AppendToMenu (popup, LangString["LINUX_DESELECT"], this, wxCommandEventHandler (MainFrame::OnClearSlotSelectionMenuItemSelected));
PopupMenu (&popup);
}
@@ -1483,21 +1484,21 @@ namespace VeraCrypt
wxMenu popup;
- Gui->AppendToMenu (popup, _("Change Volume Password..."), this, wxCommandEventHandler (MainFrame::OnChangePasswordMenuItemSelected));
+ Gui->AppendToMenu (popup, LangString["IDM_CHANGE_PASSWORD"], this, wxCommandEventHandler (MainFrame::OnChangePasswordMenuItemSelected));
popup.AppendSeparator ();
- Gui->AppendToMenu (popup, _("Add/Remove Keyfiles to/from Volume..."), this, wxCommandEventHandler (MainFrame::OnChangeKeyfilesMenuItemSelected));
- Gui->AppendToMenu (popup, _("Remove All Keyfiles from Volume..."), this, wxCommandEventHandler (MainFrame::OnRemoveKeyfilesMenuItemSelected));
+ Gui->AppendToMenu (popup, LangString["IDM_ADD_REMOVE_VOL_KEYFILES"], this, wxCommandEventHandler (MainFrame::OnChangeKeyfilesMenuItemSelected));
+ Gui->AppendToMenu (popup, LangString["IDM_REMOVE_ALL_KEYFILES_FROM_VOL"], this, wxCommandEventHandler (MainFrame::OnRemoveKeyfilesMenuItemSelected));
popup.AppendSeparator ();
- Gui->AppendToMenu (popup, _("Change Header Key Derivation Algorithm..."), this, wxCommandEventHandler (MainFrame::OnChangePkcs5PrfMenuItemSelected));
+ Gui->AppendToMenu (popup, LangString["IDM_CHANGE_SYS_HEADER_KEY_DERIV_ALGO"], this, wxCommandEventHandler (MainFrame::OnChangePkcs5PrfMenuItemSelected));
popup.AppendSeparator ();
- Gui->AppendToMenu (popup, _("Backup Volume Header..."), this, wxCommandEventHandler (MainFrame::OnBackupVolumeHeadersMenuItemSelected));
- Gui->AppendToMenu (popup, _("Restore Volume Header..."), this, wxCommandEventHandler (MainFrame::OnRestoreVolumeHeaderMenuItemSelected));
+ Gui->AppendToMenu (popup, LangString["IDM_BACKUP_VOL_HEADER"], this, wxCommandEventHandler (MainFrame::OnBackupVolumeHeadersMenuItemSelected));
+ Gui->AppendToMenu (popup, LangString["IDM_RESTORE_VOL_HEADER"], this, wxCommandEventHandler (MainFrame::OnRestoreVolumeHeaderMenuItemSelected));
PopupMenu (&popup, VolumeToolsButton->GetPosition().x + 2, VolumeToolsButton->GetPosition().y + 2);
}
@@ -1587,7 +1588,7 @@ namespace VeraCrypt
{
bool mounted = IsMountedSlotSelected();
- VolumeButton->SetLabel (mounted ? LangString["DISMOUNT"] : wxString (_("Mount")));
+ VolumeButton->SetLabel (mounted ? LangString["UNMOUNT_BUTTON"] : LangString["MOUNT_BUTTON"]);
VolumePropertiesButton->Enable (mounted);
DismountVolumeMenuItem->Enable (mounted);