Translate the strings

This commit is contained in:
Girish Ramakrishnan
2020-11-13 13:21:01 -08:00
parent 7f3732d43c
commit 722f45050a
3 changed files with 63 additions and 5 deletions

View File

@@ -4,7 +4,7 @@
/* global $ */
/* global async */
angular.module('Application').controller('EmailController', ['$scope', '$location', '$timeout', '$routeParams', 'Client', function ($scope, $location, $timeout, $routeParams, Client) {
angular.module('Application').controller('EmailController', ['$scope', '$location', '$translate', '$timeout', '$routeParams', 'Client', function ($scope, $location, $translate, $timeout, $routeParams, Client) {
Client.onReady(function () { if (!Client.getUserInfo().isAtLeastAdmin) $location.path('/'); });
var domainName = $routeParams.domain;
@@ -763,7 +763,7 @@ angular.module('Application').controller('EmailController', ['$scope', '$locatio
if (error) return console.error('Unable to get user listing.', error);
// ensure we have a display value available
$scope.owners.push({ header: true, display: 'Users' });
$scope.owners.push({ header: true, display: $translate.instant('email.mailboxboxDialog.usersHeader') });
users.forEach(function (u) {
$scope.owners.push({ display: u.username || u.email, id: u.id, type: 'user' });
});
@@ -771,7 +771,7 @@ angular.module('Application').controller('EmailController', ['$scope', '$locatio
Client.getGroups(function (error, groups) {
if (error) return console.error('Unable to get group listing.', error);
$scope.owners.push({ header: true, display: 'Groups' });
$scope.owners.push({ header: true, display: $translate.instant('email.mailboxboxDialog.groupsHeader') });
groups.forEach(function (g) {
$scope.owners.push({ display: g.name, id: g.id, type: 'group' });
});