mirror of
https://github.com/octoleo/syncthing.git
synced 2025-02-01 03:18:30 +00:00
Use indexOf instead of startsWith to make the now translatable theme names appear correctly in IE11. This also prevents console log error spam in the browser. The same problem was previously reported in #6940. Signed-off-by: Tomasz Wilczyński <twilczynski@naver.com>
This commit is contained in:
parent
083fa1803a
commit
0f93e76e80
@ -2808,7 +2808,7 @@ angular.module('syncthing.core')
|
||||
|
||||
$scope.themeName = function (theme) {
|
||||
var translation = $translate.instant("theme-name-" + theme);
|
||||
if (translation.startsWith("theme-name-")) {
|
||||
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();
|
||||
|
Loading…
x
Reference in New Issue
Block a user