📄 ucommonstrings.cpp
字号:
{
"Enter the passphrase for \"%s\":"
},
// kSinglePassUserOrAdminText
{
"Enter passphrase for \"%s\" (or admin):"
},
// kSinglePassDialogTitle
{
"Enter Passphrase"
},
// kSinglePassMsgBoxTitle
{
"PGPdisk Passphrase Entry"
},
// kWarnDelDialogMessage
{
"Are you sure you want to delete the PGPdisk file \"%s\"? "
"All data on the PGPdisk will be permanently lost."
},
// kAskIfCancelCreation
{
"Are you sure you want to cancel PGPdisk creation?"
},
// kAskIfCancelReEncrypt
{
"Are you sure you want to interrupt the re-encryption process? If "
"you choose 'Yes', you can continue the re-encryption at any time "
"in the future simply by attempting to mount or edit the PGPdisk."
},
// kAskIfContinueReEncrypt
{
"This PGPdisk was interrupted in the process of being re-encrypted. "
"To continue using the PGPdisk, the re-encryption must be finished. "
"Do you wish to do this now?"
},
// kAskIfConvertOldHeaders
{
"You are attempting to mount or modify an older PGPdisk. Do you "
"wish to convert it to a newer file format? (If you choose 'Yes', "
"this PGPdisk will no longer work with earlier versions of PGPdisk. "
"If you choose 'No', you will not be allowed to modify the "
"PGPdisk, and will only be allowed to mount it in read-only mode.)"
},
// kAskIfCreateDir
{
"%s.\nThis directory path does not exist.\nCreate it?"
},
// kAskIfForceUnmount
{
"There are currently open files on the specified PGPdisk. If you do "
"not close the files before unmounting the PGPdisk, data may be "
"lost. Do you want to unmount the PGPdisk anyway?"
},
// kAskIfForceUnmountAll
{
"There are currently open files on at least one mounted PGPdisk. "
"If you do not close the files before unmounting the PGPdisk(s), "
"data may be lost. Do you want to unmount the PGPdisk(s) anyway?"
},
// kNoPGPdisksToUnmount
{
"There are no PGPdisks currently mounted on the system. "
},
// kAskIfNukeSymsAndMissingPubs
{
"This PGPdisk has non-admin passphrase users and/or users with "
"public keys that aren't on the local keyring. The re-encryption "
"process will result in these users being removed from the disk. Do "
"you want to re-encrypt the PGPdisk anyway?"
},
// kAskIfReEncryptOldCASTAlgorithm
{
"This PGPdisk was created with an earlier version of PGPdisk and "
"may not be secure. Do you wish to convert the PGPdisk to a newer, "
"more secure format? This may take several minutes, and if you "
"choose \"No\", you will not be allowed to modify files contained "
"in the PGPdisk."
},
// kAskIfReplaceFile
{
"%s.\nThis file already exists.\nReplace existing file?"
},
// kAskIfWipeDisk
{
"Are you SURE you want to wipe ALL non-public-key users on the "
"PGPdisk %s? This operation is NOT REVERSIBLE."
},
// kAskIfWipeAllDisks
{
"Are you SURE you want to wipe ALL non-public-key users on ALL "
"mounted PGPdisks? This operation is NOT REVERSIBLE."
},
// kChoosePGPdiskDlgTitle
{
"Choose a PGPdisk"
},
// kGenericMsgBoxTitle
{
"PGPdisk"
},
// kTellAdminUserNotUsable
{
"The admin user's private key is needed to complete this operation, "
"but it is not present on the default keyring."
},
// kTellBadMountStartupPath
{
"PGPdisk was unable to locate \"%s\". Do you wish to locate the volume yourself?"
},
// kTellBadPassphrase
{
"Incorrect passphrase. Please try again."
},
// kTellBadPassAndKeyNotInRing
{
"The passphrase you entered is not a valid passphrase for this "
"PGPdisk. (Note that there were one or more users with public keys "
"that could not be checked, possibly because these private keys are not on "
"the default keyring or the token has not been inserted.) Please try again."
},
// kTellCantCreateInWin2kTerm
{
"You cannot create a PGPdisk while logged into a Windows 2000 "
"Terminal Server as a remote client."
},
// kTellCantMarkDiskFor
{
"PGPdisk was unable to modify the mount-at-startup preference for the "
"specified PGPdisk."
},
// kTellCantModifyDisk
{
"This PGPdisk file is write-protected. Please note that it cannot be "
"modified until the write-protection is removed."
},
// kTellCantMountWOPrivKey
{
"You cannot use the selected public key to mount this PGPdisk "
"because its corresponding private key is not on the default keyring."
},
// kTellCantReEncryptOldCASTAlgorithm
{
"This PGPdisk was created with an earlier version of PGPdisk and "
"may not be secure. Since the disk is currently write-protected, "
"it cannot be converted to a newer, more secure format at the "
"current time. Until it is converted, you will not be able to modify "
"files contained in the PGPdisk."
},
// kTellCantRemoveALUser
{
"Neither administrator nor locked (ADK) users can be removed from a "
"PGPdisk. Please modify your selection."
},
// kTellCantSetCustomTimeout
{
"PGPdisk was unable to update the inactivity timeout preference for the "
"specified PGPdisk."
},
// kTellCantVerifyPassphrase
{
"PGPdisk could not verify your passphrase because: \"%s.\""
},
// kTellChoseDriveInWin2kTerm
{
"You cannot mount a PGPdisk onto a drive letter while logged into a "
"Windows 2000 Terminal Server as a remote client. Please choose an "
"empty directory on an NTFS volume as a mount point instead."
},
// kTellChoseInvalidVol
{
"The volume you have chosen does not exist. Please choose a "
"different path."
},
// kTellChoseReadOnlyVol
{
"The volume you have chosen is write-protected. Please choose a "
"different path."
},
// kTellChoseReplaceFileInUseOrRO
{
"This file is read-only or is in use by another program, and cannot "
"be replaced."
},
// kTellDiskAddUserFailed
{
"PGPdisk Add User failed because: \"%s.\""
},
// kTellDiskChangeUserPassFailed
{
"PGPdisk Change User Passphrase failed because: \"%s.\""
},
// kTellDiskCreateFailed
{
"PGPdisk Create failed because: \"%s.\""
},
// kTellDiskEditFailed
{
"PGPdisk Edit failed because: \"%s.\""
},
// kTellDiskMountFailed
{
"PGPdisk Mount failed because: \"%s.\""
},
// kTellDiskReEncryptFailed
{
"PGPdisk ReEncrypt failed because: \"%s.\""
},
// kTellDiskRemoveUsersFailed
{
"PGPdisk Remove Users failed because: \"%s.\""
},
// kTellDiskSetAdminUserFailed
{
"PGPdisk Set Admin User failed because \"%s.\""
},
// kTellDiskShowOptionsFailed
{
"PGPdisk Show Options failed because \"%s.\""
},
// kTellDiskShowPropsFailed
{
"PGPdisk Show Properties failed because \"%s.\""
},
// kTellDiskToggleUserDisabledFailed
{
"PGPdisk Toggle Disabled failed because: \"%s.\""
},
// kTellDiskToggleUserROFailed
{
"PGPdisk Toggle Read-Only failed because \"%s.\""
},
// kTellDiskUnmountFailed
{
"PGPdisk Unmount failed because: \"%s.\""
},
// kTellDiskUnmountAllFailed
{
"PGPdisk Unmount All failed because: \"%s.\""
},
// kTellDiskWipeUsersFailed
{
"PGPdisk Wipe Users failed because: \"%s.\""
},
// kTellEmptyFileName
{
"Please enter a filename before continuing."
},
// kTellForceROOnLoopback
{
"You are attempting to mount a PGPdisk via a network path that "
"points to a directory on the local machine. Since PGPdisk cannot "
"fully resolve this path on non-administrator accounts, you will be "
"forced to mount this PGPdisk in read-only mode."
},
// kTellIllegalPath
{
"You have entered either a non-existent directory path or a "
"proposed filename that is illegal for the specified volume (i.e. "
"it may contain invalid characters or be too long)."
},
// kTellInvalidFileSystem
{
"The filesystem you have chosen is invalid for the currently "
"entered PGPdisk size. Please modify the size or choose a different "
"filesystem."
},
// kTellInvalidPLRoot
{
"You have entered an invalid drive letter. Drive letters must be "
"between the letters A and Z."
},
// kTellBadMountPointDir
{
"To mount a PGPdisk onto a directory, you must specify a path to an "
"empty directory on an NTFS volume."
},
// kTellMountPointDirInUse
{
"The directory you specified already has a volume mounted on it. "
"Please choose another."
},
// kTellMountPointNetworked
{
"The directory you specified exists on a networked drive. "
"Please choose another."
},
// kTellMustRemountNovellDisk
{
"You must logout and log back into your Novell server in order to "
"mount this PGPdisk again. This can be done by right-clicking on "
"\"Network Neighborhood\" and choosing \"Netware Login\". If you "
"still get this message, then the PGPdisk may have been mounted by "
"another user."
},
// kTellNoDiskLicense
{
"You do not have a PGP Disk enabled PGP license which is needed "
"to run PGP Disk. Please upgrade your license."
},
// kTellNoPubKeySelected
{
"You must select a key before continuing."
},
// kTellPassphraseEmpty
{
"You must enter a passphrase before continuing."
},
// kTellPLRootInUse
{
"The drive you have chosen is currently in use. Please choose "
"another."
},
// kTellSearchForKeysFailed
{
"PGPdisk was unable to lookup the unknown keys because: \"%s.\""
},
// kTellUnknownKeyNotFound
{
"One or more of the unknown keys on this PGPdisk could not be found."
},
// kTellUserNameEmpty
{
"You must enter a user name before continuing."
},
// kTellUserNameInUse
{
"That user name already exists. Please enter a different name."
},
// kTellUserNameTooLong
{
"PGPdisk user names cannot be longer than %d characters. Please "
"enter a shorter name."
},
// kTellUsersWiped
{
"This PGPdisk has had its non-public-key users wiped. It can now "
"only be mounted by a holder of a private key associated with one "
"of the public keys on the PGPdisk, and can no longer be modified. "
"The key(s) on the disk can be viewed by attempting to 'Edit' the "
"PGPdisk."
},
// kUnknown
{
"Unknown string."
},
// kUnknownUserSizeString
{
"No Match"
},
// kUnknownUserString
{
"<Unknown User>"
},
// kUnknownUserWithIDString
{
"<Unknown User> (Key ID is %s)"
},
// kWarnAdminUserNotUsable
{
"The admin user's private key is not present on this machine. You "
"will not be able to perform any operations that require the "
"administrator password."
},
// kWarnCapsLockDown
{
"Note: Caps Lock is down."
},
// kWarnDriverNotLoaded
{
"Warning: The PGPdisk driver is not loaded, but since this is a "
"Debug build PGPdisk will attempt to simulate as much functionality "
"as it can for demonstration purposes."
},
// kWizFontInterior
{
"MS Sans Serif"
},
// kWizFontIntroDone
{
"Ariel"
}
};
_UNNAMED_END
// UCommonStrings functions.
const char *
UCommonStrings::Get(CommonString commonStr)
{
if (commonStr >= kLastString)
return TheStrings[kUnknown];
return TheStrings[commonStr];
}
#if defined(PGP_DRIVER98) || defined(PGP_DRIVERNT) || !defined(PGP_WIN32)
PGPBoolean
UCommonStrings::ReportError(
CommonString what,
CommonString title,
CComboError error,
void *parentWnd)
{
return FALSE;
}
#else // !PGP_DRIVER98 && !PGP_DRIVERNT && PGP_WIN32
#include "CMessageBox.h"
#include "CWindow.h"
PGPBoolean
UCommonStrings::ReportError(
CommonString what,
CommonString title,
CComboError error,
void *parentWnd)
{
try
{
// Need valid error.
if (error.IsntError() || (error.pgpErr == kPGPError_UserAbort))
return TRUE;
// Need valid parent window.
HWND hwndParent = static_cast<HWND>(parentWnd);
if (IsNull(hwndParent))
hwndParent = CWindow::GetDesktopWindow();
// Get the PGP error string.
CString subErrStr;
PGPError pgpErr = PGPGetClientErrorString(error.pgpErr,
512, subErrStr.GetBuffer(512));
subErrStr.ReleaseBuffer();
THROW_IF_PGPERROR(pgpErr);
// Get the OS error string.
if (error.HaveNonPGPError())
{
CString win32ErrStr;
FormatMessage(FORMAT_MESSAGE_FROM_SYSTEM |
FORMAT_MESSAGE_IGNORE_INSERTS |
FORMAT_MESSAGE_MAX_WIDTH_MASK, NULL, error.err,
MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT),
win32ErrStr.GetBuffer(512), 512, NULL);
win32ErrStr.ReleaseBuffer();
subErrStr += ". ";
subErrStr += win32ErrStr;
// Remove trailing period.
subErrStr.Resize(subErrStr.Length() - 1);
}
// Format the final error string.
CString errorStr;
errorStr.Format(Get(what), subErrStr.Get());
// Display the error.
MessageBeep(MB_ICONHAND);
CMessageBox messageBox;
messageBox.Display(errorStr, Get(title), hwndParent,
CMessageBox::kStopTone, CMessageBox::kOkStyle,
CMessageBox::kOkButton);
return TRUE;
}
catch (CComboError&)
{
pgpDebugMsg("Failed to report error!");
return FALSE;
}
}
#endif // PGP_DRIVER98 || PGP_DRIVERNT || !PGP_WIN32
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -