1
0
Fork 0
mirror of https://github.com/documize/community.git synced 2025-07-23 07:09:43 +02:00

i18n notify strings

This commit is contained in:
McMatts 2022-03-14 14:49:10 -04:00
parent 33a9cbb5b0
commit 7f66977ac1
8 changed files with 21 additions and 15 deletions

View file

@ -22,6 +22,7 @@ export default Controller.extend(Notifier, {
localStore: service('local-storage'),
appMeta: service(),
router: service(),
i18n: service(),
sidebarTab: 'toc',
queryParams: ['currentPageId', 'source'],
contributionStatus: '',
@ -38,7 +39,7 @@ export default Controller.extend(Notifier, {
onSaveDocument(doc) {
this.get('documentService').save(doc).then(() => {
this.notifySuccess('Saved');
this.notifySuccess(this.i18n.localize('saved'));
});
this.get('browser').setTitle(doc.get('name'));
this.get('browser').setMetaDescription(doc.get('excerpt'));
@ -117,7 +118,7 @@ export default Controller.extend(Notifier, {
};
this.get('documentService').updatePage(documentId, page.get('id'), model).then((/*up*/) => {
this.notifySuccess('Saved');
this.notifySuccess(this.i18n.localize('saved'));
this.get('documentService').fetchPages(documentId, this.get('session.user.id')).then((pages) => {
this.set('pages', pages);
@ -160,7 +161,7 @@ export default Controller.extend(Notifier, {
this.get('documentService').addPage(this.get('document.id'), data).then((newPage) => {
let data = this.get('store').normalize('page', newPage);
this.get('store').push(data);
this.notifySuccess('Inserted');
this.notifySuccess(this.i18n.localize('saved'));
this.get('documentService').fetchPages(this.get('document.id'), this.get('session.user.id')).then((pages) => {
this.set('pages', pages);
@ -198,13 +199,13 @@ export default Controller.extend(Notifier, {
onSaveTemplate(name, desc) {
this.get('templateService').saveAsTemplate(this.get('document.id'), name, desc).then(() => {
this.notifySuccess('Template saved');
this.notifySuccess(this.i18n.localize('saved'));
});
},
onDuplicate(name) {
this.get('documentService').duplicate(this.get('folder.id'), this.get('document.id'), name).then(() => {
this.notifySuccess('Duplicated');
this.notifySuccess(this.i18n.localize('duplicated'));
});
},
@ -232,7 +233,7 @@ export default Controller.extend(Notifier, {
let doc = this.get('document');
doc.set('tags', tags);
this.get('documentService').save(doc).then(()=> {
this.notifySuccess('Saved');
this.notifySuccess(this.i18n.localize('saved'));
});
},