mirror of
https://github.com/keepassxreboot/keepassxc.git
synced 2025-07-25 15:55:38 -04:00
Make more strings translatable
Includes making certain modifiers (like "[locked]") positionable, in case languages put this before the word
This commit is contained in:
parent
3def6a3bc4
commit
e66adfbf68
10 changed files with 24 additions and 25 deletions
|
@ -42,7 +42,7 @@ Database* Kdbx3Reader::readDatabaseImpl(QIODevice* device, const QByteArray& hea
|
|||
if (m_masterSeed.isEmpty() || m_encryptionIV.isEmpty()
|
||||
|| m_streamStartBytes.isEmpty() || m_protectedStreamKey.isEmpty()
|
||||
|| m_db->cipher().isNull()) {
|
||||
raiseError("missing database headers");
|
||||
raiseError(tr("missing database headers"));
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
|
@ -134,7 +134,7 @@ Database* Kdbx3Reader::readDatabaseImpl(QIODevice* device, const QByteArray& hea
|
|||
if (!xmlReader.headerHash().isEmpty()) {
|
||||
QByteArray headerHash = CryptoHash::hash(headerData, CryptoHash::Sha256);
|
||||
if (headerHash != xmlReader.headerHash()) {
|
||||
raiseError("Header doesn't match hash");
|
||||
raiseError(tr("Header doesn't match hash"));
|
||||
return nullptr;
|
||||
}
|
||||
}
|
||||
|
@ -146,7 +146,7 @@ bool Kdbx3Reader::readHeaderField(StoreDataStream& headerStream)
|
|||
{
|
||||
QByteArray fieldIDArray = headerStream.read(1);
|
||||
if (fieldIDArray.size() != 1) {
|
||||
raiseError("Invalid header id size");
|
||||
raiseError(tr("Invalid header id size"));
|
||||
return false;
|
||||
}
|
||||
char fieldID = fieldIDArray.at(0);
|
||||
|
@ -154,7 +154,7 @@ bool Kdbx3Reader::readHeaderField(StoreDataStream& headerStream)
|
|||
bool ok;
|
||||
auto fieldLen = Endian::readSizedInt<quint16>(&headerStream, KeePass2::BYTEORDER, &ok);
|
||||
if (!ok) {
|
||||
raiseError("Invalid header field length");
|
||||
raiseError(tr("Invalid header field length"));
|
||||
return false;
|
||||
}
|
||||
|
||||
|
@ -162,7 +162,7 @@ bool Kdbx3Reader::readHeaderField(StoreDataStream& headerStream)
|
|||
if (fieldLen != 0) {
|
||||
fieldData = headerStream.read(fieldLen);
|
||||
if (fieldData.size() != fieldLen) {
|
||||
raiseError("Invalid header data length");
|
||||
raiseError(tr("Invalid header data length"));
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -179,8 +179,9 @@ QString KdbxXmlReader::errorString() const
|
|||
{
|
||||
if (m_error) {
|
||||
return m_errorStr;
|
||||
}if (m_xml.hasError()) {
|
||||
return QString("XML error:\n%1\nLine %2, column %3")
|
||||
}
|
||||
if (m_xml.hasError()) {
|
||||
return tr("XML error:\n%1\nLine %2, column %3")
|
||||
.arg(m_xml.errorString())
|
||||
.arg(m_xml.lineNumber())
|
||||
.arg(m_xml.columnNumber());
|
||||
|
|
|
@ -363,7 +363,7 @@ SymmetricCipherStream* KeePass1Reader::testKeys(const QString& password, const Q
|
|||
cipherStream->reset();
|
||||
cipherStream->close();
|
||||
if (!m_device->seek(contentPos)) {
|
||||
QString msg = "unable to seek to content position";
|
||||
QString msg = tr("unable to seek to content position");
|
||||
if (!m_device->errorString().isEmpty()) {
|
||||
msg.append("\n").append(m_device->errorString());
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue