gui: Use nested namespace for theme name translation keys (#9220)

Following up on #9192, this makes use of the new mechanism for the theme
names.

The dummy string added for testing is removed again here. All
translations are updated to the new nested syntax, except Chinese
(zh-HK) where the string weren't actually translated.
This commit is contained in:
André Colomb
2023-11-14 07:22:52 +01:00
committed by GitHub
parent a1ad020b63
commit 4f70f5c280
34 changed files with 258 additions and 134 deletions
@@ -3215,8 +3215,8 @@ angular.module('syncthing.core')
};
$scope.themeName = function (theme) {
var translation = $translate.instant("theme-name-" + theme);
if (translation.indexOf("theme-name-") == 0) {
var translation = $translate.instant("theme.name." + theme);
if (translation.indexOf("theme.name.") == 0) {
// Fall back to simple Title Casing on missing translation
translation = theme.toLowerCase().replace(/(?:^|\s)\S/g, function (a) {
return a.toUpperCase();