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

Use different ThemeConfig for each locale #100

Merged
merged 7 commits into from
Jun 12, 2024
Merged

Use different ThemeConfig for each locale #100

merged 7 commits into from
Jun 12, 2024

Conversation

its-miroma
Copy link
Member

@its-miroma its-miroma commented May 11, 2024

Fix #95

  • Generate a ThemeConfig for each locale

  • Move CONTRIBUTING.md to contributing.md to avoid rewriting

  • Use relative links for contributing files

  • Move CONTRIBUTING files in translated/**/

  • Refactor some code

  • Check if types are correct

  • Does it work with versioning? Wait for vitepress-versioning-plugin release

Copy link

netlify bot commented May 11, 2024

Deploy Preview for nimble-elf-d9d491 ready!

Name Link
🔨 Latest commit 95865ab
🔍 Latest deploy log https://app.netlify.com/sites/nimble-elf-d9d491/deploys/6669f1bd83cbc600086b0db9
😎 Deploy Preview https://deploy-preview-100--nimble-elf-d9d491.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@its-miroma
Copy link
Member Author

its-miroma commented May 11, 2024

The preview doesn't currently work for other languages because their files still use absolute links.

Update: it fixes the top bar, but not the pages

@its-miroma
Copy link
Member Author

I asked for help over at Vitepress, and they told me that we were doing it wrong.

I have fixed it now, but there is some refactoring I would like to do. I do not have time for that right now, I'll see when I can do it.

I also don't know what I should do with the CONTRIBUTING.md files in translated/; I moved them to the lowercase version in a separate commit, if that's correct, otherwise I'll drop it.

@its-miroma its-miroma marked this pull request as ready for review May 27, 2024 19:13
@its-miroma its-miroma requested review from a team as code owners May 27, 2024 19:13
@its-miroma its-miroma changed the title Partial fix for #95 Use different ThemeConfig for each locale May 27, 2024
@its-miroma
Copy link
Member Author

Some people on Crowdin have started using absolute language links to fix the problem on their end. Again, should I modify their files here on GitHub? Can I touch translated/?

Если вы хотите внести свой вклад в документацию Fabric, вы можете найти её исходный код на [GitHub](https://github.com/FabricMC/fabric-docs) и ознакомиться с соответствующим [руководством по внесению вклада](/ru_ru/contributing).

(PS: I do not speak Russian)

@IMB11
Copy link
Member

IMB11 commented May 27, 2024

Some people on Crowdin have started using absolute language links to fix the problem on their end. Again, should I modify their files here on GitHub? Can I touch translated/?

We really need to find a way to convey the contributing guidelines to users on Crowdin, as there's no way to do this other than make the contributor process invite-only.

@IMB11
Copy link
Member

IMB11 commented May 27, 2024

I dont think this implementation will work with versioning, please test it out if you can.

@IMB11 IMB11 added framework Related to the website's framework (Vitepress) stage:cleanup This should be cleaned up labels May 27, 2024
@RushanM
Copy link

RushanM commented May 28, 2024

Does this mean that we need to stop using absolute links now?

@IMB11
Copy link
Member

IMB11 commented May 28, 2024

Does this mean that we need to stop using absolute links now?

You should have always been using relative links in translations.

@its-miroma
Copy link
Member Author

its-miroma commented May 29, 2024

I dont think this implementation will work with versioning, please test it out if you can.

It didn't. IMB11/vitepress-versioning-plugin#4 Update: waiting for release Update: Released

@IMB11
Copy link
Member

IMB11 commented Jun 12, 2024

Will publish a version for you now.

@IMB11
Copy link
Member

IMB11 commented Jun 12, 2024

0.11.0 is out, update when you can 👍

@IMB11
Copy link
Member

IMB11 commented Jun 12, 2024

Actually i'll do it now when adding support for nav translations

its-miroma and others added 6 commits June 12, 2024 17:41
- `loadLocales()` now returns `root` as well
- Extract `readTranslations()`, `applySidebarTranslations()`
- `'Edit this page on GitHub'` is now localised
@IMB11
Copy link
Member

IMB11 commented Jun 12, 2024

I think we should merge this without the localisation of the version switcher for now, it can come at a later date.

IMB11
IMB11 previously approved these changes Jun 12, 2024
@IMB11
Copy link
Member

IMB11 commented Jun 12, 2024

LGTM @modmuss50

modmuss50
modmuss50 previously approved these changes Jun 12, 2024
@its-miroma its-miroma dismissed stale reviews from modmuss50 and IMB11 via 7b19e0f June 12, 2024 19:05
- Refactor `localDir` to `localeDir`
IMB11
IMB11 previously approved these changes Jun 12, 2024
@IMB11 IMB11 merged commit 12a367f into FabricMC:main Jun 12, 2024
6 checks passed
@its-miroma its-miroma deleted the contributing branch June 12, 2024 21:35
@its-miroma its-miroma added stage:ready This is ready to be merged and removed stage:cleanup This should be cleaned up labels Nov 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
framework Related to the website's framework (Vitepress) stage:ready This is ready to be merged
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Localized versions of the Contributing page are not available
4 participants