Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

i18n overhaul #365

Merged
merged 50 commits into from
Apr 26, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
50 commits
Select commit Hold shift + click to select a range
91a0a7b
Break up translations into separate directories
delucis Apr 20, 2022
962bf01
Mark all non-English pages as drafts (except for Getting Started)
delucis Apr 20, 2022
5136a75
Implement initial content fallback system
delucis Apr 21, 2022
591a10b
Move all translations except for getting-started to archive folder
delucis Apr 21, 2022
fd1999c
Don’t use drafts feature after all
delucis Apr 21, 2022
0670922
Mark nav entries as fallback based on existence of content
delucis Apr 21, 2022
d893e32
Re-org German navbar as POC
delucis Apr 21, 2022
0aa6346
Comments
delucis Apr 21, 2022
09e3ad8
Merge branch 'main' into delucis/i18n-next
delucis Apr 21, 2022
28592d5
Add notice to top of all pages with English fallback content
delucis Apr 21, 2022
ae276e4
Tweak German sidebar labels
delucis Apr 21, 2022
ebc9bdd
Move language names to i18n folder
delucis Apr 21, 2022
796d1f8
Revert whitespace change
delucis Apr 21, 2022
1e6c968
Point “Translate this page” link to new guide
delucis Apr 21, 2022
9f18ca4
Rename UI translation files
delucis Apr 21, 2022
5112864
Add German search translation as example
delucis Apr 21, 2022
3898be3
Make a start on the i18n guide
delucis Apr 21, 2022
f1de5c0
Merge branch 'main' into delucis/i18n-next
delucis Apr 21, 2022
7ff1691
Remove requirement to set `header` & `type` on nav translations
delucis Apr 22, 2022
ffd5819
Update i18n guide with fork & PR info
delucis Apr 22, 2022
803dd6a
Add a link to the new i18n guide from fallback content notice
delucis Apr 22, 2022
d1b474d
Stop supporting localized slugs
delucis Apr 22, 2022
4fc604d
Move 404 i18n to UI dictionary
delucis Apr 22, 2022
d7741a4
Redirect from `/{lang}` to `/{lang}/getting-started`
delucis Apr 22, 2022
424033a
Exclude existing pages from fallback route
delucis Apr 22, 2022
139b8e7
Merge branch 'main' into delucis/i18n-next
delucis Apr 22, 2022
d6f1510
Restore German.& Portuguese UI translations after merge
delucis Apr 22, 2022
b21eb10
Refactor fallback content generation
delucis Apr 22, 2022
f1ddc87
Merge branch 'main' into delucis/i18n-next
delucis Apr 22, 2022
db7377a
Drop install layout to support fallback content
delucis Apr 23, 2022
dc79ee1
Use hack to render components in fallback pages
delucis Apr 23, 2022
4edca6d
Rename fallback route for clarity
delucis Apr 23, 2022
31507db
Preserve the current page when switching languages
delucis Apr 23, 2022
d5fb3a8
MUCH less hacky fallback content approach
delucis Apr 23, 2022
6512da9
Upgrade Astro to 1.0.0-beta.17
delucis Apr 23, 2022
98ed9e2
Don’t pass `Content` component through props
delucis Apr 23, 2022
5f11662
Merge branch 'main' into delucis/i18n-next
delucis Apr 23, 2022
485a178
Handle trailing slashes in install guide active tab logic
delucis Apr 23, 2022
80b2e28
Merge branch 'main' into delucis/i18n-next
delucis Apr 23, 2022
3f0eb01
Rename file for clarity
delucis Apr 24, 2022
b1f595d
Add script to scaffold a new language’s translation files
delucis Apr 24, 2022
c1e05c2
Add instructions for adding a language to the i18n guide
delucis Apr 24, 2022
6e92683
Merge branch 'main' into delucis/i18n-next
delucis Apr 24, 2022
3d495ed
Add hreflang alternate links to head
delucis Apr 24, 2022
bc93d1b
Add `lang="en"` to fallback content
delucis Apr 24, 2022
1283d89
Use `en` URL as canonical for fallback pages
delucis Apr 24, 2022
bcac7b6
Use `/auto` install guide slug in sidebar
delucis Apr 24, 2022
adb545d
perf: Avoid globbing all Markdown files
delucis Apr 25, 2022
b9f60bb
Merge branch 'main' into delucis/i18n-next
delucis Apr 25, 2022
ff252d9
Merge branch 'main' into delucis/i18n-next
delucis Apr 26, 2022
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion jsconfig.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,11 @@
{
"compilerOptions": {
"baseUrl": ".",
"module": "esnext",
"moduleResolution": "node",
"paths": {
"~/*": ["src/*"]
}
},
"types": ["vite/client"]
}
}
2 changes: 1 addition & 1 deletion netlify.toml
Original file line number Diff line number Diff line change
Expand Up @@ -11,5 +11,5 @@

[[redirects]]
from = "/:lang/*"
to = "/:lang/404.html"
to = "/:lang/404/"
status = 404
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
5 changes: 4 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
"preview": "astro preview",
"format": "prettier -w .",
"lint": "lint:linkcheck",
"add-language": "node ./scripts/add-language.mjs",
"lint:a11y": "start-test 'yarn build && yarn preview' 3000 'yarn lint:a11y:local'",
"lint:a11y:local": "pa11y-ci --sitemap 'http://localhost:3000/sitemap.xml' --sitemap-find 'https://docs.astro.build' --sitemap-replace 'http://localhost:3000'",
"lint:a11y:remote": "pa11y-ci --sitemap 'https://docs.astro.build/sitemap.xml'",
Expand All @@ -22,12 +23,14 @@
"@astrojs/sitemap": "^0.1.0",
"@babel/core": "^7.17.9",
"@types/react": "^17.0.43",
"astro": "^1.0.0-beta.5",
"astro": "^1.0.0-beta.17",
"bcp-47-normalize": "^2.1.0",
"htmlparser2": "^7.2.0",
"kleur": "^4.1.4",
"node-fetch": "^3.2.3",
"preact": "^10.7.1",
"prettier": "^2.6.2",
"prompts": "^2.4.2",
"react": "^17.0.2",
"react-dom": "^17.0.2"
},
Expand Down
Loading