-
Notifications
You must be signed in to change notification settings - Fork 19
Add language switcher #144
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
base: main
Are you sure you want to change the base?
Conversation
Thanks @melissawm for this awesome work 🚀 @joshmoore @sanketverma1704 this one is ready for review. Do you think you could give it a try 😄 ? Thanks a lot ! 🚀 |
Thanks for the ping, @goanpeca, and so much for the PR, @melissawm! ❤️
Does anyone in the @zarr-developers/community have any thoughts and/or interest in getting involved? |
Hi all - me and @goanpeca are working together on this so I will add him as collaborator on this PR so he can help address any comments you have. Thanks! |
thanks so much for this work! I confess I'm also confused about how we would keep these translations updated? |
Hi @joshmoore, @d-v-b and team! And thanks @melissawm for the initial work 🚀 ! I updated the PR and restructured it more to be able to handle translations. Jekyll in general does not seem to provide a standard solution for handling translations. I looked at different options but none really worked with the workflow we are using for translations with Crowdin, an online collaborative platform for doing localization and internationalization. I understand the changes are big and some of the open PRs might need a rebase, but this structure really simplifies a lot of the handling. Here are a list of changes that were made:
You can see the final result over at https://goanpeca.github.io/zarr-developers.github.io/en/![]() Now regarding how the translations workflow works
Regarding
Any changes to the site must go to the The PRs will be created weekly and automatically by the bot if new translations are detected. An example of such PR can be seen for scipy at scipy/scipy.org#644 Please let me know if you have any additional questions. I would be happy to reply :) Cheers 🚀 |
18b3fb3
to
95be444
Compare
Understood. Sorry to have caused so much trouble. Do you think what you've come up with here will work for others? i.e. overall value to try this direction or are we tilting at windmills?
(points not listed are 👍)
Seems fine since this no longer shows up in the URL, but can you say why it's needed?
Nice! Definitely agree that this is a nicer solution than duplicating (triplicating, etc.) all assets.
❤️ ❤️
This is great. Thank you! |
It could eventually, mostly the changes just come from the theme. Some static generators just provide a solution from the get go, Jekyll has some plugins, but unmaintained. Also since we use a platform to do the translations via volunteers, we need to make the process as easy as possible. This means not having to change configuration options as part of the translations to make things work, like adding a
Having any content that is or could be translatable on the root of the repo was making the automation harder, so on all the other projects (scipy, numpy, pandas, networkx, xarray) we opted for having a dedicated folder that included the content to be translated and the translations separated by language. Since we have content that does not need to be translated living outside and (slides, redirects, etc) and jekyll does not provide a way to point to several source content folders, I thought it would be just better to have all content inside. |
fa033a4
to
5778b8e
Compare
54b5d4f
to
4165b58
Compare
4165b58
to
3496128
Compare
Hi @joshmoore and @d-v-b ! Wanted to do a gentle ping and ask if you had any more questions/suggestions :) Thanks! |
Thanks for all the updates, @goanpeca! If there are no further updates from your side, I'd suggest we give every one a last chance to review and then move forward. Other than merging and setting the github pages setting, is there anything you need from me/us? |
Hi @joshmoore, that sounds great. No more updates :) Nothing else from your side. I will be available to support the translations infrastructure on our side so things keep running smoothly. And feel free to ping me as needed. Cheers! 🚀 |
Hi @melissawm and @goanpeca - thank you so much for your work on this effort. It was a pleasant surprise to see these translations implemented for our website. The Zarr Steering council met today and discussed this effort. We concluded the following:
It is now trivial for anyone to translate any website into any language. For example, here's zarr.dev in Given our technical developer audience, we feel that any potential stakeholder is more than capable of using such tools to trivially translate any of our content into the language of their choice with no overhead on our side. On the other hand, the approach provided in this PR requires ongoing effort from us, and from volunteer translators, while also limiting the number of languages to just a few. That's important, since our bandwidth as project maintainers is already spread very thin. So while the aim here is clearly good, there are also costs, and we must consider a cost-benefit analysis before moving forward with this PR. Specifically we want to understand the following:
Let me reiterate that we are deeply appreciative of the effort you have put in here. 🙏 🙏 🙏 As fellow open-source maintainers, I'm sure you're familiar with the tension between implementing new features vs. increasing maintainer overhead in resources-limited projects. |
Addresses #111
Hello, folks!
This PR adds a language switcher and some logic to deal with multiple languages on the zarr website.
Currently, as part of the Scientific Python grant, we have the site 100% translated into Portuguese (Brazilian) and Spanish. Other languages may follow soon - having the infrastructure set up will hopefully help us recruit new translators 😄
You can see a live preview of this PR here: https://axequalsb.github.io (this is a throaway github account, nevermind the URL - i just needed to deploy this somewhere at the top level because of the minimal-mistakes theme).
About the implementation: It may seem convoluted and, frankly, I'm not a javascript developer so there is certainly room for improvement. My hope was to get this all done in jinja, but unfortunately I couldn't figure out how due to some limitations of the minimal-mistakes jekyll theme. Most of the plugins for jekyll work on the assumption that you are building a blog, and this can cause issues for the format we were expecting on the site (see, for example mmistakes/minimal-mistakes#4618)
For now, only the top navbar and left sidebar are shown translated, because this is a proof of concept and these were the sections of the website that were more problematic. For the others, all pages under
content/<language-code>
will be synced automatically with Crowdin following the process our team has created (more details here: https://scientific-python-translations.github.io/docs/)@goanpeca has been working on the automation process for the sync between crowdin and the websites and can help answer any questions you might have.
This PR is a proof of concept and we are happy to adapt to any specific format or needs you might have here. Feedback is appreciated ❤️
Thanks!