mirror of
https://github.com/documize/community.git
synced 2025-07-23 15:19:42 +02:00
i18n admin strings
This commit is contained in:
parent
4ed2b3902c
commit
53297f7627
27 changed files with 99 additions and 58 deletions
|
@ -15,6 +15,7 @@ import Controller from '@ember/controller';
|
|||
|
||||
export default Controller.extend(Notifier, {
|
||||
labelSvc: service('label'),
|
||||
i18n: service(),
|
||||
|
||||
load() {
|
||||
this.get('labelSvc').getAll().then((labels) => {
|
||||
|
@ -26,21 +27,21 @@ export default Controller.extend(Notifier, {
|
|||
onAdd(label) {
|
||||
this.get('labelSvc').add(label).then(() => {
|
||||
this.load();
|
||||
this.notifySuccess('Label added');
|
||||
this.notifySuccess(this.i18n.localize('added'));
|
||||
});
|
||||
},
|
||||
|
||||
onDelete(id) {
|
||||
this.get('labelSvc').delete(id).then(() => {
|
||||
this.load();
|
||||
this.notifySuccess('Label deleted');
|
||||
this.notifySuccess(this.i18n.localize('deleted'));
|
||||
});
|
||||
},
|
||||
|
||||
onUpdate(label) {
|
||||
this.get('labelSvc').update(label).then(() => {
|
||||
this.load();
|
||||
this.notifySuccess('Label saved');
|
||||
this.notifySuccess(this.i18n.localize('saved'));
|
||||
});
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue