logto icon indicating copy to clipboard operation
logto copied to clipboard

refactor(console): refactor language options and refine documentation l10n url logic

Open charIeszhao opened this issue 2 years ago • 2 comments

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.

charIeszhao avatar Jul 29 '22 16:07 charIeszhao

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.

https://github.com/logto-io/docs/issues/215

linear[bot] avatar Jul 29 '22 16:07 linear[bot]

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

github-actions[bot] avatar Jul 29 '22 16:07 github-actions[bot]