This commit is contained in:
tai-cha 2025-06-23 20:02:03 +09:00
parent dc97357e5e
commit 6fb1ab03ca
2 changed files with 3 additions and 3 deletions

View File

@ -21,7 +21,7 @@ export default function pluginWatchLocales() {
if (localeYmlPaths.includes(filePath)) {
server.ws.send({
type: 'custom',
event: 'language-update',
event: 'locale-update',
data: filePath.match(/([^\/]+)\.yml$/)?.[1] || null,
})
}

View File

@ -100,8 +100,8 @@ export async function common(createVue: () => Promise<App<Element>>) {
}
if (import.meta.hot) {
import.meta.hot.on('language-update', async (updatedLang: string) => {
console.info(`Language updated: ${updatedLang}`);
import.meta.hot.on('locale-update', async (updatedLang: string) => {
console.info(`Locale updated: ${updatedLang}`);
if (updatedLang === lang) {
await new Promise(resolve => {
window.setTimeout(resolve, 500);