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 2023-11-16 22:07:15 +01:00 committed by GitHub
parent b184d46d8a
commit 13d9317a38
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 1 deletions

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."

View File

@ -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;