create-t3-app
create-t3-app copied to clipboard
feat(docs): left sidebar language
Resolves https://github.com/t3-oss/create-t3-app/issues/821
✅ Checklist
- [x] I have followed every step in the contributing guide (updated 2022-10-06).
- [x] The PR title follows the convention we established conventional-commit
- [x] I performed a functional test on my final commit
Changelog
Some more preparations for getting translations online
Uses the active language in the left sidebar and shows the table of contents for that language. Also makes the links in the sidebar link to pages of that language (manually for now, maybe there is an elegant way to this automatic...)
Tested this on @Yevhenii-Bakhmat 's RU branch (forgot to take screenshot, so made a new screenshot with a fake translated page), but should work on any translation branch/language.
Translators will also need to update the sidebar in their language in www/src/config.ts, for the in progress translations I put a note about this in the first list item.
Screenshots
💯
⚠️ No Changeset found
Latest commit: 281ad69f731b91f3f6bd7e2f54d3b7436d132c00
Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.
This PR includes no changesets
When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types
Click here to learn what changesets are, and how to add one.
Click here if you're a maintainer who wants to add a changeset to this PR
The latest updates on your projects. Learn more about Vercel for Git ↗︎
1 Ignored Deployment
| Name | Status | Preview | Updated |
|---|---|---|---|
| create-t3-app | ⬜️ Ignored (Inspect) | Dec 2, 2022 at 0:28AM (UTC) |
⚡️ Lighthouse report for the changes in this PR:
| Category | Score |
|---|---|
| 🟢 Performance | 100 |
| 🟢 Accessibility | 100 |
| 🟢 Best practices | 100 |
| 🟠 SEO | 86 |
| 🟠 PWA | 54 |
Lighthouse ran on https://create-t3-app-git-left-sidebar-language-t3-oss.vercel.app/
Could have just continued on my PR :(
Could have just continued on my PR :(
oh yeah my bad :/
feel free to merge this into your pr and close
I think parsing a titles from tanslation pages would be better then using constant with paths and labels
I think parsing a titles from tanslation pages would be better then using constant with paths and labels
i agree this would be better, but can't think of an easy way to do it currently. only way i can think of is to import every article in each language in config.ts and get frontmatter from all of them, which is a lot. maybe there's something to help us in astro docs, can check tonight.
What's the status here?
What's the status here?
Need to resolve conflicts tomorrow, other than that ready to review/merge.
ready for review now @juliusmarminge
toc disappears https://share.cleanshot.com/502Vvd
This banner also looks a bit weird, but honestly im not sure how it should look so can't say

This banner also looks a bit weird, but honestly im not sure how it should look so can't say
There are two options for this
- Always display it in English, then it should be ltr
- Translate this banner for other languages (seems to make sense), then it should be rtl as it is now. if we decide to start translating not just .md files, we'll probably want https://www.npmjs.com/package/astro-i18next
Re: ToC - will check what's going on tomorrow
Always display it in English, then it should be ltr
This for now maybe? Can always change later
something weird going on with the external link icons in rtl
also dont merge before arabic is removed from the list of known languages, otherwise we're deploying two fake arabic pages
@juliusmarminge lmk when you're ready to merge and i'll remove the arabic placeholder stuff (or feel free to remove it yourself)