🐛 [bug:i18n] Some issues with astro.config.{*s}
and astro:i18n
#13017
Labels
needs repro
Issue needs a reproduction
astro.config.{*s}
and astro:i18n
#13017
Astro Info
If this issue only occurs in one browser, which browser is a problem?
No response
Describe the Bug
Astro (
astro.config.{*s}
) ConfigurationDetails (Reference Configuration)
Figures
(Figure 1)
(Figure 2)
( Figure 3)
Issues in
astro.config.{*s}
en-US
key in the i18n.domains record doesn't exist in thei18n.locales
array. #13020english
is not in the typePartial<Record<"zh-CN" | "en-GB" | "en" | "zh-HK" | "en-US", string>>
, but it can solve issue 2 #13019Astro (
astro:i18n
) runtimeI am trying to extend some interfaces to
AstroGlobal
for dynamic generation ofstructured data
.Example 1: Dynamically generate
itemListElement
ofBreadcrumbList
Issues in
asto:i18n
pathHasLocale(path:string)
**Should be improved 1**: should not be limited to the determination ofsegment
, should be combined with the attributes related to the__ASTRO_INTERNAL_I18N_CONFIG__
object (such asbase
) #13021pathHasLocale(path:string)
**Should be improved 2**: Wheni18n
is not configured in the fileastro.config.{*s}
, it should not throw an error, but should be more friendly and gentle, and directly return false: because at this timepathname
is treated as a regular path. #13022What's the expected result?
Main tasks
astro.config.{*s}
Minor tasks
asto:i18n
: functionpathHasLocale(path:string)
Link to Minimal Reproducible Example
https://github.com/withastro/astro/tree/main/examples/basics
Participation
The text was updated successfully, but these errors were encountered: