Merge pull request #1407 from keepassxreboot/feature/update-translations

Update translations
This commit is contained in:
Janek Bevendorff 2018-01-21 16:09:43 +01:00 committed by GitHub
commit 9c641ddf6b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
57 changed files with 59875 additions and 17626 deletions

View File

@ -458,7 +458,8 @@ merge() {
performChecks performChecks
logInfo "Updating language files..." logInfo "Updating language files..."
./share/translations/update.sh ./share/translations/update.sh update
./share/translations/update.sh pull
if [ 0 -ne $? ]; then if [ 0 -ne $? ]; then
exitError "Updating translations failed!" exitError "Updating translations failed!"
fi fi

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -1,41 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE TS>
<TS version="2.1" language="en_US">
<context>
<name>DatabaseWidget</name>
<message numerus="yes">
<source>Do you really want to move %n entry(s) to the recycle bin?</source>
<translation>
<numerusform>Do you really want to move %n entry to the recycle bin?</numerusform>
<numerusform>Do you really want to move %n entries to the recycle bin?</numerusform>
</translation>
</message>
</context>
<context>
<name>EditEntryWidget</name>
<message numerus="yes">
<source>%n week(s)</source>
<translation>
<numerusform>%n week</numerusform>
<numerusform>%n weeks</numerusform>
</translation>
</message>
<message numerus="yes">
<source>%n month(s)</source>
<translation>
<numerusform>%n month</numerusform>
<numerusform>%n months</numerusform>
</translation>
</message>
</context>
<context>
<name>EditWidgetIcons</name>
<message numerus="yes">
<source>Can&apos;t delete icon. Still used by %n item(s).</source>
<translation type="vanished">
<numerusform>Can&apos;t delete icon. Still used by %n item.</numerusform>
<numerusform>Can&apos;t delete icon. Still used by %n items.</numerusform>
</translation>
</message>
</context>
</TS>

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -32,10 +32,12 @@ elif [ "$1" == "update" ]; then
PULL=false PULL=false
elif [ "$1" != "" ]; then elif [ "$1" != "" ]; then
echo "Unknown command '${1}'" echo "Unknown command '${1}'"
echo "Usage: $(basename $0) [update|pull|push]" echo "Usage: $(basename $0) [update|pull|push] [additional tx options]"
exit 1 exit 1
fi fi
shift
cd "${BASEDIR}/../.." cd "${BASEDIR}/../.."
if $UPDATE; then if $UPDATE; then
@ -47,18 +49,17 @@ if $UPDATE; then
LUPDATE=lupdate LUPDATE=lupdate
fi fi
$LUPDATE -no-ui-lines -disable-heuristic similartext -locations none -no-obsolete src -ts share/translations/keepassx_en.ts $LUPDATE -no-ui-lines -disable-heuristic similartext -locations none -no-obsolete src -ts share/translations/keepassx_en.ts
$LUPDATE -no-ui-lines -disable-heuristic similartext -locations none -pluralonly src -ts share/translations/keepassx_en_plurals.ts
echo echo
fi fi
if $PUSH; then if $PUSH; then
echo "Pushing English source files to Transifex..." echo "Pushing English source files to Transifex..."
tx push -s tx push -s $@
echo echo
fi fi
if $PULL; then if $PULL; then
echo "Pulling translations from Transifex..." echo "Pulling translations from Transifex..."
tx pull -af --minimum-perc=40 tx pull -af --minimum-perc=40 $@
echo echo
fi fi

View File

@ -328,7 +328,7 @@ bool AutoType::parseActions(const QString& sequence, const Entry* entry, QList<A
for (const QChar& ch : sequence) { for (const QChar& ch : sequence) {
if (inTmpl) { if (inTmpl) {
if (ch == '{') { if (ch == '{') {
qWarning("Syntax error in auto-type sequence."); qWarning("Syntax error in Auto-Type sequence.");
return false; return false;
} else if (ch == '}') { } else if (ch == '}') {
QList<AutoTypeAction*> autoType = createActionFromTemplate(tmpl, entry); QList<AutoTypeAction*> autoType = createActionFromTemplate(tmpl, entry);
@ -343,7 +343,7 @@ bool AutoType::parseActions(const QString& sequence, const Entry* entry, QList<A
} else if (ch == '{') { } else if (ch == '{') {
inTmpl = true; inTmpl = true;
} else if (ch == '}') { } else if (ch == '}') {
qWarning("Syntax error in auto-type sequence."); qWarning("Syntax error in Auto-Type sequence.");
return false; return false;
} else { } else {
actions.append(new AutoTypeChar(ch)); actions.append(new AutoTypeChar(ch));
@ -662,29 +662,28 @@ bool AutoType::verifyAutoTypeSyntax(const QString& sequence)
{ {
if (!AutoType::checkSyntax(sequence)) { if (!AutoType::checkSyntax(sequence)) {
QMessageBox messageBox; QMessageBox messageBox;
messageBox.critical(0, tr("Auto-Type"), tr("The Syntax of your AutoType statement is incorrect!")); messageBox.critical(nullptr, tr("Auto-Type"), tr("The Syntax of your Auto-Type statement is incorrect!"));
return false; return false;
} else if (AutoType::checkHighDelay(sequence)) { } else if (AutoType::checkHighDelay(sequence)) {
QMessageBox::StandardButton reply; QMessageBox::StandardButton reply;
reply = QMessageBox::question(0, tr("Auto-Type"), reply = QMessageBox::question(nullptr, tr("Auto-Type"),
tr("This AutoType command contains a very long delay. Do you really want to proceed?")); tr("This Auto-Type command contains a very long delay. Do you really want to proceed?"));
if (reply == QMessageBox::No) { if (reply == QMessageBox::No) {
return false; return false;
} }
} else if (AutoType::checkSlowKeypress(sequence)) { } else if (AutoType::checkSlowKeypress(sequence)) {
QMessageBox::StandardButton reply; QMessageBox::StandardButton reply;
reply = QMessageBox::question(0, tr("Auto-Type"), reply = QMessageBox::question(nullptr, tr("Auto-Type"),
tr("This AutoType command contains very slow key-press. Do you really want to proceed?")); tr("This Auto-Type command contains very slow key presses. Do you really want to proceed?"));
if (reply == QMessageBox::No) { if (reply == QMessageBox::No) {
return false; return false;
} }
} else if (AutoType::checkHighRepetition(sequence)) { } else if (AutoType::checkHighRepetition(sequence)) {
QMessageBox::StandardButton reply; QMessageBox::StandardButton reply;
reply = QMessageBox::question(0, tr("Auto-Type"), reply = QMessageBox::question(nullptr, tr("Auto-Type"),
tr("This AutoType command contains arguments which are " tr("This Auto-Type command contains arguments which are repeated very often. Do you really want to proceed?"));
"repeated very often. Do you really want to proceed?"));
if (reply == QMessageBox::No) { if (reply == QMessageBox::No) {
return false; return false;

View File

@ -117,7 +117,7 @@ void BrowserOptionDialog::showProxyLocationFileDialog()
#ifdef Q_OS_WIN #ifdef Q_OS_WIN
QString fileTypeFilter(tr("Executable Files (*.exe);;All Files (*.*)")); QString fileTypeFilter(tr("Executable Files (*.exe);;All Files (*.*)"));
#else #else
QString fileTypeFilter(tr("Executable Files (*.*)")); QString fileTypeFilter(tr("Executable Files (*)"));
#endif #endif
auto proxyLocation = QFileDialog::getOpenFileName(this, tr("Select custom proxy location"), auto proxyLocation = QFileDialog::getOpenFileName(this, tr("Select custom proxy location"),
QFileInfo(QCoreApplication::applicationDirPath()).filePath(), QFileInfo(QCoreApplication::applicationDirPath()).filePath(),

View File

@ -6,8 +6,8 @@
<rect> <rect>
<x>0</x> <x>0</x>
<y>0</y> <y>0</y>
<width>456</width> <width>523</width>
<height>385</height> <height>456</height>
</rect> </rect>
</property> </property>
<property name="windowTitle"> <property name="windowTitle">
@ -130,7 +130,7 @@
<item> <item>
<widget class="QCheckBox" name="showNotification"> <widget class="QCheckBox" name="showNotification">
<property name="text"> <property name="text">
<string>Show a &amp;notification when credentials are requested</string> <string extracomment="Credentials mean login data requested via browser extension">Show a &amp;notification when credentials are requested</string>
</property> </property>
<property name="checked"> <property name="checked">
<bool>true</bool> <bool>true</bool>
@ -170,14 +170,14 @@
<item> <item>
<widget class="QRadioButton" name="sortByTitle"> <widget class="QRadioButton" name="sortByTitle">
<property name="text"> <property name="text">
<string>Sort &amp;matching credentials by title</string> <string extracomment="Credentials mean login data requested via browser extension">Sort &amp;matching credentials by title</string>
</property> </property>
</widget> </widget>
</item> </item>
<item> <item>
<widget class="QRadioButton" name="sortByUsername"> <widget class="QRadioButton" name="sortByUsername">
<property name="text"> <property name="text">
<string>Sort matching credentials by &amp;username</string> <string extracomment="Credentials mean login data requested via browser extension">Sort matching credentials by &amp;username</string>
</property> </property>
</widget> </widget>
</item> </item>
@ -260,14 +260,14 @@
<item> <item>
<widget class="QCheckBox" name="alwaysAllowAccess"> <widget class="QCheckBox" name="alwaysAllowAccess">
<property name="text"> <property name="text">
<string>Never &amp;ask before accessing credentials</string> <string extracomment="Credentials mean login data requested via browser extension">Never &amp;ask before accessing credentials</string>
</property> </property>
</widget> </widget>
</item> </item>
<item> <item>
<widget class="QCheckBox" name="alwaysAllowUpdate"> <widget class="QCheckBox" name="alwaysAllowUpdate">
<property name="text"> <property name="text">
<string>Never ask before &amp;updating credentials</string> <string extracomment="Credentials mean login data requested via browser extension">Never ask before &amp;updating credentials</string>
</property> </property>
</widget> </widget>
</item> </item>
@ -277,7 +277,7 @@
<string>Only the selected database has to be connected with a client.</string> <string>Only the selected database has to be connected with a client.</string>
</property> </property>
<property name="text"> <property name="text">
<string>Searc&amp;h in all opened databases for matching credentials</string> <string extracomment="Credentials mean login data requested via browser extension">Searc&amp;h in all opened databases for matching credentials</string>
</property> </property>
</widget> </widget>
</item> </item>
@ -317,7 +317,7 @@
<string>Use a custom proxy location if you installed a proxy manually.</string> <string>Use a custom proxy location if you installed a proxy manually.</string>
</property> </property>
<property name="text"> <property name="text">
<string>Use a &amp;custom proxy location</string> <string comment="Meant is the proxy for KeePassXC-Browser">Use a &amp;custom proxy location</string>
</property> </property>
</widget> </widget>
</item> </item>
@ -336,7 +336,7 @@
<item> <item>
<widget class="QPushButton" name="customProxyLocationBrowseButton"> <widget class="QPushButton" name="customProxyLocationBrowseButton">
<property name="text"> <property name="text">
<string>Browse...</string> <string extracomment="Button for opening file dialog">Browse...</string>
</property> </property>
</widget> </widget>
</item> </item>

View File

@ -53,7 +53,7 @@ int Clip::execute(QStringList arguments)
QObject::tr("Key file of the database."), QObject::tr("Key file of the database."),
QObject::tr("path")); QObject::tr("path"));
parser.addOption(keyFile); parser.addOption(keyFile);
parser.addPositionalArgument("entry", QObject::tr("Path of the entry to clip.")); parser.addPositionalArgument("entry", QObject::tr("Path of the entry to clip.", "clip = copy to clipboard"));
parser.addPositionalArgument( parser.addPositionalArgument(
"timeout", QObject::tr("Timeout in seconds before clearing the clipboard."), QString("[timeout]")); "timeout", QObject::tr("Timeout in seconds before clearing the clipboard."), QString("[timeout]"));
parser.process(arguments); parser.process(arguments);

View File

@ -268,8 +268,10 @@ void CsvParser::getChar(QChar& c) {
} }
void CsvParser::ungetChar() { void CsvParser::ungetChar() {
if (!m_ts.seek(m_lastPos)) if (!m_ts.seek(m_lastPos)) {
appendStatusMsg(QObject::tr("INTERNAL - unget lower bound exceeded"), true); qWarning("CSV Parser: unget lower bound exceeded");
m_isGood = false;
}
} }
void CsvParser::peek(QChar& c) { void CsvParser::peek(QChar& c) {
@ -380,5 +382,5 @@ void CsvParser::appendStatusMsg(QString s, bool isCritical) {
.append(",") .append(",")
.append(QString::number(m_currCol)) .append(QString::number(m_currCol))
.append("\n"); .append("\n");
m_isGood = not isCritical; m_isGood = !isCritical;
} }

View File

@ -671,7 +671,7 @@ Entry* Entry::clone(CloneFlags flags) const
} }
if (flags & CloneRenameTitle) if (flags & CloneRenameTitle)
entry->setTitle(entry->title() + tr(" - Clone")); entry->setTitle(entry->title() + tr(" - Clone", "Suffix added to cloned entries"));
return entry; return entry;
} }

View File

@ -38,6 +38,10 @@ void Translator::installTranslators()
if (language == "system" || language.isEmpty()) { if (language == "system" || language.isEmpty()) {
language = QLocale::system().name(); language = QLocale::system().name();
} }
if (language == "en") {
// use actual English translation instead of the English locale source language
language = "en_US";
}
const QStringList paths = { const QStringList paths = {
#ifdef QT_DEBUG #ifdef QT_DEBUG
@ -48,8 +52,7 @@ void Translator::installTranslators()
bool translationsLoaded = false; bool translationsLoaded = false;
for (const QString& path : paths) { for (const QString& path : paths) {
translationsLoaded |= installTranslator(language, path) || installTranslator("en_plurals", path); translationsLoaded |= installTranslator(language, path) || installTranslator("en_US", path);
installQtTranslator(language, path);
} }
if (!translationsLoaded) { if (!translationsLoaded) {
// couldn't load configured language or fallback // couldn't load configured language or fallback
@ -79,12 +82,16 @@ QList<QPair<QString, QString>> Translator::availableLanguages()
QRegularExpressionMatch match = regExp.match(filename); QRegularExpressionMatch match = regExp.match(filename);
if (match.hasMatch()) { if (match.hasMatch()) {
QString langcode = match.captured(1); QString langcode = match.captured(1);
if (langcode == "en_plurals") { if (langcode == "en") {
langcode = "en"; continue;
} }
QLocale locale(langcode); QLocale locale(langcode);
QString languageStr = QLocale::languageToString(locale.language()); QString languageStr = QLocale::languageToString(locale.language());
if (langcode == "la") {
// langcode "la" (Latin) is translated into "C" by QLocale::languageToString()
languageStr = "Latin";
}
QString countryStr; QString countryStr;
if (langcode.contains("_")) { if (langcode.contains("_")) {
countryStr = QString(" (%1)").arg(QLocale::countryToString(locale.country())); countryStr = QString(" (%1)").arg(QLocale::countryToString(locale.country()));

View File

@ -26,6 +26,8 @@
*/ */
class Kdbx3Reader: public KdbxReader class Kdbx3Reader: public KdbxReader
{ {
Q_DECLARE_TR_FUNCTIONS(Kdbx3Reader)
public: public:
Database* readDatabaseImpl(QIODevice* device, const QByteArray& headerData, Database* readDatabaseImpl(QIODevice* device, const QByteArray& headerData,
const CompositeKey& key, bool keepDatabase) override; const CompositeKey& key, bool keepDatabase) override;

View File

@ -25,6 +25,8 @@
*/ */
class Kdbx3Writer: public KdbxWriter class Kdbx3Writer: public KdbxWriter
{ {
Q_DECLARE_TR_FUNCTIONS(Kdbx3Writer)
public: public:
bool writeDatabase(QIODevice* device, Database* db) override; bool writeDatabase(QIODevice* device, Database* db) override;
}; };

View File

@ -1,91 +0,0 @@
/*
* Copyright (C) 2017 KeePassXC Team <team@keepassxc.org>
* Copyright (C) 2010 Felix Geyer <debfx@fobos.de>
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 2 or (at your option)
* version 3 of the License.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef KEEPASSX_KDBX3XMLWRITER_H
#define KEEPASSX_KDBX3XMLWRITER_H
#include <QColor>
#include <QDateTime>
#include <QImage>
#include <QXmlStreamWriter>
#include "core/Database.h"
#include "core/Entry.h"
#include "core/Group.h"
#include "core/TimeInfo.h"
#include "core/Uuid.h"
class KeePass2RandomStream;
class Metadata;
class Kdbx3XmlWriter
{
public:
Kdbx3XmlWriter();
void writeDatabase(QIODevice* device, Database* db, KeePass2RandomStream* randomStream = nullptr,
const QByteArray& headerHash = QByteArray());
void writeDatabase(const QString& filename, Database* db);
bool hasError();
QString errorString();
private:
void generateIdMap();
void writeMetadata();
void writeMemoryProtection();
void writeCustomIcons();
void writeIcon(const Uuid& uuid, const QImage& icon);
void writeBinaries();
void writeCustomData();
void writeCustomDataItem(const QString& key, const QString& value);
void writeRoot();
void writeGroup(const Group* group);
void writeTimes(const TimeInfo& ti);
void writeDeletedObjects();
void writeDeletedObject(const DeletedObject& delObj);
void writeEntry(const Entry* entry);
void writeAutoType(const Entry* entry);
void writeAutoTypeAssoc(const AutoTypeAssociations::Association& assoc);
void writeEntryHistory(const Entry* entry);
void writeString(const QString& qualifiedName, const QString& string);
void writeNumber(const QString& qualifiedName, int number);
void writeBool(const QString& qualifiedName, bool b);
void writeDateTime(const QString& qualifiedName, const QDateTime& dateTime);
void writeUuid(const QString& qualifiedName, const Uuid& uuid);
void writeUuid(const QString& qualifiedName, const Group* group);
void writeUuid(const QString& qualifiedName, const Entry* entry);
void writeBinary(const QString& qualifiedName, const QByteArray& ba);
void writeColor(const QString& qualifiedName, const QColor& color);
void writeTriState(const QString& qualifiedName, Group::TriState triState);
QString colorPartToString(int value);
QString stripInvalidXml10Chars(QString str);
void raiseError(const QString& errorMessage);
QXmlStreamWriter m_xml;
Database* m_db;
Metadata* m_meta;
KeePass2RandomStream* m_randomStream;
QByteArray m_headerHash;
QHash<QByteArray, int> m_idMap;
bool m_error;
QString m_errorStr;
};
#endif // KEEPASSX_KDBX3XMLWRITER_H

View File

@ -298,6 +298,7 @@ QVariantMap Kdbx4Reader::readVariantMap(QIODevice* device)
& KeePass2::VARIANTMAP_CRITICAL_MASK; & KeePass2::VARIANTMAP_CRITICAL_MASK;
quint16 maxVersion = KeePass2::VARIANTMAP_VERSION & KeePass2::VARIANTMAP_CRITICAL_MASK; quint16 maxVersion = KeePass2::VARIANTMAP_VERSION & KeePass2::VARIANTMAP_CRITICAL_MASK;
if (!ok || (version > maxVersion)) { if (!ok || (version > maxVersion)) {
//: Translation: variant map = data structure for storing meta data
raiseError(tr("Unsupported KeePass variant map version.")); raiseError(tr("Unsupported KeePass variant map version."));
return {}; return {};
} }
@ -310,6 +311,7 @@ QVariantMap Kdbx4Reader::readVariantMap(QIODevice* device)
!= KeePass2::VariantMapFieldType::End)) { != KeePass2::VariantMapFieldType::End)) {
auto nameLen = Endian::readSizedInt<quint32>(device, KeePass2::BYTEORDER, &ok); auto nameLen = Endian::readSizedInt<quint32>(device, KeePass2::BYTEORDER, &ok);
if (!ok) { if (!ok) {
//: Translation: variant map = data structure for storing meta data
raiseError(tr("Invalid variant map entry name length")); raiseError(tr("Invalid variant map entry name length"));
return {}; return {};
} }
@ -317,6 +319,7 @@ QVariantMap Kdbx4Reader::readVariantMap(QIODevice* device)
if (nameLen != 0) { if (nameLen != 0) {
nameBytes = device->read(nameLen); nameBytes = device->read(nameLen);
if (static_cast<quint32>(nameBytes.size()) != nameLen) { if (static_cast<quint32>(nameBytes.size()) != nameLen) {
//: Translation: variant map = data structure for storing meta data
raiseError(tr("Invalid variant map entry name data")); raiseError(tr("Invalid variant map entry name data"));
return {}; return {};
} }
@ -325,6 +328,7 @@ QVariantMap Kdbx4Reader::readVariantMap(QIODevice* device)
auto valueLen = Endian::readSizedInt<quint32>(device, KeePass2::BYTEORDER, &ok); auto valueLen = Endian::readSizedInt<quint32>(device, KeePass2::BYTEORDER, &ok);
if (!ok) { if (!ok) {
//: Translation: variant map = data structure for storing meta data
raiseError(tr("Invalid variant map entry value length")); raiseError(tr("Invalid variant map entry value length"));
return {}; return {};
} }
@ -332,6 +336,7 @@ QVariantMap Kdbx4Reader::readVariantMap(QIODevice* device)
if (valueLen != 0) { if (valueLen != 0) {
valueBytes = device->read(valueLen); valueBytes = device->read(valueLen);
if (static_cast<quint32>(valueBytes.size()) != valueLen) { if (static_cast<quint32>(valueBytes.size()) != valueLen) {
//: Translation comment: variant map = data structure for storing meta data
raiseError(tr("Invalid variant map entry value data")); raiseError(tr("Invalid variant map entry value data"));
return {}; return {};
} }
@ -342,6 +347,7 @@ QVariantMap Kdbx4Reader::readVariantMap(QIODevice* device)
if (valueLen == 1) { if (valueLen == 1) {
vm.insert(name, QVariant(valueBytes.at(0) != 0)); vm.insert(name, QVariant(valueBytes.at(0) != 0));
} else { } else {
//: Translation: variant map = data structure for storing meta data
raiseError(tr("Invalid variant map Bool entry value length")); raiseError(tr("Invalid variant map Bool entry value length"));
return {}; return {};
} }
@ -351,6 +357,7 @@ QVariantMap Kdbx4Reader::readVariantMap(QIODevice* device)
if (valueLen == 4) { if (valueLen == 4) {
vm.insert(name, QVariant(Endian::bytesToSizedInt<qint32>(valueBytes, KeePass2::BYTEORDER))); vm.insert(name, QVariant(Endian::bytesToSizedInt<qint32>(valueBytes, KeePass2::BYTEORDER)));
} else { } else {
//: Translation: variant map = data structure for storing meta data
raiseError(tr("Invalid variant map Int32 entry value length")); raiseError(tr("Invalid variant map Int32 entry value length"));
return {}; return {};
} }
@ -360,6 +367,7 @@ QVariantMap Kdbx4Reader::readVariantMap(QIODevice* device)
if (valueLen == 4) { if (valueLen == 4) {
vm.insert(name, QVariant(Endian::bytesToSizedInt<quint32>(valueBytes, KeePass2::BYTEORDER))); vm.insert(name, QVariant(Endian::bytesToSizedInt<quint32>(valueBytes, KeePass2::BYTEORDER)));
} else { } else {
//: Translation: variant map = data structure for storing meta data
raiseError(tr("Invalid variant map UInt32 entry value length")); raiseError(tr("Invalid variant map UInt32 entry value length"));
return {}; return {};
} }
@ -369,6 +377,7 @@ QVariantMap Kdbx4Reader::readVariantMap(QIODevice* device)
if (valueLen == 8) { if (valueLen == 8) {
vm.insert(name, QVariant(Endian::bytesToSizedInt<qint64>(valueBytes, KeePass2::BYTEORDER))); vm.insert(name, QVariant(Endian::bytesToSizedInt<qint64>(valueBytes, KeePass2::BYTEORDER)));
} else { } else {
//: Translation: variant map = data structure for storing meta data
raiseError(tr("Invalid variant map Int64 entry value length")); raiseError(tr("Invalid variant map Int64 entry value length"));
return {}; return {};
} }
@ -378,6 +387,7 @@ QVariantMap Kdbx4Reader::readVariantMap(QIODevice* device)
if (valueLen == 8) { if (valueLen == 8) {
vm.insert(name, QVariant(Endian::bytesToSizedInt<quint64>(valueBytes, KeePass2::BYTEORDER))); vm.insert(name, QVariant(Endian::bytesToSizedInt<quint64>(valueBytes, KeePass2::BYTEORDER)));
} else { } else {
//: Translation: variant map = data structure for storing meta data
raiseError(tr("Invalid variant map UInt64 entry value length")); raiseError(tr("Invalid variant map UInt64 entry value length"));
return {}; return {};
} }
@ -392,12 +402,14 @@ QVariantMap Kdbx4Reader::readVariantMap(QIODevice* device)
break; break;
default: default:
//: Translation: variant map = data structure for storing meta data
raiseError(tr("Invalid variant map entry type")); raiseError(tr("Invalid variant map entry type"));
return {}; return {};
} }
} }
if (fieldTypeArray.size() != 1) { if (fieldTypeArray.size() != 1) {
//: Translation: variant map = data structure for storing meta data
raiseError(tr("Invalid variant map field type size")); raiseError(tr("Invalid variant map field type size"));
return {}; return {};
} }

View File

@ -27,6 +27,8 @@
*/ */
class Kdbx4Reader : public KdbxReader class Kdbx4Reader : public KdbxReader
{ {
Q_DECLARE_TR_FUNCTIONS(Kdbx4Reader)
public: public:
Database* readDatabaseImpl(QIODevice* device, const QByteArray& headerData, Database* readDatabaseImpl(QIODevice* device, const QByteArray& headerData,
const CompositeKey& key, bool keepDatabase) override; const CompositeKey& key, bool keepDatabase) override;

View File

@ -41,7 +41,7 @@ bool Kdbx4Writer::writeDatabase(QIODevice* device, Database* db)
} }
int ivSize = SymmetricCipher::algorithmIvSize(algo); int ivSize = SymmetricCipher::algorithmIvSize(algo);
if (ivSize < 0) { if (ivSize < 0) {
raiseError(tr("Invalid symmetric cipher IV size.")); raiseError(tr("Invalid symmetric cipher IV size.", "IV = Initialization Vector for symmetric cipher"));
return false; return false;
} }
@ -82,6 +82,7 @@ bool Kdbx4Writer::writeDatabase(QIODevice* device, Database* db)
QVariantMap kdfParams = KeePass2::kdfToParameters(db->kdf()); QVariantMap kdfParams = KeePass2::kdfToParameters(db->kdf());
QByteArray kdfParamBytes; QByteArray kdfParamBytes;
if (!serializeVariantMap(kdfParams, kdfParamBytes)) { if (!serializeVariantMap(kdfParams, kdfParamBytes)) {
//: Translation comment: variant map = data structure for storing meta data
raiseError(tr("Failed to serialize KDF parameters variant map")); raiseError(tr("Failed to serialize KDF parameters variant map"));
return false; return false;
} }

View File

@ -25,6 +25,8 @@
*/ */
class Kdbx4Writer : public KdbxWriter class Kdbx4Writer : public KdbxWriter
{ {
Q_DECLARE_TR_FUNCTIONS(Kdbx4Writer)
public: public:
bool writeDatabase(QIODevice* device, Database* db) override; bool writeDatabase(QIODevice* device, Database* db) override;

View File

@ -1120,6 +1120,7 @@ QByteArray KdbxXmlReader::readCompressedBinary()
QByteArray result; QByteArray result;
if (!Tools::readAllFromDevice(&compressor, result)) { if (!Tools::readAllFromDevice(&compressor, result)) {
//: Translator meant is a binary data inside an entry
raiseError(tr("Unable to decompress binary")); raiseError(tr("Unable to decompress binary"));
} }
return result; return result;

View File

@ -126,37 +126,37 @@ Database* KeePass1Reader::readDatabase(QIODevice* device, const QString& passwor
m_encryptionIV = m_device->read(16); m_encryptionIV = m_device->read(16);
if (m_encryptionIV.size() != 16) { if (m_encryptionIV.size() != 16) {
raiseError("Unable to read encryption IV"); raiseError(tr("Unable to read encryption IV", "IV = Initialization Vector for symmetric cipher"));
return nullptr; return nullptr;
} }
auto numGroups = Endian::readSizedInt<quint32>(m_device, KeePass1::BYTEORDER, &ok); auto numGroups = Endian::readSizedInt<quint32>(m_device, KeePass1::BYTEORDER, &ok);
if (!ok) { if (!ok) {
raiseError("Invalid number of groups"); raiseError(tr("Invalid number of groups"));
return nullptr; return nullptr;
} }
auto numEntries = Endian::readSizedInt<quint32>(m_device, KeePass1::BYTEORDER, &ok); auto numEntries = Endian::readSizedInt<quint32>(m_device, KeePass1::BYTEORDER, &ok);
if (!ok) { if (!ok) {
raiseError("Invalid number of entries"); raiseError(tr("Invalid number of entries"));
return nullptr; return nullptr;
} }
m_contentHashHeader = m_device->read(32); m_contentHashHeader = m_device->read(32);
if (m_contentHashHeader.size() != 32) { if (m_contentHashHeader.size() != 32) {
raiseError("Invalid content hash size"); raiseError(tr("Invalid content hash size"));
return nullptr; return nullptr;
} }
m_transformSeed = m_device->read(32); m_transformSeed = m_device->read(32);
if (m_transformSeed.size() != 32) { if (m_transformSeed.size() != 32) {
raiseError("Invalid transform seed size"); raiseError(tr("Invalid transform seed size"));
return nullptr; return nullptr;
} }
m_transformRounds = Endian::readSizedInt<quint32>(m_device, KeePass1::BYTEORDER, &ok); m_transformRounds = Endian::readSizedInt<quint32>(m_device, KeePass1::BYTEORDER, &ok);
if (!ok) { if (!ok) {
raiseError("Invalid number of transform rounds"); raiseError(tr("Invalid number of transform rounds"));
return nullptr; return nullptr;
} }
auto kdf = QSharedPointer<AesKdf>::create(true); auto kdf = QSharedPointer<AesKdf>::create(true);
@ -191,7 +191,7 @@ Database* KeePass1Reader::readDatabase(QIODevice* device, const QString& passwor
} }
if (!constructGroupTree(groups)) { if (!constructGroupTree(groups)) {
raiseError("Unable to construct group tree"); raiseError(tr("Unable to construct group tree"));
return nullptr; return nullptr;
} }
@ -401,7 +401,7 @@ QByteArray KeePass1Reader::key(const QByteArray& password, const QByteArray& key
bool result = key.transform(*m_db->kdf(), transformedKey); bool result = key.transform(*m_db->kdf(), transformedKey);
if (!result) { if (!result) {
raiseError("Key transformation failed"); raiseError(tr("Key transformation failed"));
return QByteArray(); return QByteArray();
} }
@ -445,19 +445,19 @@ Group* KeePass1Reader::readGroup(QIODevice* cipherStream)
do { do {
quint16 fieldType = Endian::readSizedInt<quint16>(cipherStream, KeePass1::BYTEORDER, &ok); quint16 fieldType = Endian::readSizedInt<quint16>(cipherStream, KeePass1::BYTEORDER, &ok);
if (!ok) { if (!ok) {
raiseError("Invalid group field type number"); raiseError(tr("Invalid group field type number"));
return nullptr; return nullptr;
} }
int fieldSize = static_cast<int>(Endian::readSizedInt<quint32>(cipherStream, KeePass1::BYTEORDER, &ok)); int fieldSize = static_cast<int>(Endian::readSizedInt<quint32>(cipherStream, KeePass1::BYTEORDER, &ok));
if (!ok) { if (!ok) {
raiseError("Invalid group field size"); raiseError(tr("Invalid group field size"));
return nullptr; return nullptr;
} }
QByteArray fieldData = cipherStream->read(fieldSize); QByteArray fieldData = cipherStream->read(fieldSize);
if (fieldData.size() != fieldSize) { if (fieldData.size() != fieldSize) {
raiseError("Read group field data doesn't match size"); raiseError(tr("Read group field data doesn't match size"));
return nullptr; return nullptr;
} }
@ -467,7 +467,7 @@ Group* KeePass1Reader::readGroup(QIODevice* cipherStream)
break; break;
case 0x0001: case 0x0001:
if (fieldSize != 4) { if (fieldSize != 4) {
raiseError("Incorrect group id field size"); raiseError(tr("Incorrect group id field size"));
return nullptr; return nullptr;
} }
groupId = Endian::bytesToSizedInt<quint32>(fieldData, KeePass1::BYTEORDER); groupId = Endian::bytesToSizedInt<quint32>(fieldData, KeePass1::BYTEORDER);
@ -479,7 +479,7 @@ Group* KeePass1Reader::readGroup(QIODevice* cipherStream)
case 0x0003: case 0x0003:
{ {
if (fieldSize != 5) { if (fieldSize != 5) {
raiseError("Incorrect group creation time field size"); raiseError(tr("Incorrect group creation time field size"));
return nullptr; return nullptr;
} }
QDateTime dateTime = dateFromPackedStruct(fieldData); QDateTime dateTime = dateFromPackedStruct(fieldData);
@ -491,7 +491,7 @@ Group* KeePass1Reader::readGroup(QIODevice* cipherStream)
case 0x0004: case 0x0004:
{ {
if (fieldSize != 5) { if (fieldSize != 5) {
raiseError("Incorrect group modification time field size"); raiseError(tr("Incorrect group modification time field size"));
return nullptr; return nullptr;
} }
QDateTime dateTime = dateFromPackedStruct(fieldData); QDateTime dateTime = dateFromPackedStruct(fieldData);
@ -503,7 +503,7 @@ Group* KeePass1Reader::readGroup(QIODevice* cipherStream)
case 0x0005: case 0x0005:
{ {
if (fieldSize != 5) { if (fieldSize != 5) {
raiseError("Incorrect group access time field size"); raiseError(tr("Incorrect group access time field size"));
} }
QDateTime dateTime = dateFromPackedStruct(fieldData); QDateTime dateTime = dateFromPackedStruct(fieldData);
if (dateTime.isValid()) { if (dateTime.isValid()) {
@ -514,7 +514,7 @@ Group* KeePass1Reader::readGroup(QIODevice* cipherStream)
case 0x0006: case 0x0006:
{ {
if (fieldSize != 5) { if (fieldSize != 5) {
raiseError("Incorrect group expiry time field size"); raiseError(tr("Incorrect group expiry time field size"));
} }
QDateTime dateTime = dateFromPackedStruct(fieldData); QDateTime dateTime = dateFromPackedStruct(fieldData);
if (dateTime.isValid()) { if (dateTime.isValid()) {
@ -526,7 +526,7 @@ Group* KeePass1Reader::readGroup(QIODevice* cipherStream)
case 0x0007: case 0x0007:
{ {
if (fieldSize != 4) { if (fieldSize != 4) {
raiseError("Incorrect group icon field size"); raiseError(tr("Incorrect group icon field size"));
return nullptr; return nullptr;
} }
quint32 iconNumber = Endian::bytesToSizedInt<quint32>(fieldData, KeePass1::BYTEORDER); quint32 iconNumber = Endian::bytesToSizedInt<quint32>(fieldData, KeePass1::BYTEORDER);
@ -536,7 +536,7 @@ Group* KeePass1Reader::readGroup(QIODevice* cipherStream)
case 0x0008: case 0x0008:
{ {
if (fieldSize != 2) { if (fieldSize != 2) {
raiseError("Incorrect group level field size"); raiseError(tr("Incorrect group level field size"));
return nullptr; return nullptr;
} }
groupLevel = Endian::bytesToSizedInt<quint16>(fieldData, KeePass1::BYTEORDER); groupLevel = Endian::bytesToSizedInt<quint16>(fieldData, KeePass1::BYTEORDER);
@ -551,13 +551,13 @@ Group* KeePass1Reader::readGroup(QIODevice* cipherStream)
break; break;
default: default:
// invalid field // invalid field
raiseError("Invalid group field type"); raiseError(tr("Invalid group field type"));
return nullptr; return nullptr;
} }
} while (!reachedEnd); } while (!reachedEnd);
if (!groupIdSet || !groupLevelSet) { if (!groupIdSet || !groupLevelSet) {
raiseError("Missing group id or level"); raiseError(tr("Missing group id or level"));
return nullptr; return nullptr;
} }
@ -583,19 +583,19 @@ Entry* KeePass1Reader::readEntry(QIODevice* cipherStream)
do { do {
quint16 fieldType = Endian::readSizedInt<quint16>(cipherStream, KeePass1::BYTEORDER, &ok); quint16 fieldType = Endian::readSizedInt<quint16>(cipherStream, KeePass1::BYTEORDER, &ok);
if (!ok) { if (!ok) {
raiseError("Missing entry field type number"); raiseError(tr("Missing entry field type number"));
return nullptr; return nullptr;
} }
int fieldSize = static_cast<int>(Endian::readSizedInt<quint32>(cipherStream, KeePass1::BYTEORDER, &ok)); int fieldSize = static_cast<int>(Endian::readSizedInt<quint32>(cipherStream, KeePass1::BYTEORDER, &ok));
if (!ok) { if (!ok) {
raiseError("Invalid entry field size"); raiseError(tr("Invalid entry field size"));
return nullptr; return nullptr;
} }
QByteArray fieldData = cipherStream->read(fieldSize); QByteArray fieldData = cipherStream->read(fieldSize);
if (fieldData.size() != fieldSize) { if (fieldData.size() != fieldSize) {
raiseError("Read entry field data doesn't match size"); raiseError(tr("Read entry field data doesn't match size"));
return nullptr; return nullptr;
} }
@ -605,7 +605,7 @@ Entry* KeePass1Reader::readEntry(QIODevice* cipherStream)
break; break;
case 0x0001: case 0x0001:
if (fieldSize != 16) { if (fieldSize != 16) {
raiseError("Invalid entry uuid field size"); raiseError(tr("Invalid entry uuid field size"));
return nullptr; return nullptr;
} }
m_entryUuids.insert(fieldData, entry.data()); m_entryUuids.insert(fieldData, entry.data());
@ -613,7 +613,7 @@ Entry* KeePass1Reader::readEntry(QIODevice* cipherStream)
case 0x0002: case 0x0002:
{ {
if (fieldSize != 4) { if (fieldSize != 4) {
raiseError("Invalid entry group id field size"); raiseError(tr("Invalid entry group id field size"));
return nullptr; return nullptr;
} }
quint32 groupId = Endian::bytesToSizedInt<quint32>(fieldData, KeePass1::BYTEORDER); quint32 groupId = Endian::bytesToSizedInt<quint32>(fieldData, KeePass1::BYTEORDER);
@ -623,7 +623,7 @@ Entry* KeePass1Reader::readEntry(QIODevice* cipherStream)
case 0x0003: case 0x0003:
{ {
if (fieldSize != 4) { if (fieldSize != 4) {
raiseError("Invalid entry icon field size"); raiseError(tr("Invalid entry icon field size"));
return nullptr; return nullptr;
} }
quint32 iconNumber = Endian::bytesToSizedInt<quint32>(fieldData, KeePass1::BYTEORDER); quint32 iconNumber = Endian::bytesToSizedInt<quint32>(fieldData, KeePass1::BYTEORDER);
@ -648,7 +648,7 @@ Entry* KeePass1Reader::readEntry(QIODevice* cipherStream)
case 0x0009: case 0x0009:
{ {
if (fieldSize != 5) { if (fieldSize != 5) {
raiseError("Invalid entry creation time field size"); raiseError(tr("Invalid entry creation time field size"));
return nullptr; return nullptr;
} }
QDateTime dateTime = dateFromPackedStruct(fieldData); QDateTime dateTime = dateFromPackedStruct(fieldData);
@ -660,7 +660,7 @@ Entry* KeePass1Reader::readEntry(QIODevice* cipherStream)
case 0x000A: case 0x000A:
{ {
if (fieldSize != 5) { if (fieldSize != 5) {
raiseError("Invalid entry modification time field size"); raiseError(tr("Invalid entry modification time field size"));
return nullptr; return nullptr;
} }
QDateTime dateTime = dateFromPackedStruct(fieldData); QDateTime dateTime = dateFromPackedStruct(fieldData);
@ -672,7 +672,7 @@ Entry* KeePass1Reader::readEntry(QIODevice* cipherStream)
case 0x000B: case 0x000B:
{ {
if (fieldSize != 5) { if (fieldSize != 5) {
raiseError("Invalid entry creation time field size"); raiseError(tr("Invalid entry creation time field size"));
return nullptr; return nullptr;
} }
QDateTime dateTime = dateFromPackedStruct(fieldData); QDateTime dateTime = dateFromPackedStruct(fieldData);
@ -684,7 +684,7 @@ Entry* KeePass1Reader::readEntry(QIODevice* cipherStream)
case 0x000C: case 0x000C:
{ {
if (fieldSize != 5) { if (fieldSize != 5) {
raiseError("Invalid entry expiry time field size"); raiseError(tr("Invalid entry expiry time field size"));
return nullptr; return nullptr;
} }
QDateTime dateTime = dateFromPackedStruct(fieldData); QDateTime dateTime = dateFromPackedStruct(fieldData);
@ -707,7 +707,7 @@ Entry* KeePass1Reader::readEntry(QIODevice* cipherStream)
break; break;
default: default:
// invalid field // invalid field
raiseError("Invalid entry field type"); raiseError(tr("Invalid entry field type"));
return nullptr; return nullptr;
} }
} while (!reachedEnd); } while (!reachedEnd);

View File

@ -142,7 +142,7 @@ void DatabaseSettingsWidget::save()
if (kdf->uuid() == KeePass2::KDF_ARGON2 && m_uiEncryption->transformRoundsSpinBox->value() > 10000) { if (kdf->uuid() == KeePass2::KDF_ARGON2 && m_uiEncryption->transformRoundsSpinBox->value() > 10000) {
QMessageBox warning; QMessageBox warning;
warning.setIcon(QMessageBox::Warning); warning.setIcon(QMessageBox::Warning);
warning.setWindowTitle(tr("Number of rounds too high")); warning.setWindowTitle(tr("Number of rounds too high", "Key transformation rounds"));
warning.setText(tr("You are using a very high number of key transform rounds with Argon2.\n\n" warning.setText(tr("You are using a very high number of key transform rounds with Argon2.\n\n"
"If you keep this number, your database may take hours or days (or even longer) to open!")); "If you keep this number, your database may take hours or days (or even longer) to open!"));
auto ok = warning.addButton(tr("Understood, keep number"), QMessageBox::ButtonRole::AcceptRole); auto ok = warning.addButton(tr("Understood, keep number"), QMessageBox::ButtonRole::AcceptRole);
@ -156,7 +156,7 @@ void DatabaseSettingsWidget::save()
&& m_uiEncryption->transformRoundsSpinBox->value() < 100000) { && m_uiEncryption->transformRoundsSpinBox->value() < 100000) {
QMessageBox warning; QMessageBox warning;
warning.setIcon(QMessageBox::Warning); warning.setIcon(QMessageBox::Warning);
warning.setWindowTitle(tr("Number of rounds too low")); warning.setWindowTitle(tr("Number of rounds too low", "Key transformation rounds"));
warning.setText(tr("You are using a very low number of key transform rounds with AES-KDF.\n\n" warning.setText(tr("You are using a very low number of key transform rounds with AES-KDF.\n\n"
"If you keep this number, your database may be too easy to crack!")); "If you keep this number, your database may be too easy to crack!"));
auto ok = warning.addButton(tr("Understood, keep number"), QMessageBox::ButtonRole::AcceptRole); auto ok = warning.addButton(tr("Understood, keep number"), QMessageBox::ButtonRole::AcceptRole);

View File

@ -85,7 +85,7 @@ void DatabaseTabWidget::newDatabase()
{ {
DatabaseManagerStruct dbStruct; DatabaseManagerStruct dbStruct;
Database* db = new Database(); Database* db = new Database();
db->rootGroup()->setName(tr("Root")); db->rootGroup()->setName(tr("Root", "Root group"));
dbStruct.dbWidget = new DatabaseWidget(db, this); dbStruct.dbWidget = new DatabaseWidget(db, this);
CompositeKey emptyKey; CompositeKey emptyKey;

View File

@ -1277,7 +1277,7 @@ void DatabaseWidget::reloadDatabaseFile()
if (! config()->get("AutoReloadOnChange").toBool()) { if (! config()->get("AutoReloadOnChange").toBool()) {
// Ask if we want to reload the db // Ask if we want to reload the db
QMessageBox::StandardButton mb = MessageBox::question(this, tr("Autoreload Request"), QMessageBox::StandardButton mb = MessageBox::question(this, tr("File has changed"),
tr("The database file has changed. Do you want to load the changes?"), tr("The database file has changed. Do you want to load the changes?"),
QMessageBox::Yes | QMessageBox::No); QMessageBox::Yes | QMessageBox::No);

View File

@ -180,7 +180,7 @@
<x>0</x> <x>0</x>
<y>0</y> <y>0</y>
<width>800</width> <width>800</width>
<height>21</height> <height>34</height>
</rect> </rect>
</property> </property>
<widget class="QMenu" name="menuFile"> <widget class="QMenu" name="menuFile">
@ -243,7 +243,7 @@
<bool>false</bool> <bool>false</bool>
</property> </property>
<property name="title"> <property name="title">
<string>Timed one-time password</string> <string>Time-based one-time password</string>
</property> </property>
<addaction name="actionEntryCopyTotp"/> <addaction name="actionEntryCopyTotp"/>
<addaction name="actionEntryTotp"/> <addaction name="actionEntryTotp"/>

View File

@ -283,16 +283,16 @@ void PasswordGeneratorWidget::colorStrengthIndicator(double entropy)
// <https://community.kde.org/KDE_Visual_Design_Group/HIG/Color> // <https://community.kde.org/KDE_Visual_Design_Group/HIG/Color>
if (entropy < 40) { if (entropy < 40) {
m_ui->entropyProgressBar->setStyleSheet(style.arg("#c0392b")); m_ui->entropyProgressBar->setStyleSheet(style.arg("#c0392b"));
m_ui->strengthLabel->setText(tr("Password Quality: %1").arg(tr("Poor"))); m_ui->strengthLabel->setText(tr("Password Quality: %1").arg(tr("Poor", "Password quality")));
} else if (entropy >= 40 && entropy < 65) { } else if (entropy >= 40 && entropy < 65) {
m_ui->entropyProgressBar->setStyleSheet(style.arg("#f39c1f")); m_ui->entropyProgressBar->setStyleSheet(style.arg("#f39c1f"));
m_ui->strengthLabel->setText(tr("Password Quality: %1").arg(tr("Weak"))); m_ui->strengthLabel->setText(tr("Password Quality: %1").arg(tr("Weak", "Password quality")));
} else if (entropy >= 65 && entropy < 100) { } else if (entropy >= 65 && entropy < 100) {
m_ui->entropyProgressBar->setStyleSheet(style.arg("#11d116")); m_ui->entropyProgressBar->setStyleSheet(style.arg("#11d116"));
m_ui->strengthLabel->setText(tr("Password Quality: %1").arg(tr("Good"))); m_ui->strengthLabel->setText(tr("Password Quality: %1").arg(tr("Good", "Password quality")));
} else { } else {
m_ui->entropyProgressBar->setStyleSheet(style.arg("#27ae60")); m_ui->entropyProgressBar->setStyleSheet(style.arg("#27ae60"));
m_ui->strengthLabel->setText(tr("Password Quality: %1").arg(tr("Excellent"))); m_ui->strengthLabel->setText(tr("Password Quality: %1").arg(tr("Excellent", "Password quality")));
} }
} }

View File

@ -2,6 +2,14 @@
<ui version="4.0"> <ui version="4.0">
<class>PasswordGeneratorWidget</class> <class>PasswordGeneratorWidget</class>
<widget class="QWidget" name="PasswordGeneratorWidget"> <widget class="QWidget" name="PasswordGeneratorWidget">
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>547</width>
<height>352</height>
</rect>
</property>
<property name="sizePolicy"> <property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Fixed"> <sizepolicy hsizetype="Preferred" vsizetype="Fixed">
<horstretch>0</horstretch> <horstretch>0</horstretch>
@ -100,7 +108,7 @@ QProgressBar::chunk {
</size> </size>
</property> </property>
<property name="text"> <property name="text">
<string>strength</string> <string comment="Password strength">strength</string>
</property> </property>
<property name="textFormat"> <property name="textFormat">
<enum>Qt::PlainText</enum> <enum>Qt::PlainText</enum>

View File

@ -415,7 +415,7 @@
</sizepolicy> </sizepolicy>
</property> </property>
<property name="suffix"> <property name="suffix">
<string> ms</string> <string comment="Milliseconds"> ms</string>
</property> </property>
<property name="prefix"> <property name="prefix">
<string/> <string/>

View File

@ -7,7 +7,7 @@
<x>0</x> <x>0</x>
<y>0</y> <y>0</y>
<width>595</width> <width>595</width>
<height>443</height> <height>446</height>
</rect> </rect>
</property> </property>
<layout class="QVBoxLayout" name="verticalLayout"> <layout class="QVBoxLayout" name="verticalLayout">
@ -48,7 +48,7 @@
</sizepolicy> </sizepolicy>
</property> </property>
<property name="suffix"> <property name="suffix">
<string> sec</string> <string comment="Seconds"> sec</string>
</property> </property>
<property name="minimum"> <property name="minimum">
<number>1</number> <number>1</number>
@ -86,7 +86,7 @@
</sizepolicy> </sizepolicy>
</property> </property>
<property name="suffix"> <property name="suffix">
<string> sec</string> <string comment="Seconds"> sec</string>
</property> </property>
<property name="minimum"> <property name="minimum">
<number>10</number> <number>10</number>

View File

@ -132,7 +132,7 @@
<bool>false</bool> <bool>false</bool>
</property> </property>
<property name="suffix"> <property name="suffix">
<string> sec</string> <string comment="Seconds"> sec</string>
</property> </property>
<property name="minimum"> <property name="minimum">
<number>1</number> <number>1</number>

View File

@ -6,8 +6,8 @@
<rect> <rect>
<x>0</x> <x>0</x>
<y>0</y> <y>0</y>
<width>471</width> <width>498</width>
<height>480</height> <height>518</height>
</rect> </rect>
</property> </property>
<property name="windowTitle"> <property name="windowTitle">
@ -166,7 +166,7 @@
<item row="3" column="2"> <item row="3" column="2">
<widget class="QPushButton" name="browseButton"> <widget class="QPushButton" name="browseButton">
<property name="text"> <property name="text">
<string>Browse...</string> <string extracomment="Button for opening file dialog">Browse...</string>
</property> </property>
</widget> </widget>
</item> </item>

View File

@ -52,7 +52,7 @@
<item> <item>
<widget class="QCheckBox" name="showNotification"> <widget class="QCheckBox" name="showNotification">
<property name="text"> <property name="text">
<string>Sh&amp;ow a notification when credentials are requested</string> <string extracomment="Credentials mean login data requested via browser extension">Sh&amp;ow a notification when credentials are requested</string>
</property> </property>
<property name="checked"> <property name="checked">
<bool>true</bool> <bool>true</bool>

View File

@ -10,9 +10,6 @@
<height>300</height> <height>300</height>
</rect> </rect>
</property> </property>
<property name="windowTitle">
<string>Form</string>
</property>
<layout class="QVBoxLayout" name="verticalLayout_3"> <layout class="QVBoxLayout" name="verticalLayout_3">
<property name="leftMargin"> <property name="leftMargin">
<number>0</number> <number>0</number>