Repository navigation
fix(translations): load date-fns locale for hy-AM - #19493
pcbeingused333 wants to merge 1 commit into
Conversation
The Armenian language declares dateFNSKey 'hy-AM' but importDateFNSLocale had no case for it, so i18n.dateFNS was undefined and date titles in the admin stayed on Loading. Add the missing case and a test that checks every language dateFNSKey resolves to a date-fns locale.
|
No actionable comments were generated in the recent review. Walkthrough
Merge Risk:
|
Fixes #19481
Cause: the Armenian language (
languages/hy.ts) declaresdateFNSKey: 'hy-AM', butimportDateFNSLocalehas no case for it, so it returnsundefined.initTFunction/getRequestI18npropagate thatundefinedintoi18n.dateFNS, andformatDateTitlekeeps showing the loading state for dates in the admin.Fix: add the
hy-AMcase, loadingdate-fns/locale/hy, as proposed in the issue. It is the onlydateFNSKeywithout a case; the other keys were checked against the switch.Test: new
importDateFNSLocale.spec.tsresolves every language'sdateFNSKeyand fails if any returnsundefined(fails on main forhy-AM, passes with the fix).This PR was prepared with the assistance of an AI tool (Claude Code) and submitted by a human contributor.