1
0
Fork 0
mirror of https://github.com/documize/community.git synced 2025-07-19 05:09:42 +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

@ -74,13 +74,13 @@ export default Component.extend(Notifier, Modal, {
let spec = this.get('backupSpec');
this.get('onBackup')(spec).then((filename) => {
this.notifySuccess('Completed');
this.notifySuccess(this.i18n.localize('completed'));
this.set('backupLabel', this.i18n.localize('backup_start'));
this.set('backupSuccess', true);
this.set('backupFilename', filename);
this.set('backupRunning', false);
}, ()=> {
this.notifyError('Failed');
this.notifyError(this.i18n.localize('backup_failed'));
this.set('backupLabel', this.i18n.localize('backup_run'));
this.set('backupFailed', true);
this.set('backupRunning', false);
@ -156,7 +156,7 @@ export default Component.extend(Notifier, Modal, {
this.set('restoreSuccess', true);
this.get('router').transitionTo('auth.logout');
}, ()=> {
this.notifyError('Failed');
this.notifyError(this.i18n.localize('backup_failed'));
this.set('restorbackupLabel', this.i18n.localize('restore'));
this.set('restoreFailed', true);
});

View file

@ -21,6 +21,7 @@ import Component from '@ember/component';
export default Component.extend(Notifier, {
appMeta: service(),
router: service(),
i18n: service(),
maxTags: 3,
domain: '',
titleEmpty: empty('model.general.title'),
@ -186,7 +187,7 @@ export default Component.extend(Notifier, {
this.set('model.general.domain', this.get('domain').toLowerCase());
this.get('onUpdate')().then(() => {
this.notifySuccess('Saved');
this.notifySuccess(this.i18n.localize('saved'));
set(this, 'titleError', false);
set(this, 'messageError', false);
set(this, 'conversionEndpointError', false);

View file

@ -23,6 +23,7 @@ export default Component.extend(Notifier, ModalMixin, {
searchService: service('search'),
router: service(),
appMeta: service(),
i18n: service(),
deleteChildren: false,
blockTitle: "",
blockExcerpt: "",
@ -84,7 +85,7 @@ export default Component.extend(Notifier, ModalMixin, {
let clip = new ClipboardJS('#page-copy-link-' + pageId, {
text: function() {
self.notifySuccess('Link copied to clipboard');
self.notifySuccess(this.i18n.localize('copied'));
return url;
}
});

View file

@ -285,7 +285,7 @@ export default Component.extend(Notifier, Modals, AuthProvider, {
this.set('inviteEmail', '');
this.get('spaceSvc').share(this.get('folder.id'), result).then(() => {
this.notifySuccess('Invites sent');
this.notifySuccess(this.i18n.localize('sent'));
$('#space-invite-email').removeClass('is-invalid');
this.modalClose("#space-invite-user-modal");
this.load();

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

View file

@ -19,6 +19,7 @@ export default Controller.extend(Notifier, {
folderService: service('folder'),
documentService: service('document'),
localStorage: service('localStorage'),
i18n: service(),
queryParams: ['tab'],
tab: 'general',
@ -33,7 +34,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'));

View file

@ -18,6 +18,7 @@ export default Service.extend(Notifier, {
appMeta: service(),
store: service(),
eventBus: service(),
i18n: service(),
// Returns links within specified document
getDocumentLinks(documentId) {
@ -166,7 +167,7 @@ export default Service.extend(Notifier, {
document.execCommand('copy');
document.body.removeChild(el);
this.notifyInfo('Copied location to clipboard');
this.notifyInfo(this.i18n.localize('copied'));
return;
}

View file

@ -16,6 +16,7 @@
"deleted": "Deleted",
"remove": "Remove",
"duplicate": "Duplicate",
"duplicated": "Duplicated",
"edit": "Edit",
"edited": "Edited",
"download": "Download",