feat: editor save conflict localization

This commit is contained in:
NGPixel
2020-03-22 18:58:27 -04:00
parent 4b0e3d1c43
commit 507928730a
6 changed files with 180 additions and 23 deletions

View File

@@ -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({