From fe01a5a28f34c873019ae3c34086acd6bd791a1d Mon Sep 17 00:00:00 2001 From: おさむのひと <46447427+samunohito@users.noreply.github.com> Date: Sun, 30 Nov 2025 13:27:44 +0900 Subject: refactor: localesをworkspace管理下のパッケージに (#16895) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * refactor: localesをworkspace管理下のパッケージに * fix copilot review * move * move * rename * fix ci * revert unwanted indent changes * fix * fix * fix * fix * 間違えてコミットしていたのを戻す * 不要 * 追加漏れ * ymlの場所だけ戻す * localesの位置を戻したのでこの差分は不要 * 内容的にlocalesにある方が正しい * i18nパッケージ用のREADME.mdを用意 * fix locale.yml * fix locale.yml --------- Co-authored-by: kakkokari-gtyih <67428053+kakkokari-gtyih@users.noreply.github.com> --- packages/frontend/lib/vite-plugin-watch-locales.ts | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) (limited to 'packages/frontend/lib') diff --git a/packages/frontend/lib/vite-plugin-watch-locales.ts b/packages/frontend/lib/vite-plugin-watch-locales.ts index 8e209d27bd..372e9039d5 100644 --- a/packages/frontend/lib/vite-plugin-watch-locales.ts +++ b/packages/frontend/lib/vite-plugin-watch-locales.ts @@ -4,7 +4,7 @@ */ import path from 'node:path' -import locales from '../../../locales/index.js'; +import locales from 'i18n'; const localesDir = path.resolve(__dirname, '../../../locales') @@ -13,14 +13,14 @@ const localesDir = path.resolve(__dirname, '../../../locales') * @returns {import('vite').Plugin} */ export default function pluginWatchLocales() { - return { - name: 'watch-locales', + return { + name: 'watch-locales', - configureServer(server) { - const localeYmlPaths = Object.keys(locales).map(locale => path.join(localesDir, `${locale}.yml`)); + configureServer(server) { + const localeYmlPaths = Object.keys(locales).map(locale => path.join(localesDir, `${locale}.yml`)); - // watcherにパスを追加 - server.watcher.add(localeYmlPaths); + // watcherにパスを追加 + server.watcher.add(localeYmlPaths); server.watcher.on('change', (filePath) => { if (localeYmlPaths.includes(filePath)) { @@ -31,6 +31,6 @@ export default function pluginWatchLocales() { }) } }); - }, - }; + }, + }; } -- cgit v1.2.3-freya