bugfix: fix typo

This commit is contained in:
mesayusriana12
2022-08-31 12:57:17 +07:00
parent 9f42185400
commit 2a435b28f8
2 changed files with 3 additions and 3 deletions

View File

@@ -17,7 +17,7 @@ const appName = window.document.getElementsByTagName('title')[0]?.innerText || '
const { $token } = JSON.parse(document.getElementById('app').dataset.page).props
axios.defaults.headers.common['Authorization'] = `Bearer ${$token}`
commons.getAllDefinedTransaction()
commons.getAllDefinedTranslation()
Object.keys(commons).forEach(key => Object.defineProperty(window, key, {
value: commons[key],

View File

@@ -3,7 +3,7 @@ import { usePage } from "@inertiajs/inertia-vue3"
window.translations = {}
window.locale = localStorage.getItem('locale') || 'id'
export const getAllDefinedTransaction = () => axios.get(route('api.translation.get', window.locale))
export const getAllDefinedTranslation = () => axios.get(route('api.translation.get', window.locale))
.then(response => response.data)
.then(response => window.translations = response)
@@ -14,7 +14,7 @@ export const __ = (text, replacements = {}) => {
} else {
axios.post(route(
'api.translation.register', window.locale
), { text }).then(getAllDefinedTransaction)
), { text }).then(getAllDefinedTranslation)
}
for (const key in replacements) {