Make category button translatable in appstore

This commit is contained in:
Johannes Zellner
2020-12-15 15:58:13 +01:00
parent 4170bf3a7a
commit 39b50b2aa9
3 changed files with 10 additions and 6 deletions

View File

@@ -761,7 +761,8 @@
"blog": "Blog",
"chat": "Chat",
"analytics": "Analytics"
}
},
"categoryLabel": "Kategorie"
},
"services": {
"title": "Dienste",

View File

@@ -129,7 +129,8 @@
"createAccountAction": "Create Account",
"switchToSignUpAction": "Don't have an account yet? Sign up",
"switchToLoginAction": "Already have an account? Log in"
}
},
"categoryLabel": "Category"
},
"users": {
"title": "Users",

View File

@@ -74,14 +74,16 @@ angular.module('Application').controller('AppStoreController', ['$scope', '$tran
});
$scope.categoryButtonLabel = function (category) {
if (category === 'new') return 'Category';
if (category === 'recent') return 'Category';
if (category === 'featured') return 'Category';
var categoryLabel = $translate.instant('appstore.categoryLabel')
if (category === 'new') return categoryLabel;
if (category === 'recent') return categoryLabel;
if (category === 'featured') return categoryLabel;
var tmp = $scope.categories.find(function (c) { return c.id === category; });
if (tmp) return tmp.label;
return 'Category';
return categoryLabel;
};
$scope.appInstall = {