Skip to content

Commit

Permalink
Added localization (#65)
Browse files Browse the repository at this point in the history
* Displays a 404 error page when trying to access an inexistent wiki page

* Added the possibility to add translations
- Got the the wiki's pages metadata out of the markdown files into yaml files
- There is now one markdown file per language for each page
- Changed the way wiki pages are loaded to account for that
- Most texts are now call to the translation store
- Translation files can be found in /src/lib/translations

* Started writing french translation

* Added a notice when the selected locale isn't english

* More advancement on the french translation

* Almost done with the french translation

* Finished the french translation

* Added ES2023 as a lib in tsconfig to be able to use 'toSorted()' on arrays

* Switched 'toSorted()' with 'sort()' so that the github build action hopefully functions

* Changed the behavior of the lang dropdown so that it toggles on click instead of opening when hovered

* Improved the usability of the lang dropdown

* Locale in url instead of local storage

* Improved route based translation

* Get the first valid locale from the browser's prefered languages list
instead of just trying to use the first one then defaulting to english

* Improved support for browsers with javascript disabled

* 404 errors are now displayed properly after build

* Switched to unocss for the icons
- This is a pure css solution, meaning that the icons are visible even with javascript disabled
- This still allows to use font awesome icons so the site should look identical
- See <https://unocss.dev/presets/icons> for the documentation

* Better handling of routes with no locales
- With javascript disabled, wiki pages with no locale set will now be displayed in the default locale (english)
- With javascript enabled, wiki pages with no locale set still redirects to the browser default locale
- The lang dropdown now allows to change the locale of a route with no locale set

* Removal of unneedeed hidden links

* French corrections

* Fix find and replace mistake

* Gender-neutral language
  • Loading branch information
c-leri authored Dec 22, 2023
1 parent 816da12 commit a852f76
Show file tree
Hide file tree
Showing 98 changed files with 3,615 additions and 967 deletions.
48 changes: 28 additions & 20 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,32 +12,40 @@
"format": "prettier --plugin-search-dir . --write . && eslint . --fix"
},
"devDependencies": {
"@sveltejs/adapter-static": "^2.0.2",
"@sveltejs/kit": "^1.20.4",
"@types/node": "^20.3.1",
"@types/prismjs": "^1.26.0",
"@typescript-eslint/eslint-plugin": "^5.60.0",
"@typescript-eslint/parser": "^5.60.0",
"eslint": "^8.43.0",
"eslint-config-prettier": "^8.8.0",
"eslint-plugin-import": "^2.27.5",
"eslint-plugin-svelte": "^2.31.0",
"mdsvex": "^0.10.6",
"@hbsnow/rehype-sectionize": "^1.0.7",
"@iconify-json/fa6-brands": "^1.1.13",
"@iconify-json/fa6-solid": "^1.1.15",
"@iconify-json/tabler": "^1.1.98",
"@jsdevtools/rehype-toc": "^3.0.2",
"@sveltejs/adapter-static": "^2.0.3",
"@sveltejs/kit": "^1.27.2",
"@sveltekit-i18n/base": "^1.3.7",
"@sveltekit-i18n/parser-default": "^1.1.1",
"@types/node": "^20.8.10",
"@types/prismjs": "^1.26.2",
"@typescript-eslint/eslint-plugin": "^5.62.0",
"@typescript-eslint/parser": "^5.62.0",
"@unocss/extractor-svelte": "^0.57.7",
"eslint": "^8.52.0",
"eslint-config-prettier": "^8.10.0",
"eslint-plugin-import": "^2.29.0",
"eslint-plugin-svelte": "^2.34.0",
"mdsvex": "^0.11.0",
"prettier": "^2.8.8",
"prettier-plugin-svelte": "^2.10.1",
"prismjs": "^1.29.0",
"quilt-bulma": "^0.0.23",
"rehype-autolink-headings": "^6.1.1",
"rehype-slug": "^6.0.0",
"@hbsnow/rehype-sectionize": "^1.0.7",
"@jsdevtools/rehype-toc": "^3.0.2",
"rehype-rewrite": "^3.0.6",
"svelte": "^3.59.2",
"svelte-check": "^3.4.4",
"tslib": "^2.5.3",
"typescript": "^5.1.3",
"vite": "^4.3.9",
"yaml": "^2.3.1"
"rehype-slug": "^6.0.0",
"svelte": "^4.2.2",
"svelte-check": "^3.5.2",
"svelte-markdown": "^0.4.0",
"tslib": "^2.6.2",
"typescript": "^5.2.2",
"unocss": "^0.57.7",
"vite": "^4.5.0",
"yaml": "^2.3.4"
},
"type": "module"
}
Loading

0 comments on commit a852f76

Please sign in to comment.