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

Experimental Support for Community Translations #692

Merged
merged 31 commits into from
Feb 17, 2020
Merged

Conversation

phil-opp
Copy link
Owner

@phil-opp phil-opp commented Nov 27, 2019

This pull request adds experimental support for community translations as discussed in #682.

Please feel free to contribute translations to this pull request by filing pull requests against the translations branch! The naming convention for translated files is index.[lang-code].md where [lang-code] is an IETF language tag such as zh for Chinese or de for German.

Todo (later):

  • Provide a way to switch languages, at least from the index page. We could for example add small flag buttons for supported languages.
  • Translate the introduction on the index page.
  • Translate UI elements, such as the 'All Posts' link or the 'Comments' heading.

Blocked on getzola/zola#856.

Blocked on getzola/zola#811, as we don't want to use a pre-release of Zola.

@phil-opp phil-opp added the relnotes "Release notes" – Notable changes that are rendered on the blog. label Nov 27, 2019
@phil-opp
Copy link
Owner Author

Note: I'm not sure if zh is the best language tag for Chinese. As far as I know there are at least traditional and simplified Chinese, so maybe we need to be more specific here.

@phil-opp
Copy link
Owner Author

@luojia65 It seems like you already translated some of the content to Chinese at https://github.com/rustcc/writing-an-os-in-rust. Maybe you like to contribute these translations?

@Rustin170506
Copy link
Contributor

Note: I'm not sure if zh is the best language tag for Chinese. As far as I know there are at least traditional and simplified Chinese, so maybe we need to be more specific here.

Yes, the Traditional Chinese tag is zh_TW and the Simplified Chinese tag is zh_CN.
But I think we can only support Simplified Chinese now.
Because Simplified Chinese is more widely used, we may consider Traditional Chinese later.

@phil-opp
Copy link
Owner Author

Thanks for the info! I updated the language tag to zh-CN.

We only generate a RSS feed for the default language anyway.
@luojia65
Copy link
Contributor

@luojia65 It seems like you already translated some of the content to Chinese at
https://github.com/rustcc/writing-an-os-in-rust. Maybe you like to contribute these translations?

Yes I'd love to contribute my translations. If okay, please notify me after the translated site is online, so I could then offer suggestions on Chinese fonts and composing, etc. if applicable.

@phil-opp
Copy link
Owner Author

Yes I'd love to contribute my translations.

Awesome! Do you want to create a pull request against the translations branch? Alternatively I could also copy the content myself if you don't have the time (I would of course set you as the commit author).

If okay, please notify me after the translated site is online, so I could then offer suggestions on Chinese fonts and composing, etc. if applicable.

Sure, will do! I plan to put it online without linking it from the normal homepage, so that it is only visible if one knows the URLs. This allows us to check the rendering etc. before we present it to the public.

@luojia65
Copy link
Contributor

Oh I do not have time for now (midterms), please do the copy for me :) @phil-opp

@Rustin170506
Copy link
Contributor

Oh I do not have time for now (midterms), please do the copy for me :) @phil-opp

I think I can help you.

@phil-opp
Copy link
Owner Author

@Rustin-Liu

I think I can help you.

Great, thanks a lot! I opened a separate PR with an initial copy at #694. There are some parts that are untranslated at the beginning of the posts, maybe you could help adding a translation. Also, it would be great if you could review the PR in general since I don't understand Chinese :).

@wusyong
Copy link
Contributor

wusyong commented Dec 2, 2019

Hello, just saw the reddit post and wondering is it possible for me to also translate Traditional Chinese zh-tw at the same time? I have had a look on @luojia65 's work and it seems pretty good already. However, there are still some grammar and terminology differences between them. I would like to make a translation on zh-tw, or if you agree, convert it from Simplified Chinese.

@phil-opp
Copy link
Owner Author

phil-opp commented Dec 3, 2019

@wusyong

Hello, just saw the reddit post and wondering is it possible for me to also translate Traditional Chinese zh-tw at the same time?

Sure! Just open a pull request against the translations branch.

I would like to make a translation on zh-tw, or if you agree, convert it from Simplified Chinese.

@luojia65 Is it ok with you if your translation is converted?

@phil-opp
Copy link
Owner Author

phil-opp commented Dec 3, 2019

As a side note: We currently have the problem that the project specifies no license for the blog posts and the translations. The result is that every translator always needs to ask for permission, e.g. when converting other translations. It's also a bit dangerous for me to host translations created by other people with such an unclear copyright situation.

Therefore I plan to add a explicit license for the blog content, likely CC BY-NC. This license would then also apply to contributed translations, which would greatly simplify things. What do you think about this?

@wusyong
Copy link
Contributor

wusyong commented Dec 3, 2019

@phil-opp Thanks! Adding explicit license would be great. Don't worry about permission to convert if you guys have any difficulty. I could still start from scratch anyway since I have read this before.

@luojia65
Copy link
Contributor

luojia65 commented Dec 3, 2019

@phil-opp Yes I am supportive to all changes of original text. It's okay with me. Some of them make meanings clear, sometimes both are proper but I'd agree with modified version.
I wonder if publishing paperback translated books after permitted would be applicable after one given license. (Just asking, in case of possibility. I still agree to donate my translated text.) The Rust Book is available free online but it's still allowed for Rust community to publish it in paperback.

@luojia65
Copy link
Contributor

luojia65 commented Dec 6, 2019

Added CC-BY-NC-4.0 license to our community work.
If any questions please reply me: https://github.com/rustcc/writing-an-os-in-rust/blob/master/LICENSE

@phil-opp
Copy link
Owner Author

I just added a CC BY-NC license to the blog in #705.

@thebegining Are you willing to license your contributions under the CC BY-NC license too? This would be required for merging your translation included in this PR. If yes, please reply with:

I hereby license my contributions to this pull request under the CC BY-NC license (https://creativecommons.org/licenses/by-nc/4.0/).

@cqh963852
Copy link

@phil-opp
I hereby license my contributions to this pull request under the CC BY-NC license (https://creativecommons.org/licenses/by-nc/4.0/).

phil-opp and others added 7 commits December 16, 2019 17:18
instead of only providing a 'Community Translation' link
* Add traditional chinese on chapter 1

* Fix markdown typo

* Fix language tag

* Rename post name to right language tag

* Add commit data to front matter

* Update extra info in front matter
@phil-opp
Copy link
Owner Author

The Zola 0.10 branch was just merged: getzola/zola#811. I expect that the new Zola version will be released any moment. I will update the master branch of this repo to switch to the new version and then update this pull request. Then we should be able to merge this together with #694 🎉.

@phil-opp phil-opp mentioned this pull request Feb 17, 2020
@phil-opp phil-opp merged commit 03d4cc4 into master Feb 17, 2020
@phil-opp phil-opp deleted the translations branch February 17, 2020 10:09
@phil-opp
Copy link
Owner Author

The translated content is now live at https://os.phil-opp.com/zh-CN/ and https://os.phil-opp.com/zh-TW/. Please file pull requests or issues for any rendering errors. And of course, feel free to translate more content if you like!

@phil-opp
Copy link
Owner Author

Regarding the "Provide a way to switch languages, at least from the index page" task from the pull request description: I added a simple language selector to both the index and the post pages in #752.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
relnotes "Release notes" – Notable changes that are rendered on the blog.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants