From 13d9317a386d172960dc9e2f39709d85bdfb22e1 Mon Sep 17 00:00:00 2001 From: tomasz1986 Date: Thu, 16 Nov 2023 22:07:15 +0100 Subject: [PATCH] gui: Allow to translate "unknown device" (#9229) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 --- gui/default/assets/lang/lang-en.json | 1 + gui/default/syncthing/core/syncthingController.js | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) 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;