mirror of
https://github.com/keepassxreboot/keepassxc.git
synced 2025-08-18 11:08:05 -04:00
Cleanup UI files
Removes unnecessary & from strings in settings widgets. These cause confusion and complicate translation. They are unnecessary as all dialogs allow efficient tabbing between elements. Also add colons after several settings with input boxes and remove a hard stop. Improve wording of strings based on translator feedback. Fix case sensitive matching of CLI Export.
This commit is contained in:
parent
4dee16c9fa
commit
a41c26e9cd
16 changed files with 60 additions and 61 deletions
|
@ -25,11 +25,11 @@
|
|||
#include "core/Database.h"
|
||||
#include "format/CsvExporter.h"
|
||||
|
||||
const QCommandLineOption Export::FormatOption =
|
||||
QCommandLineOption(QStringList() << "f"
|
||||
<< "format",
|
||||
QObject::tr("Format to use when exporting. Available choices are xml or csv. Defaults to xml."),
|
||||
QStringLiteral("xml|csv"));
|
||||
const QCommandLineOption Export::FormatOption = QCommandLineOption(
|
||||
QStringList() << "f"
|
||||
<< "format",
|
||||
QObject::tr("Format to use when exporting. Available choices are 'xml' or 'csv'. Defaults to 'xml'."),
|
||||
QStringLiteral("xml|csv"));
|
||||
|
||||
Export::Export()
|
||||
{
|
||||
|
@ -44,7 +44,7 @@ int Export::executeWithDatabase(QSharedPointer<Database> database, QSharedPointe
|
|||
TextStream errorTextStream(Utils::STDERR, QIODevice::WriteOnly);
|
||||
|
||||
QString format = parser->value(Export::FormatOption);
|
||||
if (format.isEmpty() || format == QStringLiteral("xml")) {
|
||||
if (format.isEmpty() || format.startsWith(QStringLiteral("xml"), Qt::CaseInsensitive)) {
|
||||
QByteArray xmlData;
|
||||
QString errorMessage;
|
||||
if (!database->extract(xmlData, &errorMessage)) {
|
||||
|
@ -52,7 +52,7 @@ int Export::executeWithDatabase(QSharedPointer<Database> database, QSharedPointe
|
|||
return EXIT_FAILURE;
|
||||
}
|
||||
outputTextStream << xmlData.constData() << endl;
|
||||
} else if (format == QStringLiteral("csv")) {
|
||||
} else if (format.startsWith(QStringLiteral("csv"), Qt::CaseInsensitive)) {
|
||||
CsvExporter csvExporter;
|
||||
outputTextStream << csvExporter.exportDatabase(database);
|
||||
} else {
|
||||
|
|
|
@ -86,7 +86,7 @@ int Import::execute(const QStringList& arguments)
|
|||
db.setKey(key);
|
||||
|
||||
if (!db.import(xmlExportPath, &errorMessage)) {
|
||||
errorTextStream << QObject::tr("Unable to import XML database export %1").arg(errorMessage) << endl;
|
||||
errorTextStream << QObject::tr("Unable to import XML database: %1").arg(errorMessage) << endl;
|
||||
return EXIT_FAILURE;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue