diff --git a/client/components/editor.vue b/client/components/editor.vue index bc72daa2..1062a77c 100644 --- a/client/components/editor.vue +++ b/client/components/editor.vue @@ -203,7 +203,7 @@ export default { window.onbeforeunload = () => { if (!this.exitConfirmed && this.initContentParsed !== this.$store.get('editor/content')) { - return 'You have unsaved edits. Are you sure you want to leave the editor?' + return this.$t('editor:unsavedWarning') } else { return undefined } @@ -291,7 +291,7 @@ export default { }) if (_.get(conflictResp, 'data.pages.checkConflicts', false)) { this.$root.$emit('saveConflict') - throw new Error('Save conflict! Another user has already modified this page.') + throw new Error(this.$t('editor:conflict.warning')) } let resp = await this.$apollo.mutate({ diff --git a/client/components/editor/ckeditor/conflict.vue b/client/components/editor/ckeditor/conflict.vue new file mode 100644 index 00000000..a550b0f9 --- /dev/null +++ b/client/components/editor/ckeditor/conflict.vue @@ -0,0 +1,129 @@ + + + diff --git a/client/components/editor/editor-ckeditor.vue b/client/components/editor/editor-ckeditor.vue index abe34d7e..f08d5606 100644 --- a/client/components/editor/editor-ckeditor.vue +++ b/client/components/editor/editor-ckeditor.vue @@ -9,15 +9,20 @@ v-spacer .caption Visual Editor v-spacer - .caption {{stats.characters}} Chars, {{stats.words}} Words + .caption {{$t('editor:ckeditor.stats', { chars: stats.characters, words: stats.words })}} + editor-conflict(v-model='isConflict', v-if='isConflict')