mirror of
https://github.com/documize/community.git
synced 2025-08-05 13:35:25 +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'));
|
||||
});
|
||||
}
|
||||
}
|
||||
|
|
|
@ -17,6 +17,7 @@ export default Route.extend(AuthenticatedRouteMixin, {
|
|||
labelSvc: service('label'),
|
||||
appMeta: service(),
|
||||
session: service(),
|
||||
i18n: service(),
|
||||
|
||||
beforeModel() {
|
||||
if (!this.get("session.isAdmin")) {
|
||||
|
@ -29,6 +30,6 @@ export default Route.extend(AuthenticatedRouteMixin, {
|
|||
},
|
||||
|
||||
activate() {
|
||||
this.get('browser').setTitle('Space Labels');
|
||||
this.get('browser').setTitle(this.i18n.localize('labels'));
|
||||
}
|
||||
});
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
{{layout/logo-heading
|
||||
title="Labels"
|
||||
desc="Group and navigate spaces with visual labels"
|
||||
title=(localize 'labels')
|
||||
desc=(localize 'admin_labels_explain')
|
||||
icon=constants.Icon.Checkbox}}
|
||||
|
||||
{{customize/space-labels
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue