Skip to content

Commit f67947d

Browse files
committed
refactor(i18n): derive eloqnt locales from i18n config, drop ui-components from srcPath
The locale list now comes from packages/i18n/src/config.json (enabled locales only) instead of being duplicated. 'infer' is not used because it would pick up the disabled ar.json from disk. packages/ui-components does not use next-intl — components receive translated strings as props — and removing it from srcPath leaves the lint result unchanged (verified: 0 errors, 562 warnings).
1 parent 7329aab commit f67947d

1 file changed

Lines changed: 5 additions & 17 deletions

File tree

‎.eloqnt/config.ts‎

Lines changed: 5 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,13 @@
11
import { defineConfig } from '@eloqnt/cli';
2+
import localeConfig from '../packages/i18n/src/config.json' with { type: 'json' };
23

34
export default defineConfig({
4-
srcPath: ['./apps/site', './packages/ui-components'],
5+
srcPath: ['./apps/site'],
56
messages: {
67
path: './packages/i18n/src/locales',
7-
locales: [
8-
'en',
9-
'es',
10-
'fr',
11-
'id',
12-
'ja',
13-
'ko',
14-
'pt-br',
15-
'pt',
16-
'ro',
17-
'ta',
18-
'tr',
19-
'uk',
20-
'zh-cn',
21-
'zh-tw',
22-
],
8+
locales: localeConfig
9+
.filter(locale => locale.enabled)
10+
.map(locale => locale.code),
2311
sourceLocale: 'en',
2412
format: 'json',
2513
},

0 commit comments

Comments
 (0)