fabric-docs icon indicating copy to clipboard operation
fabric-docs copied to clipboard

Partial fix for #95

Open its-miroma opened this issue 1 year ago • 2 comments

There are currently two problems with CONTRIBUTING:

  • The links used are all absolute, so CONTRIBUTING will always be in English
  • You're trying to redirect /CONTRIBUTING to /contributing, for aesthetic reasons

Possible solutions for the first problem include:

  • Using relative links in files (DONE)
  • The top bar can't use a relative link, because that only works on the homepage (see comment in source code)

Possible solutions for the second problem include:

  • Simply renaming CONTRIBUTING.md to contributing.md, easiest solution
  • Accepting that the aesthetic redirect will only work for English, because of how Vitepress works (only one rewrite is applied for each page, I think; I couldn't figure out why)

its-miroma avatar May 11 '24 14:05 its-miroma

Deploy Preview for nimble-elf-d9d491 ready!

Name Link
Latest commit 95865ab87ed66e63b412da118c6ade8181e925f4
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.

netlify[bot] avatar May 11 '24 14:05 netlify[bot]

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 avatar May 11 '24 14:05 its-miroma

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 avatar May 27 '24 19:05 its-miroma

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/?

https://github.com/FabricMC/fabric-docs/blob/39cad1fa0f7d1f64701f0595d3d4f71ea783f494/translated/ru_ru/index.md?plain=1#L26

(PS: I do not speak Russian)

its-miroma avatar May 27 '24 19:05 its-miroma

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 avatar May 27 '24 19:05 IMB11

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

IMB11 avatar May 27 '24 19:05 IMB11

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

RushanM avatar May 28 '24 16:05 RushanM

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

You should have always been using relative links in translations.

IMB11 avatar May 28 '24 20:05 IMB11

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

It didn't. ~~https://github.com/IMB11/vitepress-versioning-plugin/pull/4~~ ~~Update: waiting for release~~ Update: Released

its-miroma avatar May 29 '24 16:05 its-miroma

Will publish a version for you now.

IMB11 avatar Jun 12 '24 13:06 IMB11

0.11.0 is out, update when you can :+1:

IMB11 avatar Jun 12 '24 14:06 IMB11

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

IMB11 avatar Jun 12 '24 14:06 IMB11

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

IMB11 avatar Jun 12 '24 18:06 IMB11

LGTM @modmuss50

IMB11 avatar Jun 12 '24 18:06 IMB11