Move locales to single json files & Replace laravel-vue-i18n with vue-i18n

This commit is contained in:
Bubka
2025-06-20 18:14:21 +02:00
parent 01e56284ca
commit 6f419cfbcb
412 changed files with 3531 additions and 30057 deletions

View File

@ -1,5 +1,6 @@
import appSettingService from '@/services/appSettingService'
import { useNotifyStore } from '@/stores/notify'
import { useI18n } from 'vue-i18n'
/**
* Saves a setting on the backend
@ -8,13 +9,15 @@ import { useNotifyStore } from '@/stores/notify'
*/
export async function useAppSettingsUpdater(setting, value, returnValidationError = false) {
const { t } = useI18n()
let data = null
let error = null
await appSettingService.update(setting, value, { returnError: true })
.then(response => {
data = value
useNotifyStore().success({ type: 'is-success', text: trans('settings.forms.setting_saved') })
useNotifyStore().success({ type: 'is-success', text: t('message.settings.forms.setting_saved') })
})
.catch(err => {
if( returnValidationError && err.response.status === 422 ) {