naming
This commit is contained in:
parent
dc97357e5e
commit
6fb1ab03ca
|
@ -21,7 +21,7 @@ export default function pluginWatchLocales() {
|
||||||
if (localeYmlPaths.includes(filePath)) {
|
if (localeYmlPaths.includes(filePath)) {
|
||||||
server.ws.send({
|
server.ws.send({
|
||||||
type: 'custom',
|
type: 'custom',
|
||||||
event: 'language-update',
|
event: 'locale-update',
|
||||||
data: filePath.match(/([^\/]+)\.yml$/)?.[1] || null,
|
data: filePath.match(/([^\/]+)\.yml$/)?.[1] || null,
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
|
@ -100,8 +100,8 @@ export async function common(createVue: () => Promise<App<Element>>) {
|
||||||
}
|
}
|
||||||
|
|
||||||
if (import.meta.hot) {
|
if (import.meta.hot) {
|
||||||
import.meta.hot.on('language-update', async (updatedLang: string) => {
|
import.meta.hot.on('locale-update', async (updatedLang: string) => {
|
||||||
console.info(`Language updated: ${updatedLang}`);
|
console.info(`Locale updated: ${updatedLang}`);
|
||||||
if (updatedLang === lang) {
|
if (updatedLang === lang) {
|
||||||
await new Promise(resolve => {
|
await new Promise(resolve => {
|
||||||
window.setTimeout(resolve, 500);
|
window.setTimeout(resolve, 500);
|
||||||
|
|
Loading…
Reference in New Issue