1
0
Fork 0
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:
McMatts 2022-03-03 19:10:06 -05:00
parent 4ed2b3902c
commit 53297f7627
27 changed files with 99 additions and 58 deletions

View file

@ -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'));
});
}
}