Address translation feedback from Transifex

This commit is contained in:
Jonathan White 2021-02-14 19:15:10 -05:00
parent 4f7460afbd
commit f3d88fbd36
53 changed files with 152 additions and 156 deletions

View File

@ -92,7 +92,7 @@ AutoTypeSelectDialog::AutoTypeSelectDialog(QWidget* parent)
connect(m_filterLineEdit, SIGNAL(keyDownPressed()), SLOT(moveSelectionDown()));
connect(m_filterLineEdit, SIGNAL(escapeReleased()), SLOT(reject()));
m_filterLineEdit->setPlaceholderText(tr("Search..."));
m_filterLineEdit->setPlaceholderText(tr("Search"));
layout->addWidget(m_filterLineEdit);
QDialogButtonBox* buttonBox = new QDialogButtonBox(QDialogButtonBox::Cancel, Qt::Horizontal, this);

View File

@ -209,10 +209,10 @@
<item>
<widget class="QCheckBox" name="matchUrlScheme">
<property name="toolTip">
<string>Only entries with the same scheme (http://, https://, ...) are returned.</string>
<string>Only entries with the same scheme (http://, https://, ) are returned.</string>
</property>
<property name="text">
<string>Match URL scheme (e.g., https://...)</string>
<string>Match URL scheme (e.g., https://example.com)</string>
</property>
</widget>
</item>
@ -400,7 +400,7 @@
<string>Browser for custom proxy file</string>
</property>
<property name="text">
<string extracomment="Button for opening file dialog">Browse...</string>
<string extracomment="Button for opening file dialog">Browse</string>
</property>
</widget>
</item>
@ -539,7 +539,7 @@
<string>Browse for custom browser path</string>
</property>
<property name="text">
<string extracomment="Button for opening file dialog">Browse...</string>
<string extracomment="Button for opening file dialog">Browse</string>
</property>
</widget>
</item>

View File

@ -83,7 +83,7 @@ int Add::executeWithDatabase(QSharedPointer<Database> database, QSharedPointer<Q
// Cannot use those 2 options at the same time!
if (parser->isSet(Add::GenerateOption) && parser->isSet(Add::PasswordPromptOption)) {
err << QObject::tr("Cannot generate a password and prompt at the same time!") << endl;
err << QObject::tr("Cannot generate a password and prompt at the same time.") << endl;
return EXIT_FAILURE;
}

View File

@ -63,7 +63,7 @@ int Analyze::executeWithDatabase(QSharedPointer<Database> database, QSharedPoint
auto okon = parser->value(Analyze::OkonOption);
if (!okon.isEmpty()) {
out << QObject::tr("Evaluating database entries using okon...") << endl;
out << QObject::tr("Evaluating database entries using okon") << endl;
if (!HibpOffline::okonReport(database, okon, hibpDatabase, findings, &error)) {
err << error << endl;
@ -76,7 +76,7 @@ int Analyze::executeWithDatabase(QSharedPointer<Database> database, QSharedPoint
return EXIT_FAILURE;
}
out << QObject::tr("Evaluating database entries against HIBP file, this will take a while...") << endl;
out << QObject::tr("Evaluating database entries against HIBP file, this will take a while") << endl;
if (!HibpOffline::report(database, hibpFile, findings, &error)) {
err << error << endl;

View File

@ -31,7 +31,8 @@
const QCommandLineOption Clip::AttributeOption = QCommandLineOption(
QStringList() << "a"
<< "attribute",
QObject::tr("Copy the given attribute to the clipboard. Defaults to \"password\" if not specified."),
QObject::tr("Copy the given attribute to the clipboard. Defaults to \"password\" if not specified.",
"Don't translate \"password\", it refers to the attribute."),
"attr",
"password");
@ -40,10 +41,10 @@ const QCommandLineOption Clip::TotpOption =
<< "totp",
QObject::tr("Copy the current TOTP to the clipboard (equivalent to \"-a totp\")."));
const QCommandLineOption Clip::BestMatchOption = QCommandLineOption(
QStringList() << "b"
<< "best-match",
QObject::tr("Try to find the unique entry matching, will fail and display the list of matches otherwise."));
const QCommandLineOption Clip::BestMatchOption =
QCommandLineOption(QStringList() << "b"
<< "best-match",
QObject::tr("Must match only one entry, otherwise a list of possible matches is shown."));
Clip::Clip()
{
@ -81,7 +82,7 @@ int Clip::executeWithDatabase(QSharedPointer<Database> database, QSharedPointer<
return EXIT_FAILURE;
} else {
bestEntryPath = (results.isEmpty()) ? args.at(1) : results[0];
out << QObject::tr("Matching \"%1\" entry used.").arg(bestEntryPath) << endl;
out << QObject::tr("Used matching entry: %1").arg(bestEntryPath) << endl;
}
} else {
bestEntryPath = args.at(1);
@ -152,7 +153,7 @@ int Clip::executeWithDatabase(QSharedPointer<Database> database, QSharedPointer<
QString lastLine = "";
while (timeoutSeconds > 0) {
out << '\r' << QString(lastLine.size(), ' ') << '\r';
lastLine = QObject::tr("Clearing the clipboard in %1 second(s)...", "", timeoutSeconds).arg(timeoutSeconds);
lastLine = QObject::tr("Clearing the clipboard in %1 second(s)", "", timeoutSeconds).arg(timeoutSeconds);
out << lastLine << flush;
std::this_thread::sleep_for(std::chrono::milliseconds(1000));
--timeoutSeconds;

View File

@ -69,7 +69,7 @@ int Edit::executeWithDatabase(QSharedPointer<Database> database, QSharedPointer<
// Cannot use those 2 options at the same time!
if (parser->isSet(Add::GenerateOption) && parser->isSet(Add::PasswordPromptOption)) {
err << QObject::tr("Cannot generate a password and prompt at the same time!") << endl;
err << QObject::tr("Cannot generate a password and prompt at the same time.") << endl;
return EXIT_FAILURE;
}

View File

@ -59,12 +59,12 @@ static void estimate(const char* pwd, bool advanced)
<< QObject::tr("Log10 %1").arg(e * 0.301029996, 0, 'f', 3) << endl;
// clang-format on
} else {
int ChkLen = 0;
int pwdLen = 0;
ZxcMatch_t *info, *p;
double m = 0.0;
const auto e = ZxcvbnMatch(pwd, nullptr, &info);
for (p = info; p; p = p->Next) {
m += p->Entrpy;
m += p->Entropy;
}
m = e - m;
// clang-format off
@ -74,7 +74,7 @@ static void estimate(const char* pwd, bool advanced)
<< QObject::tr("Multi-word extra bits %1").arg(m, 0, 'f', 1) << endl;
// clang-format on
p = info;
ChkLen = 0;
pwdLen = 0;
while (p) {
int n;
switch (static_cast<int>(p->Type)) {
@ -134,14 +134,13 @@ static void estimate(const char* pwd, bool advanced)
break;
default:
out << " " << QObject::tr("Type: Unknown%1").arg(p->Type) << " ";
out << " " << QObject::tr("Type: Unknown (%1)").arg(p->Type) << " ";
break;
}
ChkLen += p->Length;
// clang-format off
pwdLen += p->Length;
out << QObject::tr("Length %1").arg(p->Length) << '\t'
<< QObject::tr("Entropy %1 (%2)").arg(p->Entrpy, 6, 'f', 3).arg(p->Entrpy * 0.301029996, 0, 'f', 2) << '\t';
// clang-format on
<< QObject::tr("Entropy %1 (%2)").arg(p->Entropy, 6, 'f', 3).arg(p->Entropy * 0.301029996, 0, 'f', 2)
<< '\t';
for (n = 0; n < p->Length; ++n, ++pwd) {
out << *pwd;
}
@ -149,8 +148,8 @@ static void estimate(const char* pwd, bool advanced)
p = p->Next;
}
ZxcvbnFreeInfo(info);
if (ChkLen != len) {
out << QObject::tr("*** Password length (%1) != sum of length of parts (%2) ***").arg(len).arg(ChkLen)
if (pwdLen != len) {
out << QObject::tr("*** Password length (%1) != sum of length of parts (%2) ***").arg(len).arg(pwdLen)
<< endl;
}
}

View File

@ -63,7 +63,7 @@ bool CsvParser::reparse()
bool CsvParser::parse(QFile* device)
{
clear();
if (nullptr == device) {
if (!device) {
appendStatusMsg(QObject::tr("NULL device"), true);
return false;
}
@ -88,7 +88,7 @@ bool CsvParser::readFile(QFile* device)
m_array.replace("\r\n", "\n");
m_array.replace("\r", "\n");
if (0 == m_array.size()) {
if (m_array.isEmpty()) {
appendStatusMsg(QObject::tr("file empty").append("\n"));
}
m_isFileLoaded = true;
@ -196,7 +196,6 @@ void CsvParser::parseQuoted(QString& s)
// read and discard initial qualifier (e.g. quote)
getChar(m_ch);
parseEscaped(s);
// getChar(m_ch);
if (!isQualifier(m_ch)) {
appendStatusMsg(QObject::tr("missing closing quote"), true);
}

View File

@ -371,7 +371,7 @@ bool Database::writeDatabase(QIODevice* device, QString* error)
Q_ASSERT(newKey != oldTransformedKey.rawKey());
if (newKey.isEmpty() || newKey == oldTransformedKey.rawKey()) {
if (error) {
*error = tr("Key not transformed. This is a bug, please report it to the developers!");
*error = tr("Key not transformed. This is a bug, please report it to the developers.");
}
return false;
}

View File

@ -115,7 +115,7 @@ namespace HibpOffline
QString* error)
{
if (!okonDatabase.endsWith(".okon")) {
*error = QObject::tr("To use okon you must provide a post-processed file (e.g. file.okon)");
*error = QObject::tr("To use okon, you must provide a post-processed file (e.g. file.okon)");
return false;
}

View File

@ -34,13 +34,13 @@ PasswordHealth::PasswordHealth(double entropy)
switch (quality()) {
case Quality::Bad:
case Quality::Poor:
m_scoreReasons << QApplication::tr("Very weak password");
m_scoreDetails << QApplication::tr("Password entropy is %1 bits").arg(QString::number(m_entropy, 'f', 2));
m_scoreReasons << QObject::tr("Very weak password");
m_scoreDetails << QObject::tr("Password entropy is %1 bits").arg(QString::number(m_entropy, 'f', 2));
break;
case Quality::Weak:
m_scoreReasons << QApplication::tr("Weak password");
m_scoreDetails << QApplication::tr("Password entropy is %1 bits").arg(QString::number(m_entropy, 'f', 2));
m_scoreReasons << QObject::tr("Weak password");
m_scoreDetails << QObject::tr("Password entropy is %1 bits").arg(QString::number(m_entropy, 'f', 2));
break;
default:
@ -108,7 +108,7 @@ HealthChecker::HealthChecker(QSharedPointer<Database> db)
for (const auto* entry : db->rootGroup()->entriesRecursive()) {
if (!entry->isRecycled() && !entry->isAttributeReference("Password")) {
m_reuse[entry->password()]
<< QApplication::tr("Used in %1/%2").arg(entry->group()->hierarchy().join('/'), entry->title());
<< QObject::tr("Used in %1/%2").arg(entry->group()->hierarchy().join('/'), entry->title());
}
}
}
@ -137,7 +137,7 @@ QSharedPointer<PasswordHealth> HealthChecker::evaluate(const Entry* entry) const
if (count > 1) {
constexpr auto penalty = 15;
health->adjustScore(-penalty * (count - 1));
health->addScoreReason(QApplication::tr("Password is used %1 times").arg(QString::number(count)));
health->addScoreReason(QObject::tr("Password is used %1 time(s)", "", count).arg(QString::number(count)));
// Add the first 20 uses of the password to prevent the details display from growing too large
for (int i = 0; i < used.size(); ++i) {
health->addScoreDetails(used[i]);
@ -159,11 +159,11 @@ QSharedPointer<PasswordHealth> HealthChecker::evaluate(const Entry* entry) const
// reduce score by 2 points per day.
if (entry->isExpired()) {
health->setScore(0);
health->addScoreReason(QApplication::tr("Password has expired"));
health->addScoreDetails(QApplication::tr("Password expiry was %1")
health->addScoreReason(QObject::tr("Password has expired"));
health->addScoreDetails(QObject::tr("Password expiry was %1")
.arg(entry->timeInfo().expiryTime().toString(Qt::DefaultLocaleShortDate)));
} else if (entry->timeInfo().expires()) {
const auto days = QDateTime::currentDateTime().daysTo(entry->timeInfo().expiryTime());
const int days = QDateTime::currentDateTime().daysTo(entry->timeInfo().expiryTime());
if (days <= 30) {
// First bring the score down into the "weak" range
// so that the entry appears in Health Check. Then
@ -173,14 +173,17 @@ QSharedPointer<PasswordHealth> HealthChecker::evaluate(const Entry* entry) const
if (health->score() > 60) {
health->setScore(60);
}
// clang-format off
health->adjustScore((30 - days) * -2);
health->addScoreReason(days <= 2 ? QApplication::tr("Password is about to expire")
: days <= 10 ? QApplication::tr("Password expires in %1 days").arg(days)
: QApplication::tr("Password will expire soon"));
health->addScoreDetails(QApplication::tr("Password expires on %1")
health->addScoreDetails(QObject::tr("Password expires on %1")
.arg(entry->timeInfo().expiryTime().toString(Qt::DefaultLocaleShortDate)));
//clang-format on
if (days <= 2) {
health->addScoreReason(QObject::tr("Password is about to expire"));
} else if (days <= 10) {
health->addScoreReason(QObject::tr("Password expires in %1 day(s)", "", days).arg(days));
} else {
health->addScoreReason(QObject::tr("Password will expire soon"));
}
}
}

View File

@ -590,7 +590,7 @@ Entry* KeePass1Reader::readEntry(QIODevice* cipherStream)
break;
case 0x0001:
if (fieldSize != 16) {
raiseError(tr("Invalid entry uuid field size"));
raiseError(tr("Invalid entry UUID field size"));
return nullptr;
}
m_entryUuids.insert(fieldData, entry.data());

View File

@ -71,7 +71,7 @@ bool KeePass2Reader::readDatabase(QIODevice* device, QSharedPointer<const Compos
if (signature1 == KeePass1::SIGNATURE_1 && signature2 == KeePass1::SIGNATURE_2) {
raiseError(tr("The selected file is an old KeePass 1 database (.kdb).\n\n"
"You can import it by clicking on Database > 'Import KeePass 1 database...'.\n"
"You can import it by clicking on Database > 'Import KeePass 1 database'.\n"
"This is a one-way migration. You won't be able to open the imported "
"database with the old KeePassX 0.4 version."));
return false;

View File

@ -11,7 +11,7 @@
</rect>
</property>
<property name="windowTitle">
<string>Clone Options</string>
<string>Clone Entry Options</string>
</property>
<layout class="QVBoxLayout" name="verticalLayout">
<item>

View File

@ -309,7 +309,7 @@ QSharedPointer<CompositeKey> DatabaseOpenWidget::buildDatabaseKey()
legacyWarning.setText(tr("You are using an old key file format which KeePassXC may<br>"
"stop supporting in the future.<br><br>"
"Please consider generating a new key file by going to:<br>"
"<strong>Database / Database Security / Change Key File.</strong><br>"));
"<strong>Database &gt; Database Security &gt; Change Key File.</strong><br>"));
legacyWarning.setIcon(QMessageBox::Icon::Warning);
legacyWarning.addButton(QMessageBox::Ok);
legacyWarning.setDefaultButton(QMessageBox::Ok);

View File

@ -250,7 +250,7 @@
<enum>Qt::ClickFocus</enum>
</property>
<property name="toolTip">
<string>&lt;p&gt;In addition to a password, you can use a secret file to enhance the security of your database. This file can be generated in your database's security settings.&lt;/p&gt;&lt;p&gt;This is &lt;strong&gt;not&lt;/strong&gt; your *.kdbx database file!&lt;br&gt;If you do not have a key file, leave this field empty.&lt;/p&gt;&lt;p&gt;Click for more information...&lt;/p&gt;</string>
<string>&lt;p&gt;In addition to a password, you can use a secret file to enhance the security of your database. This file can be generated in your database's security settings.&lt;/p&gt;&lt;p&gt;This is &lt;strong&gt;not&lt;/strong&gt; your *.kdbx database file!&lt;br&gt;If you do not have a key file, leave this field empty.&lt;/p&gt;&lt;p&gt;Click for more information&lt;/p&gt;</string>
</property>
<property name="accessibleName">
<string>Key file help</string>
@ -355,7 +355,7 @@
</property>
<property name="toolTip">
<string>&lt;p&gt;You can use a hardware security key such as a &lt;strong&gt;YubiKey&lt;/strong&gt; or &lt;strong&gt;OnlyKey&lt;/strong&gt; with slots configured for HMAC-SHA1.&lt;/p&gt;
&lt;p&gt;Click for more information...&lt;/p&gt;</string>
&lt;p&gt;Click for more information&lt;/p&gt;</string>
</property>
<property name="accessibleName">
<string>Hardware key help</string>
@ -435,7 +435,7 @@
<string>Browse for key file</string>
</property>
<property name="text">
<string>Browse...</string>
<string>Browse</string>
</property>
</widget>
</item>

View File

@ -142,13 +142,13 @@ DatabaseWidget::DatabaseWidget(QSharedPointer<Database> db, QWidget* parent)
// Add a notification for when we are searching
m_searchingLabel->setObjectName("SearchBanner");
m_searchingLabel->setText(tr("Searching..."));
m_searchingLabel->setText(tr("Searching"));
m_searchingLabel->setAlignment(Qt::AlignCenter);
m_searchingLabel->setVisible(false);
#ifdef WITH_XC_KEESHARE
m_shareLabel->setObjectName("KeeShareBanner");
m_shareLabel->setText(tr("Shared group..."));
m_shareLabel->setText(tr("Shared group"));
m_shareLabel->setAlignment(Qt::AlignCenter);
m_shareLabel->setVisible(false);
#endif
@ -1440,7 +1440,7 @@ void DatabaseWidget::endSearch()
}
m_searchingLabel->setVisible(false);
m_searchingLabel->setText(tr("Searching..."));
m_searchingLabel->setText(tr("Searching"));
m_lastSearchText.clear();

View File

@ -167,7 +167,7 @@
<string notr="true">padding: 4px 10px</string>
</property>
<property name="text">
<string>Apply icon to...</string>
<string>Apply icon to</string>
</property>
</widget>
</item>

View File

@ -17,15 +17,10 @@
*/
#include "EntryPreviewWidget.h"
#include "Font.h"
#include "ui_EntryPreviewWidget.h"
#include <QDesktopServices>
#include <QDir>
#include "core/Config.h"
#include "Font.h"
#include "entry/EntryAttachmentsModel.h"
#include "gui/Clipboard.h"
#include "gui/Icons.h"
#if defined(WITH_XC_KEESHARE)
#include "keeshare/KeeShare.h"
@ -296,9 +291,9 @@ void EntryPreviewWidget::updateEntryAdvancedTab()
value = "<i>" + tr("[PROTECTED]") + "</i>";
} else {
value = m_currentEntry->attributes()->value(key).toHtmlEscaped();
value.replace('\n', QLatin1String("<br/>"));
value.replace('\n', "<br/>");
}
attributesText.append(tr("<tr><td><b>%1</b>:</td><td>%2</td></tr>", "attributes line").arg(key, value));
attributesText.append(QString("<tr><td><b>%1</b>:</td><td>%2</td></tr>").arg(key, value));
}
attributesText.append("</table>");
m_ui->entryAttributesEdit->setText(attributesText);
@ -417,5 +412,5 @@ void EntryPreviewWidget::setTabEnabled(QTabWidget* tabWidget, QWidget* widget, b
QString EntryPreviewWidget::hierarchy(const Group* group, const QString& title)
{
QString groupList = QString("%1").arg(group->hierarchy().join(" / "));
return title.isEmpty() ? groupList : QStringLiteral("%1 / %2").arg(groupList, title);
return title.isEmpty() ? groupList : QString("%1 / %2").arg(groupList, title);
}

View File

@ -80,13 +80,13 @@ void IconDownloaderDialog::downloadFavicons(const QSharedPointer<Database>& data
Tools::wait(100);
#endif
showFallbackMessage(false);
m_ui->progressLabel->setText(tr("Please wait, processing entry list..."));
m_ui->progressLabel->setText(tr("Please wait, processing entry list"));
open();
QApplication::processEvents();
for (const auto& url : m_urlToEntries.uniqueKeys()) {
m_dataModel->appendRow(QList<QStandardItem*>()
<< new QStandardItem(url) << new QStandardItem(tr("Downloading...")));
<< new QStandardItem(url) << new QStandardItem(tr("Downloading")));
m_activeDownloaders.append(createDownloader(url));
}
@ -170,7 +170,7 @@ void IconDownloaderDialog::updateProgressBar()
m_ui->progressBar->setValue(value);
m_ui->progressBar->setMaximum(total);
m_ui->progressLabel->setText(
tr("Downloading favicons (%1/%2)...").arg(QString::number(value), QString::number(total)));
tr("Downloading favicons (%1/%2)").arg(QString::number(value), QString::number(total)));
}
void IconDownloaderDialog::updateCancelButton()

View File

@ -29,7 +29,7 @@
</font>
</property>
<property name="text">
<string notr="true">Downloading favicon 0/0...</string>
<string notr="true">Downloading favicon 0/0</string>
</property>
</widget>
</item>

View File

@ -584,7 +584,7 @@ MainWindow::MainWindow()
#if defined(KEEPASSXC_BUILD_TYPE_SNAPSHOT)
if (config()->get(Config::Messages_HidePreReleaseWarning) != KEEPASSXC_VERSION) {
m_ui->globalMessageWidget->showMessage(
tr("WARNING: You are using an unstable build of KeePassXC!\n"
tr("WARNING: You are using an unstable build of KeePassXC.\n"
"There is a high risk of corruption, maintain a backup of your databases.\n"
"This version is not meant for production use."),
MessageWidget::Warning,
@ -593,15 +593,15 @@ MainWindow::MainWindow()
#elif defined(KEEPASSXC_BUILD_TYPE_PRE_RELEASE)
if (config()->get(Config::Messages_HidePreReleaseWarning) != KEEPASSXC_VERSION) {
m_ui->globalMessageWidget->showMessage(
tr("NOTE: You are using a pre-release version of KeePassXC!\n"
"Expect some bugs and minor issues, this version is not meant for production use."),
tr("NOTE: You are using a pre-release version of KeePassXC.\n"
"Expect some bugs and minor issues, this version is meant for testing purposes."),
MessageWidget::Information,
-1);
}
#elif (QT_VERSION >= QT_VERSION_CHECK(5, 5, 0) && QT_VERSION < QT_VERSION_CHECK(5, 6, 0))
if (!config()->get(Config::Messages_Qt55CompatibilityWarning).toBool()) {
m_ui->globalMessageWidget->showMessage(
tr("WARNING: Your Qt version may cause KeePassXC to crash with an On-Screen Keyboard!\n"
tr("WARNING: Your Qt version may cause KeePassXC to crash with an On-Screen Keyboard.\n"
"We recommend you use the AppImage available on our downloads page."),
MessageWidget::Warning,
-1);

View File

@ -595,7 +595,7 @@
<bool>false</bool>
</property>
<property name="text">
<string>Database &amp;Reports...</string>
<string>Database &amp;Reports</string>
</property>
<property name="toolTip">
<string>Statistics, health check, etc.</string>
@ -702,7 +702,7 @@
<bool>false</bool>
</property>
<property name="text">
<string>{USERNAME}</string>
<string notr="true">{USERNAME}</string>
</property>
</action>
<action name="actionEntryAutoTypeUsernameEnter">
@ -710,7 +710,7 @@
<bool>false</bool>
</property>
<property name="text">
<string>{USERNAME}{ENTER}</string>
<string notr="true">{USERNAME}{ENTER}</string>
</property>
</action>
<action name="actionEntryAutoTypePassword">
@ -718,7 +718,7 @@
<bool>false</bool>
</property>
<property name="text">
<string>{PASSWORD}</string>
<string notr="true">{PASSWORD}</string>
</property>
</action>
<action name="actionEntryAutoTypePasswordEnter">
@ -726,7 +726,7 @@
<bool>false</bool>
</property>
<property name="text">
<string>{PASSWORD}{ENTER}</string>
<string notr="true">{PASSWORD}{ENTER}</string>
</property>
</action>
<action name="actionEntryDownloadIcon">
@ -898,7 +898,7 @@
<bool>false</bool>
</property>
<property name="text">
<string>Save Database Backup...</string>
<string>Save Database Backup</string>
</property>
</action>
<action name="actionEntryAddToAgent">

View File

@ -54,7 +54,7 @@ SearchWidget::SearchWidget(QWidget* parent)
new QShortcut(QKeySequence::Find, this, SLOT(searchFocus()), nullptr, Qt::ApplicationShortcut);
new QShortcut(Qt::Key_Escape, m_ui->searchEdit, SLOT(clear()), nullptr, Qt::ApplicationShortcut);
m_ui->searchEdit->setPlaceholderText(tr("Search (%1)...", "Search placeholder text, %1 is the keyboard shortcut")
m_ui->searchEdit->setPlaceholderText(tr("Search (%1)", "Search placeholder text, %1 is the keyboard shortcut")
.arg(QKeySequence(QKeySequence::Find).toString(QKeySequence::NativeText)));
m_ui->searchEdit->installEventFilter(this);

View File

@ -71,7 +71,7 @@
<item>
<widget class="QRadioButton" name="radioDefault">
<property name="text">
<string>Default RFC 6238 token settings</string>
<string>Default settings (RFC 6238)</string>
</property>
<property name="checked">
<bool>true</bool>
@ -84,7 +84,7 @@
<item>
<widget class="QRadioButton" name="radioSteam">
<property name="text">
<string>Steam token settings</string>
<string>Steam® settings</string>
</property>
<attribute name="buttonGroup">
<string notr="true">settingsButtonGroup</string>
@ -94,7 +94,7 @@
<item>
<widget class="QRadioButton" name="radioCustom">
<property name="text">
<string>Use custom settings</string>
<string>Custom settings:</string>
</property>
<attribute name="buttonGroup">
<string notr="true">settingsButtonGroup</string>

View File

@ -16,9 +16,9 @@
*/
#include "UpdateCheckDialog.h"
#include "gui/Icons.h"
#include "ui_UpdateCheckDialog.h"
#include "updatecheck/UpdateChecker.h"
#include "gui/Icons.h"
UpdateCheckDialog::UpdateCheckDialog(QWidget* parent)
: QDialog(parent)
@ -36,29 +36,23 @@ UpdateCheckDialog::UpdateCheckDialog(QWidget* parent)
SLOT(showUpdateCheckResponse(bool, QString)));
}
void UpdateCheckDialog::showUpdateCheckResponse(bool status, const QString& version)
void UpdateCheckDialog::showUpdateCheckResponse(bool hasUpdate, const QString& version)
{
m_ui->progressBar->setVisible(false);
m_ui->buttonBox->button(QDialogButtonBox::Cancel)->setText(tr("Close"));
if (version == QString("error")) {
setWindowTitle(tr("Update Error!"));
setWindowTitle(tr("Software Update"));
m_ui->statusLabel->setText("<strong>" + tr("Update Error!") + "</strong><br><br>"
+ tr("An error occurred in retrieving update information.") + "<br>"
+ tr("Please try again later."));
return;
}
if (status) {
setWindowTitle(tr("Software Update"));
m_ui->statusLabel->setText("<strong>" + tr("A new version of KeePassXC is available!") + "</strong><br><br>"
+ tr("KeePassXC %1 is now available — you have %2.").arg(version, KEEPASSXC_VERSION)
+ "<br><br>" + "<a href='https://keepassxc.org/download/'>"
+ tr("Download it at keepassxc.org") + "</a>");
if (version == UpdateChecker::ErrorVersion) {
m_ui->statusLabel->setText(
tr("An error occurred when trying to retrieve update information, please try again later."));
} else if (hasUpdate) {
m_ui->statusLabel->setText(
tr("<strong>A new version is available.</strong><br/>"
"KeePassXC %1 can be <a href=\"https://keepassxc.org/download/\">downloaded here</a>.")
.arg(version, KEEPASSXC_VERSION));
} else {
setWindowTitle(tr("You're up-to-date!"));
m_ui->statusLabel->setText(tr("KeePassXC %1 is currently the newest version available").arg(KEEPASSXC_VERSION));
m_ui->statusLabel->setText(tr("You have the latest version of KeePassXC"));
}
}

View File

@ -40,7 +40,7 @@ public:
~UpdateCheckDialog() override;
public slots:
void showUpdateCheckResponse(bool status, const QString& version);
void showUpdateCheckResponse(bool hasUpdate, const QString& version);
private:
QScopedPointer<Ui::UpdateCheckDialog> m_ui;

View File

@ -76,7 +76,7 @@
</font>
</property>
<property name="text">
<string>Checking for updates...</string>
<string>Checking for updates</string>
</property>
<property name="textFormat">
<enum>Qt::RichText</enum>

View File

@ -109,7 +109,7 @@ void KeyFileEditWidget::createKeyFile()
return;
}
QString filters = QString("%1 (*.keyx; *.key);;%2 (*)").arg(tr("Key files"), tr("All files"));
QString fileName = fileDialog()->getSaveFileName(this, tr("Create Key File..."), QString(), filters);
QString fileName = fileDialog()->getSaveFileName(this, tr("Create Key File"), QString(), filters);
if (!fileName.isEmpty()) {
QString errorMsg;

View File

@ -45,7 +45,7 @@
<string>Browse for key file</string>
</property>
<property name="text">
<string>Browse...</string>
<string>Browse</string>
</property>
</widget>
</item>

View File

@ -250,7 +250,7 @@ void DatabaseSettingsWidgetBrowser::convertAttributesToCustomData()
!= MessageBox::question(
this,
tr("Move KeePassHTTP attributes to custom data"),
tr("Do you really want to move all legacy browser integration data to the latest standard?\n"
tr("Do you really want to convert all legacy browser integration data to the latest standard?\n"
"This is necessary to maintain compatibility with the browser plugin."),
MessageBox::Yes | MessageBox::Cancel,
MessageBox::Cancel)) {

View File

@ -32,7 +32,7 @@
DatabaseSettingsWidgetDatabaseKey::DatabaseSettingsWidgetDatabaseKey(QWidget* parent)
: DatabaseSettingsWidget(parent)
, m_additionalKeyOptionsToggle(new QPushButton(tr("Add additional protection..."), this))
, m_additionalKeyOptionsToggle(new QPushButton(tr("Add additional protection"), this))
, m_additionalKeyOptions(new QWidget(this))
, m_passwordEditWidget(new PasswordEditWidget(this))
, m_keyFileEditWidget(new KeyFileEditWidget(this))

View File

@ -258,7 +258,7 @@ bool DatabaseSettingsWidgetEncryption::save()
warning.setIcon(QMessageBox::Warning);
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"
"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, days, or even longer to open."));
auto ok = warning.addButton(tr("Understood, keep number"), QMessageBox::ButtonRole::AcceptRole);
auto cancel = warning.addButton(tr("Cancel"), QMessageBox::ButtonRole::RejectRole);
warning.setDefaultButton(cancel);
@ -271,7 +271,7 @@ bool DatabaseSettingsWidgetEncryption::save()
warning.setIcon(QMessageBox::Warning);
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"
"If you keep this number, your database may be too easy to crack!"));
"If you keep this number, your database will not be protected from brute force attacks."));
auto ok = warning.addButton(tr("Understood, keep number"), QMessageBox::ButtonRole::AcceptRole);
auto cancel = warning.addButton(tr("Cancel"), QMessageBox::ButtonRole::RejectRole);
warning.setDefaultButton(cancel);

View File

@ -38,7 +38,7 @@
<item>
<widget class="QGroupBox" name="groupBox">
<property name="title">
<string>Database Meta Data</string>
<string>Database Metadata</string>
</property>
<layout class="QFormLayout" name="formLayout">
<item row="0" column="0">

View File

@ -199,7 +199,7 @@
<string>Url field</string>
</property>
<property name="placeholderText">
<string>https://example.com</string>
<string notr="true">https://example.com</string>
</property>
</widget>
</item>

View File

@ -131,7 +131,7 @@
<string>Browser for key file</string>
</property>
<property name="text">
<string extracomment="Button for opening file dialog">Browse...</string>
<string extracomment="Button for opening file dialog">Browse</string>
</property>
</widget>
</item>

View File

@ -29,7 +29,7 @@ ReportsPageHealthcheck::ReportsPageHealthcheck()
QString ReportsPageHealthcheck::name()
{
return QApplication::tr("Health Check");
return QObject::tr("Health Check");
}
QIcon ReportsPageHealthcheck::icon()

View File

@ -29,7 +29,7 @@ ReportsPageHibp::ReportsPageHibp()
QString ReportsPageHibp::name()
{
return QApplication::tr("HIBP");
return QObject::tr("HIBP");
}
QIcon ReportsPageHibp::icon()

View File

@ -24,7 +24,7 @@
QString ReportsPageStatistics::name()
{
return QApplication::tr("Statistics");
return QObject::tr("Statistics");
}
QIcon ReportsPageStatistics::icon()

View File

@ -235,7 +235,7 @@ void ReportsWidgetHealthcheck::loadSettings(QSharedPointer<Database> db)
m_rowToEntry.clear();
auto row = QList<QStandardItem*>();
row << new QStandardItem(tr("Please wait, health data is being calculated..."));
row << new QStandardItem(tr("Please wait, health data is being calculated"));
m_referencesModel->appendRow(row);
}
@ -325,7 +325,7 @@ void ReportsWidgetHealthcheck::customMenuRequested(QPoint pos)
const auto menu = new QMenu(this);
// Create the "edit entry" menu item
const auto edit = new QAction(icons()->icon("entry-edit"), tr("Edit Entry..."), this);
const auto edit = new QAction(icons()->icon("entry-edit"), tr("Edit Entry"), this);
menu->addAction(edit);
connect(edit, SIGNAL(triggered()), SLOT(editFromContextmenu()));

View File

@ -297,22 +297,22 @@ void ReportsWidgetHibp::startValidation()
QString ReportsWidgetHibp::countToText(int count)
{
if (count == 1) {
return tr("once");
return tr("once", "Password exposure amount");
} else if (count <= 10) {
return tr("up to 10 times");
return tr("up to 10 times", "Password exposure amount");
} else if (count <= 100) {
return tr("up to 100 times");
return tr("up to 100 times", "Password exposure amount");
} else if (count <= 1000) {
return tr("up to 1000 times");
return tr("up to 1000 times", "Password exposure amount");
} else if (count <= 10000) {
return tr("up to 10,000 times");
return tr("up to 10,000 times", "Password exposure amount");
} else if (count <= 100000) {
return tr("up to 100,000 times");
return tr("up to 100,000 times", "Password exposure amount");
} else if (count <= 1000000) {
return tr("up to a million times");
return tr("up to a million times", "Password exposure amount");
}
return tr("millions of times");
return tr("millions of times", "Password exposure amount");
}
/*
@ -387,7 +387,7 @@ void ReportsWidgetHibp::customMenuRequested(QPoint pos)
const auto menu = new QMenu(this);
// Create the "edit entry" menu item
const auto edit = new QAction(icons()->icon("entry-edit"), tr("Edit Entry..."), this);
const auto edit = new QAction(icons()->icon("entry-edit"), tr("Edit Entry"), this);
menu->addAction(edit);
connect(edit, SIGNAL(triggered()), SLOT(editFromContextmenu()));

View File

@ -193,7 +193,7 @@ void ReportsWidgetStatistics::loadSettings(QSharedPointer<Database> db)
m_db = std::move(db);
m_statsCalculated = false;
m_referencesModel->clear();
addStatsRow(tr("Please wait, database statistics are being calculated..."), "");
addStatsRow(tr("Please wait, database statistics are being calculated"), "");
}
void ReportsWidgetStatistics::showEvent(QShowEvent* event)

View File

@ -48,7 +48,7 @@ NewDatabaseWizard::NewDatabaseWizard(QWidget* parent)
addPage(page);
}
setWindowTitle(tr("Create a new KeePassXC database..."));
setWindowTitle(tr("Create a new KeePassXC database"));
Q_INIT_RESOURCE(wizard);
setPixmap(QWizard::BackgroundPixmap, QPixmap(":/wizard/background-pixmap.png"));

View File

@ -27,7 +27,7 @@
QString DatabaseSettingsPageKeeShare::name()
{
return QApplication::tr("KeeShare");
return "KeeShare";
}
QIcon DatabaseSettingsPageKeeShare::icon()

View File

@ -34,7 +34,7 @@ SettingsPageKeeShare::SettingsPageKeeShare(DatabaseTabWidget* tabWidget)
QString SettingsPageKeeShare::name()
{
return QApplication::tr("KeeShare");
return "KeeShare";
}
QIcon SettingsPageKeeShare::icon()

View File

@ -29,7 +29,7 @@ EditGroupPageKeeShare::EditGroupPageKeeShare(EditGroupWidget* widget)
QString EditGroupPageKeeShare::name()
{
return QApplication::tr("KeeShare");
return "KeeShare";
}
QIcon EditGroupPageKeeShare::icon()

View File

@ -132,7 +132,7 @@
<string>Browse for share file</string>
</property>
<property name="text">
<string>Browse...</string>
<string>Browse</string>
</property>
</widget>
</item>

View File

@ -188,11 +188,13 @@ void YubiKey::findValidKeys()
.arg(vender, QString::number(serial), QString::number(slot));
ykSlots.append({slot, display});
} else if (performTestChallenge(yk_key, slot, &wouldBlock)) {
auto display = tr("%1 [%2] Challenge Response - Slot %3 - %4")
.arg(vender,
QString::number(serial),
QString::number(slot),
wouldBlock ? tr("Press") : tr("Passive"));
auto display =
tr("%1 [%2] Challenge-Response - Slot %3 - %4")
.arg(vender,
QString::number(serial),
QString::number(slot),
wouldBlock ? tr("Press", "Challenge-Response Key interaction request")
: tr("Passive", "Challenge-Response Key no interaction required"));
ykSlots.append({slot, display});
}
}
@ -356,7 +358,7 @@ YubiKey::performChallenge(void* key, int slot, bool mayBlock, const QByteArray&
if (yk_errno == YK_ETIMEOUT) {
m_error = tr("Hardware key timed out waiting for user interaction.");
} else if (yk_errno == YK_EUSBERR) {
m_error = tr("A USB error ocurred when accessing the hardware key: %1").arg(yk_usb_strerror());
m_error = tr("A USB error occurred when accessing the hardware key: %1").arg(yk_usb_strerror());
} else {
m_error = tr("Failed to complete a challenge-response, the specific error was: %1")
.arg(yk_strerror(yk_errno));

View File

@ -27,6 +27,7 @@
#include <QJsonObject>
#include <QRegularExpression>
const QString UpdateChecker::ErrorVersion("error");
UpdateChecker* UpdateChecker::m_instance(nullptr);
UpdateChecker::UpdateChecker(QObject* parent)
@ -104,7 +105,7 @@ void UpdateChecker::fetchFinished()
// TODO: change to toSecsSinceEpoch() when min Qt >= 5.8
config()->set(Config::GUI_CheckForUpdatesNextCheck, Clock::currentDateTime().addDays(7).toTime_t());
} else {
version = "error";
version = ErrorVersion;
}
emit updateCheckFinished(hasNewVersion, version, m_isManuallyRequested);

View File

@ -33,6 +33,8 @@ public:
static bool compareVersions(const QString& localVersion, const QString& remoteVersion);
static UpdateChecker* instance();
static const QString ErrorVersion;
signals:
void updateCheckFinished(bool hasNewVersion, QString version, bool isManuallyRequested);

View File

@ -180,12 +180,12 @@ static void AddResult(ZxcMatch_t **HeadRef, ZxcMatch_t *Nu, int MaxLen)
if (Nu->Begin)
{
if (Nu->Length >= MaxLen)
Nu->MltEnpy = Nu->Entrpy + MULTI_END_ADDITION * log(2.0);
Nu->MltEnpy = Nu->Entropy + MULTI_END_ADDITION * log(2.0);
else
Nu->MltEnpy = Nu->Entrpy + MULTI_MID_ADDITION * log(2.0);
Nu->MltEnpy = Nu->Entropy + MULTI_MID_ADDITION * log(2.0);
}
else
Nu->MltEnpy = Nu->Entrpy;
Nu->MltEnpy = Nu->Entropy;
/* Find the correct insert point */
while(*HeadRef && ((*HeadRef)->Length < Nu->Length))
@ -231,7 +231,7 @@ static void AddMatchRepeats(ZxcMatch_t **Result, ZxcMatch_t *Match, const uint8_
{
/* Found a repeat */
ZxcMatch_t *p = AllocMatch();
p->Entrpy = Match->Entrpy + log(RepeatCount);
p->Entropy = Match->Entropy + log(RepeatCount);
p->Type = (ZxcTypeMatch_t)(Match->Type + MULTIPLE_MATCH);
p->Length = Len * RepeatCount;
p->Begin = Match->Begin;
@ -616,7 +616,7 @@ static void DictionaryEntropy(ZxcMatch_t *m, DictMatchInfo_t *Extra, const uint8
}
/* Add entropy due to word's rank */
e += log((double)Extra->Rank);
m->Entrpy = e;
m->Entropy = e;
}
/**********************************************************************************
@ -877,7 +877,7 @@ static void UserMatch(ZxcMatch_t **Result, const char *Words[], const uint8_t *P
p->Type = USER_LEET_MATCH;
p->Length = Len;
p->Begin = Start;
/* Add Entrpy */
/* Add Entropy */
Extra.Caps = Caps;
Extra.Lower = Lowers;
Extra.NumLeet = Leets;
@ -1206,7 +1206,7 @@ static void SpatialMatch(ZxcMatch_t **Result, const uint8_t *Passwd, int Start,
p = AllocMatch();
p->Type = SPATIAL_MATCH;
p->Begin = Start;
p->Entrpy = Entropy;
p->Entropy = Entropy;
p->Length = Len;
AddMatchRepeats(Result, p, Passwd, MaxLen);
AddResult(Result, p, MaxLen);
@ -1345,7 +1345,7 @@ static void DateMatch(ZxcMatch_t **Result, const uint8_t *Passwd, int Start, int
e = log(31 * 12 * 100.0);
if (Sep)
e += log(4.0); /* Extra 2 bits for separator */
p->Entrpy = e;
p->Entropy = e;
p->Type = DATE_MATCH;
p->Length = Len;
p->Begin = Start;
@ -1390,7 +1390,7 @@ static void RepeatMatch(ZxcMatch_t **Result, const uint8_t *Passwd, int Start, i
p->Type = REPEATS_MATCH;
p->Begin = Start;
p->Length = i;
p->Entrpy = log(Card * i);
p->Entropy = log(Card * i);
AddResult(Result, p, MaxLen);
}
}
@ -1407,7 +1407,7 @@ static void RepeatMatch(ZxcMatch_t **Result, const uint8_t *Passwd, int Start, i
/* Found a repeat */
int c = Cardinality(Passwd, Len);
ZxcMatch_t *p = AllocMatch();
p->Entrpy = log((double)c) * Len + log(RepeatCount);
p->Entropy = log((double)c) * Len + log(RepeatCount);
p->Type = (ZxcTypeMatch_t)(BRUTE_MATCH + MULTIPLE_MATCH);
p->Length = Len * RepeatCount;
p->Begin = Start;
@ -1525,7 +1525,7 @@ static void SequenceMatch(ZxcMatch_t **Result, const uint8_t *Passwd, int Start,
p->Type = SEQUENCE_MATCH;
p->Begin = Start;
p->Length = i;
p->Entrpy = e + log((double)i);
p->Entropy = e + log((double)i);
AddMatchRepeats(Result, p, Pwd, MaxLen);
AddResult(Result, p, MaxLen);
}
@ -1654,7 +1654,7 @@ double ZxcvbnMatch(const char *Pwd, const char *UserDict[], ZxcMatch_t **Info)
Zp->Type = BRUTE_MATCH;
Zp->Begin = i;
Zp->Length = j - i;
Zp->Entrpy = e * (j - i);
Zp->Entropy = e * (j - i);
AddResult(&(Nodes[i].Paths), Zp, MaxLen);
}
}
@ -1723,7 +1723,7 @@ double ZxcvbnMatch(const char *Pwd, const char *UserDict[], ZxcMatch_t **Info)
if (Xp == Zp)
{
/* Adjust the entropy to log to base 2 */
Xp->Entrpy /= log(2.0);
Xp->Entropy /= log(2.0);
Xp->MltEnpy /= log(2.0);
/* Put previous part at head of info list */

View File

@ -70,7 +70,7 @@ struct ZxcMatch
{
int Begin; /* Char position of begining of match */
int Length; /* Number of chars in the match */
double Entrpy; /* The entropy of the match */
double Entropy; /* The entropy of the match */
double MltEnpy; /* Entropy with additional allowance for multipart password */
ZxcTypeMatch_t Type; /* Type of match (Spatial/Dictionary/Order/Repeat) */
struct ZxcMatch *Next;

View File

@ -1501,7 +1501,7 @@ void TestGui::testSortGroups()
void TestGui::testTrayRestoreHide()
{
if (!QSystemTrayIcon::isSystemTrayAvailable()) {
QSKIP("QSystemTrayIcon::isSystemTrayAvailable() = false, skipping tray restore/hide test...");
QSKIP("QSystemTrayIcon::isSystemTrayAvailable() = false, skipping tray restore/hide test");
}
m_mainWindow->hideWindow();