mirror of https://github.com/nextcloud/contacts
Fix localization.
This commit is contained in:
parent
54a7de52c1
commit
aa94057e33
|
@ -2,15 +2,17 @@ app.controller('contactlistCtrl', function($scope, $filter, $route, $routeParams
|
|||
var ctrl = this;
|
||||
|
||||
ctrl.routeParams = $routeParams;
|
||||
ctrl.t = {
|
||||
addContact : t('contacts', 'Add contact'),
|
||||
emptySearch : t('contacts', 'No search result for')
|
||||
};
|
||||
|
||||
ctrl.contactList = [];
|
||||
ctrl.selectedContactId = undefined;
|
||||
ctrl.searchTerm = '';
|
||||
|
||||
ctrl.t = {
|
||||
addContact : t('contacts', 'Add contact'),
|
||||
emptySearch : t('contacts', 'No search result for {query}', {query: ctrl.searchTerm})
|
||||
};
|
||||
|
||||
|
||||
$scope.query = function(contact) {
|
||||
return contact.matches(SearchService.getSearchTerm());
|
||||
};
|
||||
|
@ -26,6 +28,11 @@ app.controller('contactlistCtrl', function($scope, $filter, $route, $routeParams
|
|||
}
|
||||
if (ev.event === 'changeSearch') {
|
||||
ctrl.searchTerm = ev.searchTerm;
|
||||
ctrl.t.emptySearch;
|
||||
ctrl.t.emptySearch = t('contacts',
|
||||
'No search result for {query}',
|
||||
{query: ctrl.searchTerm}
|
||||
);
|
||||
$scope.$apply();
|
||||
}
|
||||
});
|
||||
|
|
File diff suppressed because one or more lines are too long
|
@ -7,6 +7,6 @@
|
|||
<div ng-show="!ctrl.contactList.length">
|
||||
<div id="emptysearch" class="">
|
||||
<div class="icon-search"></div>
|
||||
<h2>{{ctrl.t.emptySearch}} {{ctrl.searchTerm}}</h2>
|
||||
<h2>{{ctrl.t.emptySearch}}</h2>
|
||||
</div>
|
||||
</div>
|
||||
|
|
Loading…
Reference in New Issue