mirror of
https://github.com/docusealco/docuseal
synced 2026-11-07 23:32:33 -05:00
i18n
This commit is contained in:
1 parent
3877dbf83f
commit
d0c49ac04c
2 files changed
+27
-1
No files matched your search
@@ -1114,7 +1114,9 @@ export default {
|
||||
if (response.status === 422 || response.status === 500) {
|
||||
const data = await response.json()
|
||||
|
||||
alert(data.error || 'Value is invalid')
|
||||
const i18nError = data.error ? this.t(data.error.replace(/\s+/g, '_').toLowerCase()) : ''
|
||||
|
||||
alert(i18nError !== data.error ? i18nError : (data.error || this.t('value_is_invalid')))
|
||||
|
||||
return Promise.reject(new Error(data.error))
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user