Mara-Li
2024-02-04 dbbc672c67aa5ac0a915d22af5cf44c4e7011aae
refs
author Mara-Li <mara-li@outlook.fr>
Sunday, February 4, 2024 03:55 +0000
committer GitHub <noreply@github.com>
Sunday, February 4, 2024 03:55 +0000
commitdbbc672c67aa5ac0a915d22af5cf44c4e7011aae
tree dcf5aa10ffa3a51c9763e800d63d915edc997639 tree | zip | gz
parent 3fb3930df8d3bc61bbf6ac69360a1b5949270cca view | diff
feat: Adding support for i18n (closes #462) (#738)

* fix: alt error mix with height/width

More granular detection of alt and resize in image

* fix: format

* feat: init i18n

* feat: add translation

* style: prettier for test

* fix: build-up the locale to fusion with dateLocale

* style: run prettier

* remove cursed file

* refactor: remove i18n library and use locale way instead

* format with prettier

* forgot to remove test

* prevent merging error

* format

* format

* fix: allow string for locale
- Check during translation if valid / existing locale
- Allow to use "en" and "en-US" for example
- Add fallback directly in the function
- Add default key in the function
- Add docstring to cfg.ts

* forgot item translation

* remove unused locale variable

* forgot to remove fr-FR testing

* format
3 files added
14 files modified
212 ■■■■ changed files
quartz.config.ts 1 ●●●● diff | view | raw | blame | history
quartz/cfg.ts 2 ●●● diff | view | raw | blame | history
quartz/components/Backlinks.tsx 7 ●●●●● diff | view | raw | blame | history
quartz/components/Darkmode.tsx 7 ●●●●● diff | view | raw | blame | history
quartz/components/Footer.tsx 6 ●●●●● diff | view | raw | blame | history
quartz/components/Graph.tsx 5 ●●●●● diff | view | raw | blame | history
quartz/components/Head.tsx 6 ●●●●● diff | view | raw | blame | history
quartz/components/RecentNotes.tsx 9 ●●●● diff | view | raw | blame | history
quartz/components/Search.tsx 5 ●●●●● diff | view | raw | blame | history
quartz/components/TableOfContents.tsx 10 ●●●● diff | view | raw | blame | history
quartz/components/pages/404.tsx 7 ●●●●● diff | view | raw | blame | history
quartz/components/pages/FolderContent.tsx 8 ●●●● diff | view | raw | blame | history
quartz/components/pages/TagContent.tsx 19 ●●●● diff | view | raw | blame | history
quartz/components/scripts/search.inline.ts 8 ●●●● diff | view | raw | blame | history
quartz/i18n/i18next.ts 37 ●●●●● diff | view | raw | blame | history
quartz/i18n/locales/en.json 37 ●●●●● diff | view | raw | blame | history
quartz/i18n/locales/fr.json 38 ●●●●● diff | view | raw | blame | history