"Fossies" - the Fresh Open Source Software Archive

Member "src/Main/LanguageStrings.cpp" (10 Oct 2018, 5494 Bytes) of package /windows/misc/VeraCrypt_1.23-Hotfix-2_Source.zip:


As a special service "Fossies" has tried to format the requested source page into HTML format using (guessed) C and C++ source code syntax highlighting (style: standard) with prefixed line numbers and code folding option. Alternatively you can here view or download the uninterpreted source code file. For more information about "LanguageStrings.cpp" see the Fossies "Dox" file reference documentation and the last Fossies "Diffs" side-by-side code changes report: 1.21_Source_vs_1.22_Source.

    1 /*
    2  Derived from source code of TrueCrypt 7.1a, which is
    3  Copyright (c) 2008-2012 TrueCrypt Developers Association and which is governed
    4  by the TrueCrypt License 3.0.
    5 
    6  Modifications and additions to the original source code (contained in this file)
    7  and all other portions of this file are Copyright (c) 2013-2017 IDRIX
    8  and are governed by the Apache License 2.0 the full text of which is
    9  contained in the file License.txt included in VeraCrypt binary and source
   10  code distribution packages.
   11 */
   12 
   13 #include "System.h"
   14 #include "Resources.h"
   15 #include "LanguageStrings.h"
   16 #include "Xml.h"
   17 
   18 namespace VeraCrypt
   19 {
   20     LanguageStrings::LanguageStrings ()
   21     {
   22     }
   23 
   24     LanguageStrings::~LanguageStrings ()
   25     {
   26     }
   27 
   28     wxString LanguageStrings::operator[] (const string &key) const
   29     {
   30         if (Map.count (key) > 0)
   31             return wxString (Map.find (key)->second);
   32 
   33         return wxString (L"?") + StringConverter::ToWide (key) + L"?";
   34     }
   35 
   36     wstring LanguageStrings::Get (const string &key) const
   37     {
   38         return wstring (LangString[key]);
   39     }
   40 
   41     void LanguageStrings::Init ()
   42     {
   43         foreach (XmlNode node, XmlParser (Resources::GetLanguageXml()).GetNodes (L"entry"))
   44         {
   45             wxString text = node.InnerText;
   46             text.Replace (L"\\n", L"\n");
   47             Map[StringConverter::ToSingle (wstring (node.Attributes[L"key"]))] = text;
   48         }
   49 
   50         Map["EXCEPTION_OCCURRED"] = _("Exception occurred");
   51         Map["MOUNT"] = _("Mount");
   52         Map["MOUNT_POINT"] = _("Mount Directory");
   53         Map["NO"] = _("No");
   54         Map["NO_VOLUMES_MOUNTED"] = _("No volumes mounted.");
   55         Map["OPEN_NEW_VOLUME"] = _("Specify a New VeraCrypt Volume");
   56         Map["PARAMETER_INCORRECT"] = _("Parameter incorrect");
   57         Map["SELECT_KEYFILES"] = _("Select Keyfiles");
   58         Map["START_TC"] = _("Start VeraCrypt");
   59         Map["VOLUME_ALREADY_MOUNTED"] = _("The volume \"{0}\" is already mounted.");
   60         Map["UNKNOWN_OPTION"] = _("Unknown option");
   61         Map["VOLUME_LOCATION"] = _("Volume Location");
   62         Map["YES"] = _("Yes");
   63         Map["VOLUME_HOST_IN_USE"] = _("WARNING: The host file/device \"{0}\" is already in use!\n\nIgnoring this can cause undesired results including system instability. All applications that might be using the host file/device should be closed before mounting the volume.\n\nContinue mounting?");
   64         Map["VIRTUAL_DEVICE"] = _("Virtual Device");
   65         Map["CONFIRM_BACKGROUND_TASK_DISABLED"] = _("WARNING: If the VeraCrypt Background Task is disabled, the following functions, depending on the platform, will be disabled whenever you exit VeraCrypt:\n\n1) Auto-dismount (e.g., upon logoff, time-out, etc.)\n2) Notifications (e.g., when damage to hidden volume is prevented)\n3) Tray icon\n\nNote: You may shut down the Background Task anytime by right-clicking the VeraCrypt tray icon and selecting 'Exit'.\n\nAre you sure you want to disable the VeraCrypt Background Task?");
   66         Map["CONFIRM_EXIT"] = _("WARNING: If VeraCrypt exits now, the following functions, depending on the platform, will be disabled:\n\n1) Auto-dismount (e.g., upon logoff, time-out, etc.)\n2) Notifications (e.g., when damage to hidden volume is prevented)\n3) Tray icon\n\nNote: If you do not wish VeraCrypt to continue running in background after you close its window, disable the Background Task in the Preferences.\n\nAre you sure you want VeraCrypt to exit?");
   67         Map["DAMAGE_TO_HIDDEN_VOLUME_PREVENTED"] = _("WARNING: Data were attempted to be saved to the hidden volume area of the volume \"{0}\"!\n\nVeraCrypt prevented these data from being saved in order to protect the hidden volume. This may have caused filesystem corruption on the outer volume and the operating system may have reported a write error (\"Delayed Write Failed\", \"The parameter is incorrect\", etc.). The entire volume (both the outer and the hidden part) will be write-protected until it is dismounted.\n\nWe strongly recommend that you restart the operating system now.");
   68         Map["ENTER_PASSWORD"] = _("Enter password");
   69         Map["ENTER_PASSWORD_FOR"] = _("Enter password for \"{0}\"");
   70         Map["ENTER_TC_VOL_PASSWORD"] = _("Enter VeraCrypt Volume Password");
   71         Map["SELECT_KEYFILE_PATH"] = _("Select Keyfile Search Path");
   72         Map["MORE_INFO_ABOUT"] = _("More information on {0}");
   73         Map["TWO_LAYER_CASCADE_HELP"] = _("Two ciphers in a cascade operating in XTS mode. Each block is first encrypted with {0} ({1}-bit key) and then with {2} ({3}-bit key). Each cipher uses its own key. All keys are mutually independent.");
   74         Map["THREE_LAYER_CASCADE_HELP"] = _("Three ciphers in a cascade operating in XTS mode. Each block is first encrypted with {0} ({1}-bit key), then with {2} ({3}-bit key), and finally with {4} ({5}-bit key). Each cipher uses its own key. All keys are mutually independent.");
   75         Map["CHECKING_FS"] = _("Checking the file system on the VeraCrypt volume mounted as {0}...");
   76         Map["REPAIRING_FS"] = _("Attempting to repair the file system on the VeraCrypt volume mounted as {0}...");
   77         Map["UNMOUNT_LOCK_FAILED"] = _("Volume \"{0}\" contains files or folders being used by applications or system.\n\nForce dismount?");
   78         Map["VOLUME_SIZE_HELP"] = _("Please specify the size of the container to create. Note that the minimum possible size of a volume is 292 KB.");
   79         Map["ENCRYPTION_MODE_NOT_SUPPORTED_BY_KERNEL"] = _("The volume you have mounted uses a mode of operation that is not supported by the Linux kernel. You may experience slow performance when using this volume. To achieve full performance, you should move the data from this volume to a new volume created by VeraCrypt 5.0 or later.");
   80     }
   81 
   82     LanguageStrings LangString;
   83 }