aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authortomasz1986 <twilczynski@naver.com>2023-11-16 22:07:15 +0100
committerGitHub <noreply@github.com>2023-11-16 22:07:15 +0100
commit13d9317a386d172960dc9e2f39709d85bdfb22e1 (patch)
treea859a96c2556f26a4fccfb6d9b706041d2d8bd1f
parentb184d46d8a3e0a6357cb5180f40cab241b05cb76 (diff)
downloadsyncthing-13d9317a386d172960dc9e2f39709d85bdfb22e1.tar.gz
syncthing-13d9317a386d172960dc9e2f39709d85bdfb22e1.zip
gui: Allow to translate "unknown device" (#9229)
The string is currently hard-coded in English, so allow to translate it into other languages. It appears mainly in the browser title bar before logging in into the GUI or when the GUI is still loading. Signed-off-by: Tomasz WilczyƄski <twilczynski@naver.com>
-rw-r--r--gui/default/assets/lang/lang-en.json1
-rwxr-xr-xgui/default/syncthing/core/syncthingController.js2
2 files changed, 2 insertions, 1 deletions
diff --git a/gui/default/assets/lang/lang-en.json b/gui/default/assets/lang/lang-en.json
index 354437cd5..4a34c972f 100644
--- a/gui/default/assets/lang/lang-en.json
+++ b/gui/default/assets/lang/lang-en.json
@@ -545,6 +545,7 @@
"light": "Light"
}
},
+ "unknown device": "unknown device",
"{%device%} wants to share folder \"{%folder%}\".": "{{device}} wants to share folder \"{{folder}}\".",
"{%device%} wants to share folder \"{%folderlabel%}\" ({%folder%}).": "{{device}} wants to share folder \"{{folderlabel}}\" ({{folder}}).",
"{%reintroducer%} might reintroduce this device.": "{{reintroducer}} might reintroduce this device."
diff --git a/gui/default/syncthing/core/syncthingController.js b/gui/default/syncthing/core/syncthingController.js
index 6b4d18ab7..bc04e8fe2 100755
--- a/gui/default/syncthing/core/syncthingController.js
+++ b/gui/default/syncthing/core/syncthingController.js
@@ -1378,7 +1378,7 @@ angular.module('syncthing.core')
$scope.thisDeviceName = function () {
var device = $scope.thisDevice();
if (typeof device === 'undefined') {
- return "(unknown device)";
+ return '(' + $translate.instant("unknown device") + ')';
}
if (device.name) {
return device.name;