From 80d4bc1cea2c106871ceacdc94ce40d6aef60f8b Mon Sep 17 00:00:00 2001 From: tomasz1986 Date: Sun, 30 Jan 2022 07:56:36 +0100 Subject: [PATCH] gui: Translate fancytree messages in Versions modal (#8149) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * gui: Translate fancytree messages in Versions modal Currently, the default fancytree info/error messages are used. This means that a) they are English-only, and b) they are very generic. With this commit, the messages are added to the translatable strings, and they are also more specifically related to file versioning. On a side note, the "moreData" string has been left out on purpose, as it is not used in the current code. It can be added later if needed. Signed-off-by: Tomasz WilczyƄski --- gui/default/assets/lang/lang-en.json | 2 ++ gui/default/syncthing/core/syncthingController.js | 5 +++++ 2 files changed, 7 insertions(+) diff --git a/gui/default/assets/lang/lang-en.json b/gui/default/assets/lang/lang-en.json index 43144e43d..e59c35c6e 100644 --- a/gui/default/assets/lang/lang-en.json +++ b/gui/default/assets/lang/lang-en.json @@ -128,6 +128,7 @@ "Error": "Error", "External File Versioning": "External File Versioning", "Failed Items": "Failed Items", + "Failed to load file versions.": "Failed to load file versions.", "Failed to load ignore patterns.": "Failed to load ignore patterns.", "Failed to setup, retrying": "Failed to setup, retrying", "Failure to connect to IPv6 servers is expected if there is no IPv6 connectivity.": "Failure to connect to IPv6 servers is expected if there is no IPv6 connectivity.", @@ -373,6 +374,7 @@ "The rate limit must be a non-negative number (0: no limit)": "The rate limit must be a non-negative number (0: no limit)", "The rescan interval must be a non-negative number of seconds.": "The rescan interval must be a non-negative number of seconds.", "There are no devices to share this folder with.": "There are no devices to share this folder with.", + "There are no file versions to restore.": "There are no file versions to restore.", "There are no folders to share with this device.": "There are no folders to share with this device.", "They are retried automatically and will be synced when the error is resolved.": "They are retried automatically and will be synced when the error is resolved.", "This Device": "This Device", diff --git a/gui/default/syncthing/core/syncthingController.js b/gui/default/syncthing/core/syncthingController.js index bc045e56f..44e912f7f 100755 --- a/gui/default/syncthing/core/syncthingController.js +++ b/gui/default/syncthing/core/syncthingController.js @@ -2530,6 +2530,11 @@ angular.module('syncthing.core') table: { indentation: 24, }, + strings: { + loading: $translate.instant("Loading..."), + loadError: $translate.instant("Failed to load file versions."), + noData: $translate.instant("There are no file versions to restore.") + }, // Set to '1' to silence errors after pressing arrow keys on file nodes. // Happens on the official option cofiguration from the developer's site // too, so probably a bug?