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>
This commit is contained in:
tomasz1986 authored and GitHub committed 2023-11-16 22:07:15 +01:00
1 parent b184d46d8a
commit 13d9317a38
2 files changed
+2 -1

No files matched your search

+1
View File
@@ -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."
@@ -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;