feat(admin-*,dashboard): add dashboard i18n extensions (#13763)
* virtual i18n module
* changeset
* fallback ns
fallback to the default "translation" ns if the key isnt found. Allows to use a single "useTranslation("customNs")" hook for both custom and medusa-provided keys
* simplify merges
* optional for backward compat
* fix HMR
* fix generated deepMerge
* test
This commit is contained in:
@@ -4,6 +4,7 @@ export const DISPLAY_VIRTUAL_MODULE = `virtual:medusa/displays`
|
||||
export const ROUTE_VIRTUAL_MODULE = `virtual:medusa/routes`
|
||||
export const MENU_ITEM_VIRTUAL_MODULE = `virtual:medusa/menu-items`
|
||||
export const WIDGET_VIRTUAL_MODULE = `virtual:medusa/widgets`
|
||||
export const I18N_VIRTUAL_MODULE = `virtual:medusa/i18n`
|
||||
|
||||
export const VIRTUAL_MODULES = [
|
||||
LINK_VIRTUAL_MODULE,
|
||||
@@ -12,4 +13,5 @@ export const VIRTUAL_MODULES = [
|
||||
ROUTE_VIRTUAL_MODULE,
|
||||
MENU_ITEM_VIRTUAL_MODULE,
|
||||
WIDGET_VIRTUAL_MODULE,
|
||||
I18N_VIRTUAL_MODULE,
|
||||
] as const
|
||||
|
||||
Reference in New Issue
Block a user