logto
logto copied to clipboard
refactor(console): refactor language options and refine documentation l10n url logic
Summary
Non-Chinese language will fall back to English on clicking the "Docs" link in admin console.
Testing
- [x] Tested only Chinese language will end up appending zh-CN in the docusaurus URL, others remain using English.
LOG-3852 [Docs] No fallback docs link on unsupported language
When we have a new language in AC, clicking the Docs
menu will end up in a "not found" page in logto docs.
COMPARE TO master
Total Size Diff :chart_with_upwards_trend: +558 Bytes
Diff by File
Name | Diff |
---|---|
packages/console/src/components/AppContent/components/Sidebar/hook.tsx | :chart_with_upwards_trend: +138 Bytes |
packages/console/src/hooks/use-documentation-url.ts | :chart_with_upwards_trend: +652 Bytes |
packages/console/src/hooks/use-language.ts | :chart_with_upwards_trend: +302 Bytes |
packages/console/src/pages/GetStarted/hook.ts | :chart_with_upwards_trend: +172 Bytes |
packages/console/src/pages/Settings/index.tsx | :chart_with_upwards_trend: +70 Bytes |
packages/phrases-ui/src/types.ts | :chart_with_upwards_trend: +224 Bytes |
packages/phrases/src/types.ts | :chart_with_upwards_trend: +224 Bytes |