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

Wc weblate #5478

Merged
merged 8 commits into from
May 21, 2021
Merged

Wc weblate #5478

merged 8 commits into from
May 21, 2021

Conversation

wibily
Copy link
Contributor

@wibily wibily commented May 7, 2021

What this PR does

records down the decision to use weblate for our translation needs

Checklist

  • no code changes
  • purely documentation changes ADR so no updates to changes.md

Copy link
Member

@tephenavies tephenavies left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is great @wibily. Thanks so much for researching all of this and setting it up. Here's a few things that I picked up on.

@@ -0,0 +1,27 @@
# 7. Use weblate for i18n

Date: 2020-05-07
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That's a year ago 😆

architecture/0007-use-weblate-for-i18n.md Outdated Show resolved Hide resolved
architecture/0007-use-weblate-for-i18n.md Show resolved Hide resolved

We will use hosted weblate at https://hosted.weblate.org/projects/terriajs/ to allow external translators to contribute to the project. There will be two projects, one connected to the master branch and another connected to the next branch.

When the en/translation.json is updated, our weblate plugin and associated webhook will let the hosted weblate know and weblate will pull the updated changes. When a contributing translator provides translations, weblate will create a PR into the corresponding branch allowing a terria mainter to review the changes before merging the changes.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would pull requests with whole translation files for other localisations fit into this approach e.g. #5241 & #5302?

I'm not saying it should. Maybe Weblate has something that could help us get these efforts into the project through the Weblate workflow below.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I see that weblate has a mechanism to review translations. I am not sure who is in charge of reviewing, but I wonder when we get entire terriajs translated to French and approve those translations. When some source string changes, will it set its translation to unreviewed or need editing status?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@steve9164 New whole translation files won't be an issue as it'll get picked up by the github webhook and then it'll follow the existing weblate process. If it was an existing translation file however, this might cause merge conflicts between our respository and the weblate repository.
@zoran995 - I believe that if the source string changes, it will change the status of the translated string to 'needs editing'.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just checked above with weblate support to be sure. When source strings update, their state will change automatically to "Needs editing", and if we are using reviewing new review will be required. Can we add that somewhere to adr, and also, should reviewing be activated?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Keep in mind that we will need additional work to support RTL languages currently

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think we should enable reviewing at this stage, maybe once we have identified someone who could do it? Thoughts? @steve9164

@zoran995
Copy link
Collaborator

zoran995 commented May 7, 2021

In the context of using weblate and translating to french, we should address strings from #4519 (with or without lint support), since some strings are still not extracted for translation.
Also, weblate supports pluralization of string, and #5113 should be addressed to support pluralization of all strings that need it (at least it was like that when I created that PR). This will show a nice translation form
image

Co-authored-by: Stephen Davies <steve9164@gmail.com>
@wibily wibily self-assigned this May 10, 2021
@wibily wibily requested a review from tephenavies May 10, 2021 10:44
@wibily wibily dismissed tephenavies’s stale review May 17, 2021 23:51

merging in ADR PR

@wibily wibily merged commit c8fb50a into next May 21, 2021
@wibily wibily deleted the wc-weblate branch May 21, 2021 05:06
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.

3 participants