diff options
author | Ruben Pollan <meskio@sindominio.net> | 2020-07-10 11:04:49 +0200 |
---|---|---|
committer | Ruben Pollan <meskio@sindominio.net> | 2020-07-28 13:44:58 +0200 |
commit | cf5ed56c943599c092a91933b45471c4c0e5d579 (patch) | |
tree | c2a4f1ce4cffff3dce4c207575d15aa2a43c365f /gui/qml/main.qml | |
parent | cdb42f0d6b47a60ceb647e3ac6a6ce66352dbae4 (diff) |
Add support for internationalization
- Resolves: #243
Diffstat (limited to 'gui/qml/main.qml')
-rw-r--r-- | gui/qml/main.qml | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/gui/qml/main.qml b/gui/qml/main.qml index 4aab7f1..2ac9398 100644 --- a/gui/qml/main.qml +++ b/gui/qml/main.qml @@ -52,16 +52,20 @@ ApplicationWindow { function toHuman(st) { switch(st) { case "off": - // TODO improve string interpolation, give context to translators etc - return qsTr(ctx.appName + " off"); + //: %1 -> application name + return qsTr("%1 off").arg(ctx.appName); case "on": - return qsTr(ctx.appName + " on"); + //: %1 -> application name + return qsTr("%1 on").arg(ctx.appName); case "connecting": - return qsTr("Connecting to " + ctx.appName); + //: %1 -> application name + return qsTr("Connecting to %1").arg(ctx.appName); case "stopping": - return qsTr("Stopping " + ctx.appName); + //: %1 -> application name + return qsTr("Stopping %1").arg(ctx.appName); case "failed": - return qsTr(ctx.appName + " blocking internet"); // TODO failed is not handed yet + //: %1 -> application name + return qsTr("%1 blocking internet").arg(ctx.appName); // TODO failed is not handed yet } } |