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

Moving towards weblate #3: Tutorial transition #1256

Merged
merged 24 commits into from
May 24, 2016

Conversation

hzulla
Copy link
Collaborator

@hzulla hzulla commented May 24, 2016

This makes the tutorial translation possible through Weblate.

The existing translated Markdown versions have been removed and imported to .po files, which is the format used by Weblate (and similar translation workflow services). I have tried to import the existing (partially incomplete) translations as faithfully as possible, but it still requires a proofreading afterwards. That proofreading only needs to be done once.

The English Markdown files have been moved back into doc/etc/tutorial.

The i18n-tool.rb script is used to generate the translated versions in doc/etc/generated/<lang>/tutorial/ during build.

The i18n-tool.rb script also creates the .pot translation template file from the English markdown, which is later used to merge the updated English tutorial texts with the existing translations. The language file update process is described as usually in TRANSLATION-WORKFLOW.md. rmsgmerge will complain about fuzzy (= guessed) translations during the merge, this is normal and intended behaviour.

The developer experience to build Sonic Pi with this is currently still sub-par, as i18n-tool.rb adds another step to the build process and its source pretty hackish with some hardcoded file locations.

I promise to clean this up, as @Factoid and I want to work on the build scripts together after this. But I wanted to get the tutorial into weblate quickly for the awesome and impatient translators. :-D

If you agree and merge this, I can then ask the Weblate admins to turn on the tutorial translation component on their site.

@hzulla
Copy link
Collaborator Author

hzulla commented May 24, 2016

A more detailed look into the translation workflow:

  • Weblate edits translations in etc/doc/lang/sonic-pi-tutorial-*.po
  • i18n-tool.rb -x creates etc/doc/lang/sonic-pi-tutorial.pot from etc/doc/tutorial/*.md
  • i18n-tool.rb -u updates the existing .po files with the message strings from the .pot template.
  • i18n-tool.rb -t generates translated Markdown files in etc/doc/generated/*

@samaaron samaaron merged commit 1a35031 into sonic-pi-net:master May 24, 2016
@samaaron
Copy link
Collaborator

Incredible work, thanks!

@hzulla hzulla deleted the weblate-tutorial-transition branch June 24, 2016 07:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants