Commit 0b4e61b
fix(admin): use import.meta.glob for locale catalog resolution (#499)
* fix(admin): use import.meta.glob for locale catalog resolution
The dynamic import in admin.astro used a template literal to load locale
catalogs cross-package, which failed in non-monorepo installs because
Vite's SSR module runner couldn't resolve the path. The Vite alias entry
intended to fix this used `*` in the find string, which is treated as a
literal character, not a wildcard.
Moves locale loading into the admin package via `loadMessages()` using
`import.meta.glob`, so Vite resolves catalogs at build time with
reliable relative paths. Removes the no-op Vite alias.
* fix(locales): use Messages type from @lingui/core and DEFAULT_LOCALE for fallback
Agent-Logs-Url: https://github.com/emdash-cms/emdash/sessions/c16c31e9-70d6-4dcc-9a07-27184ed47cd8
Co-authored-by: ascorbic <213306+ascorbic@users.noreply.github.com>
* style: format
---------
Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: ascorbic <213306+ascorbic@users.noreply.github.com>
Co-authored-by: emdashbot[bot] <emdashbot[bot]@users.noreply.github.com>1 parent 8bdcf1d commit 0b4e61b
File tree
5 files changed
+44
-6
lines changed- .changeset
- packages
- admin
- src/locales
- tests/lib
- core/src/astro
- integration
- routes
5 files changed
+44
-6
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
1 | 5 | | |
2 | 6 | | |
3 | 7 | | |
| |||
7 | 11 | | |
8 | 12 | | |
9 | 13 | | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
293 | 293 | | |
294 | 294 | | |
295 | 295 | | |
296 | | - | |
297 | | - | |
298 | | - | |
299 | | - | |
300 | 296 | | |
301 | 297 | | |
302 | 298 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
12 | 12 | | |
13 | 13 | | |
14 | 14 | | |
15 | | - | |
| 15 | + | |
16 | 16 | | |
17 | 17 | | |
18 | | - | |
| 18 | + | |
19 | 19 | | |
20 | 20 | | |
21 | 21 | | |
| |||
0 commit comments