-
Notifications
You must be signed in to change notification settings - Fork 29
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
Proposal for i18n support #355
Comments
Maybe @voborgus knows more on the magic required here as he's been really instrumental with the transition to the new Hugo powered site. |
@lenucksi Thank you! I've also been trying to experiment with the HUGO site and have an update. I've created a sample site with multilingual support. Please take a look at the page. This URL is a .jp domain that I took for testing purposes when I decided to create a InnerSource Commons Japan. It is not intended to be used in production or indexed by search engines. I plan to delete it when I have finished checking it. And also, please see my jp-translation branch of the repository for code changes. Here are the main points
|
I'm back @yuhattor ! Text in {{ shortcodes }} can be easily internationalised with the syntax like
Awesome idea. A quick solution comes to me is to play around
I think it can lead also to the content inconsistency, and this can be a real problem. If we want to save the language setting even if we go to untranslated pages, we can consider the other solution is to store the state of the language in Cookie file, and then if you're on English but your setting is Japanise, and the translation is available – redirect you to the localised versoin. This hack is still a little bit ugly, but maybe have less concerns. What do you think?
Happy to do that for Russian! Thanks a lot for this contribution! Just a few steps and we'll have a multilingual site. Amazing! :) |
@voborgus
I can't agree more. I think events and announcements should be the last things to be done.
yea:) let's do that:)
Actually, I've already solved the issue:) - name: Copy the missing files from /content/en for publishing each language site
run: |
for i in de es fr it ja ru zh; do
rsync -rv --ignore-existing content/en/ content/$i/ --log-file=content/.gitignore;
sed -i "s/^.\{37\} /$i\//g" content/.gitignore;
sed -i '/total size\|file list/d' content/.gitignore;
done The sed part is also a hack. This is a setting that does not actually go into the pipeline and will be removed from the pipeline, but is necessary locally. For more information and procedure, please take a look at the README.md When you try to start the hugo server locally, if there are missing pages, it will not work as expected. So we need to supplement the files for each locale with rsync locally as well. I am adding the target files to This is a bit tricky, but it sure works. These things don't affect people working in an English environment at all, but for people who want to check their language translations locally, it is a bit confusing at first and needs to be made a bit more elegant by putting it into commands.
If you don't mind, can you give me write access? I would also like to do a PoC on i18n support and managing updates to translated pages to bring consistency to the content:) |
Sure, you should have access to push to the branches except |
Thank you!!! |
Structure for i18n SupportIf we want to support i18n, the directory structure of the site must be changed. For this reason, I propose a two-step process to achieve i18n compatibility.
Especially the first step would be easy. There is already a sample at innersourcecommons.jp and you can see that all the pages are working fine. DependencyHowever, there is one challenge. That is the dependency of Learning-Path. Every time Learning-Path is updated, the github-bot commits to the innersourcecommons.org repository. There would be four ways to resolve this dependency
|
@voborgus @rrrutledge |
Yes #2. And there will be additional learning path content, and additional translations of that content. Great job figuring this out. |
Adding japanese-pages for the i18n-support trial |
Proposal
The Japanese community is gradually growing, and the innersourcecommons.org page should be its landing page. Therefore, I would like to propose the internationalization of the site.
Scope
contents, menus and footers.
However, details and reports of past events and Learning Path will be excluded from this translation
Where to start
We would like to translate the Japanese page first. However, if this is done well, the site will be able to be translated easily into other languages as well. We will try Japanese first as an experiment, and then will try to onboard other languages if there is someone who are willing to volunteer.
Some people in InnerSource Commons Japan will participate in the work, so I want to put the repository in an easy-to-understand place. If possible, it would be useful for me to have write permission for the repo. But I don't want to break the environment since I don't yet know some of the things on the innersourcecommmons.org page. (Well, I won't be committing to the main branch for the near future, so I think I'll be fine.)
But I know there is governance in managing innersourcecommons/innersourcecommmons.org, so if there is a proper way to do it, please let me know sometimes...
I'm currently working on a repository at yuhattor/innersourcecommons.org.
We believe that a Japanese page is essential for the Japanese community. The amount of translation is not so large, so we hope to release it in November.
Experiment
I set up an experimental site here, and working at jp-translation branch on my github repository
I've only translated the top page, so the rest will get 404.
What I learned after experiment
As I worked on the translation, I noticed several things.
config.yaml
can be split intoconfig/_default/config.yaml
,config/_default/languages.yaml
and etc. to make it easier to i18n things like menu notation.layouts/shortcodes/about-text.html
have some English embedded in them. it would be easier to manage these parts of html by moving them out to i18n/en.yaml and so on.I would like to hear your opinions.
Especially about the structure of hugo and how to operate it.
I wonder why Learning Path is in different repositories, is there some background that prevents integration?
+ sorry, the
bug
label is not applicable for this. Please change it...The text was updated successfully, but these errors were encountered: