feat(i18n): wrap the interface and the journal wording in tr()
Every label, tooltip, empty state and status message was a bare QStringLiteral, so nothing could be translated. They now go through tr() (QCoreApplication::translate from a free helper, QT_TRANSLATE_NOOP where the code already had it), which is what the catalogues are keyed on. The journal follows the same rule as the interface: an event, an error and the two outcomes of a command read in the chosen language. What the tools print themselves is left alone — that is their output, not our wording — and so are the qC* developer traces, which keep their technical English.
This commit is contained in:
11 files changed
+430
-423
No files matched your search
+3
-2
@@ -1,6 +1,7 @@
|
||||
#include "ui-kit.h"
|
||||
|
||||
#include <QAbstractItemView>
|
||||
#include <QCoreApplication>
|
||||
#include <QHeaderView>
|
||||
#include <QLabel>
|
||||
#include <QSignalBlocker>
|
||||
@@ -131,8 +132,8 @@ QString providersLabel(const PluginManager* plugins, const PackageInfo& pkg) {
|
||||
}
|
||||
|
||||
QString packageStatusText(const PackageInfo& pkg) {
|
||||
if (pkg.installed && pkg.updateAvailable) return QStringLiteral("MAJ dispo");
|
||||
if (pkg.installed) return QStringLiteral("Installé");
|
||||
if (pkg.installed && pkg.updateAvailable) return QCoreApplication::translate("ui", "MAJ dispo");
|
||||
if (pkg.installed) return QCoreApplication::translate("ui", "Installé");
|
||||
if (!pkg.repository.empty()) return QStringLiteral("Disponible");
|
||||
return QStringLiteral("—");
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user