Remove admin theme from i18n consideration

This commit is contained in:
Jared Blashka 2016-03-21 09:41:47 -04:00
parent 7a05078030
commit 49c5610971

View file

@ -353,14 +353,13 @@ module.controller('RealmThemeCtrl', function($scope, Current, Realm, realm, serv
function updateSupported() { function updateSupported() {
if ($scope.realm.internationalizationEnabled) { if ($scope.realm.internationalizationEnabled) {
var accountLocales = localeForTheme('account', $scope.realm.accountTheme); var accountLocales = localeForTheme('account', $scope.realm.accountTheme);
var adminLocales = localeForTheme('admin', $scope.realm.adminTheme);
var loginLocales = localeForTheme('login', $scope.realm.loginTheme); var loginLocales = localeForTheme('login', $scope.realm.loginTheme);
var emailLocales = localeForTheme('email', $scope.realm.emailTheme); var emailLocales = localeForTheme('email', $scope.realm.emailTheme);
var supportedLocales = []; var supportedLocales = [];
for (var i = 0; i < accountLocales.length; i++) { for (var i = 0; i < accountLocales.length; i++) {
var l = accountLocales[i]; var l = accountLocales[i];
if (adminLocales.indexOf(l) >= 0 && loginLocales.indexOf(l) >= 0 && emailLocales.indexOf(l) >= 0) { if (loginLocales.indexOf(l) >= 0 && emailLocales.indexOf(l) >= 0) {
supportedLocales.push(l); supportedLocales.push(l);
} }
} }
@ -386,7 +385,6 @@ module.controller('RealmThemeCtrl', function($scope, Current, Realm, realm, serv
$scope.$watch('realm.loginTheme', updateSupported); $scope.$watch('realm.loginTheme', updateSupported);
$scope.$watch('realm.accountTheme', updateSupported); $scope.$watch('realm.accountTheme', updateSupported);
$scope.$watch('realm.emailTheme', updateSupported); $scope.$watch('realm.emailTheme', updateSupported);
$scope.$watch('realm.adminTheme', updateSupported);
$scope.$watch('realm.internationalizationEnabled', updateSupported); $scope.$watch('realm.internationalizationEnabled', updateSupported);
}); });
@ -2312,4 +2310,4 @@ module.controller('RealmImportCtrl', function($scope, realm, $route,
$route.reload(); $route.reload();
} }
}); });