diff options
author | Roland Knall <rknall@gmail.com> | 2019-08-05 16:03:24 +0200 |
---|---|---|
committer | Roland Knall <rknall@gmail.com> | 2019-08-05 15:01:05 +0000 |
commit | 353a2dabb0225952d5e4d1e7841e7ec64d1eac7a (patch) | |
tree | 6268ae08043e17893eb8b671edb207979bc42f55 /ui | |
parent | 5c678288bcbf4fe870a1582cf31eed6eaa17841c (diff) |
Qt: Better translation texts
Improve text for translation in the profile model
Change-Id: If1cb7f4e83c9a45729391ce8a69029d6bc95d87b
Reviewed-on: https://code.wireshark.org/review/34188
Petri-Dish: Roland Knall <rknall@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Roland Knall <rknall@gmail.com>
Diffstat (limited to 'ui')
-rw-r--r-- | ui/qt/models/profile_model.cpp | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/ui/qt/models/profile_model.cpp b/ui/qt/models/profile_model.cpp index 1e39c59d1c..9522fa1f12 100644 --- a/ui/qt/models/profile_model.cpp +++ b/ui/qt/models/profile_model.cpp @@ -387,7 +387,7 @@ QVariant ProfileModel::dataPath(const QModelIndex &index) const return msg; if (prof->reference) - return QString("%1 %2").arg(tr("Renamed from: ")).arg(prof->reference); + return tr("Renamed from: %1").arg(prof->reference); return QVariant(); } @@ -406,14 +406,18 @@ QVariant ProfileModel::dataPath(const QModelIndex &index) const if ( ! prof->reference ) return tr("Created from default settings"); - QString msg = QString("%1 %2").arg(tr("Copied from: ")).arg(prof->reference); + QString msg = tr("Copied from: %1").arg(prof->reference); + QString appendix; if ( profile_exists(prof->reference, TRUE) && prof->from_global ) - msg.append(QString(" (%1)").arg(tr("system provided"))); + appendix = tr("system provided"); else if ( row > 0 && ref && QString(ref->name).compare(prof->reference) != 0 ) - msg.append(QString(" (%1 %2)").arg(tr("renamed to")).arg(ref->name)); + appendix = tr("renamed to %1").arg(ref->name); else if ( row < 0 ) - msg.append(QString(" (%1)").arg(tr("deleted"))); + appendix = tr("deleted"); + + if ( appendix.length() > 0 ) + msg.append(QString(" (%1)").arg(appendix)); return msg; } |