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

FR: Switch internationalization to Weblate #3754

Closed
Frenzie opened this issue Mar 14, 2018 · 14 comments · Fixed by #5713
Closed

FR: Switch internationalization to Weblate #3754

Frenzie opened this issue Mar 14, 2018 · 14 comments · Fixed by #5713

Comments

@Frenzie
Copy link
Member

Frenzie commented Mar 14, 2018

  • KOReader version: 78fbc14
  • Device: all

Issue

According to @anarcat it could simplify and improve certain aspects of the workflow. This issue is to track ideas and requirements.

#2621 (comment)

@anarcat
Copy link
Contributor

anarcat commented Mar 14, 2018

So I was asked to provide a workflow example, so here we go... I'm using Weblate for the Monkeysign project. There is this web interface where people can sign in and contribute translations. Say I spoke German, I would go to the german translation page and hit Tranlsate. There I am shown with a simple form where I can submit translations, but I can also "suggest" them in which case they wait for moderation before being committed. There's also a batch edit mode (called "Zen") where multiple translations can be entered more quickly.

Once a translation is done, it gets committed into git, in a repository that is publicly available. The main developers (ie. me) will, before a release, pull from that repository and merge it in the release branch after a summary review. One thing I find annoying there is that some "empty" translations sometimes shows up: a translator would come to the project and start a (say) Russian translation but never translate any string. Or we'd have partial translations like Ukrainian (3 words?!). It's harmless, but there's a .po file there that's just mostly empty. Completely empty .po files do not get committed into git, so it's not such a big deal.

When new code is pushed to the main Monkeysign repository, there is a (web) hook that tells Weblate to pull changes. Weblate merges those in and will notice new strings needing translation and update the web interface accordingly.

Strings can also be translated using normal po tools by editing the files directly in the normal git repository, which was a requirement for us: we didn't want to depend on a web interface.

There's also a commandline client to operate the weblate repository from the commandline. From there you can list projects, translations, download translations and so on.

I'm happy to answer any other question you might have about Weblate. Apart from that one annoyance I've found above, weblate has served us very well. It mostly stays out of the way while allowing people to contribute translations fairly easily, and the web interface is always getting better. All the translations we have of Monkeysign (except a partial french translation) come from Weblate users.

You can host your own weblate instance or you can ask to be hosted for free, since this is a free software project (although they welcome donations). Here are their hosting plans.

@Frenzie
Copy link
Member Author

Frenzie commented Mar 15, 2018

Our budget is about €15. It'll have to be the free option. :-)

@cramoisi Mentioned how it can be difficult to get a proper overview of where strings are. It doesn't look to me like Weblate gives any more context indications than Transifex. Is that correct?

screenshot_2018-03-15_16-45-19

(I do think it's presented clearer in Weblate.)

@anarcat
Copy link
Contributor

anarcat commented Mar 15, 2018

I think this issue is known, documented in: WeblateOrg/weblate#1801

Basically, the "source string location" would need to be expandable somehow. Would it be sufficient if it would be link to a web view of the git repo, for example? Or should it be inlined in the web UI?

@Frenzie
Copy link
Member Author

Frenzie commented Mar 15, 2018

Sounds fine to me, but @cramoisi raised the point. :-)

But like I said, it's not positive or negative as far as Weblate goes. It's roughly the same as Transifex.

@cramoisi
Copy link
Contributor

cramoisi commented Mar 15, 2018

It's because I'm much into "I will translate this menu and then this plugin (which is attached to this plugin), etc." A more visual approach, in fact. It's hard to see how the strings will bring together something coherent. But it's easier now that I have build a test environnement :)

(anyway, where can we discuss some relevant - or irrelevant- points about traduction ?)

@Frenzie
Copy link
Member Author

Frenzie commented Feb 17, 2019

Today on Transifex:

screenshot_2019-02-17_14-49-04

@anarcat
Copy link
Contributor

anarcat commented Feb 17, 2019

I think this issue is known, documented in: WeblateOrg/weblate#1801

FWIW, that specific issue was fixed upstream.

Frenzie added a commit to Frenzie/koreader that referenced this issue Aug 23, 2019
Thanks to <koreader#5237> we can now  extract the knowledge currently embedded in Transifex and put it directly in our source. This positively affects <koreader#3754>.

Translation instructions and knowledge that comes out of localization-related questions should be preserved in the source, because Transifex is too ephemeral. For example, the links from <koreader#2290> are no longer accessible. Even when they are, it's quite useful to have this information around while dealing with the code as well, and I also hope it'll be informative to contributors who seldom visit Transifex.

This commit also makes a few minor changes to obviate the needs for comments where possible.
Frenzie added a commit that referenced this issue Aug 24, 2019
Thanks to <#5237> we can now  extract the knowledge currently embedded in Transifex and put it directly in our source. This positively affects <#3754>.

Translation instructions and knowledge that comes out of localization-related questions should be preserved in the source, because Transifex is too ephemeral. For example, the links from <#2290> are no longer accessible. Even when they are, it's quite useful to have this information around while dealing with the code as well, and I also hope it'll be informative to contributors who seldom visit Transifex.

This commit also makes a few minor changes to obviate the need for comments where possible.
@Frenzie Frenzie added the i18n label Aug 26, 2019
@Frenzie
Copy link
Member Author

Frenzie commented Oct 14, 2019

Just a quick update to keep you guys apprised. I've contacted Weblate and they say they'll be happy to host our translations.

Unless I'm overlooking something, that means:

  • Commit the translations. (Easy. Pull from Transifex and commit.) Done, now in https://github.com/koreader/koreader-translations
  • Inform everyone. (Transifex has announcements.)
  • Freeze translation activity on Transifex. (Not sure how.)Workaround or perhaps even superior solution suggested by @pazos: push a new resource with a migration info string.
  • Set up auto-push of updated template to the new koreader-translations repo.

@pazos
Copy link
Member

pazos commented Oct 14, 2019

@Frenzie: Does that mean fetch translations without a token?. I would love to see the fdroid package finally translated. 👍

@Frenzie
Copy link
Member Author

Frenzie commented Oct 14, 2019

Yeah, because the translations would just live in the repo.

https://docs.weblate.org/en/latest/admin/continuous.html#lazy-commit

I could maybe make that work with Transifex too but it seems a bit focused on keeping the translations on Tx.

https://docs.transifex.com/transifex-github-integrations/github-tx-ui

Of course I could also do it manually through a GitLab CI trigger or whatever but it seems overall more convenient this way.

@pazos
Copy link
Member

pazos commented Oct 18, 2019

Did a quick look at weblate. Amazing.

To move users to weblate it could be nice to add a new resource with a string "migrated to weblate, read more on https://github.com/koreader/koreader" and don't update other resources anymore.

Ofc, if some new contribution happens on transifex that's not available on weblate we can merge it manually

Frenzie added a commit to Frenzie/koreader that referenced this issue Oct 19, 2019
Apparently Weblate needs the translations in the repo before it can be set up.

References <koreader#3754>.

Also see <koreader#2040 (comment)>.
Frenzie added a commit that referenced this issue Oct 19, 2019
Apparently Weblate needs the translations in the repo before it can be set up.

References <#3754>.

Also see <#2040 (comment)>.
Frenzie added a commit that referenced this issue Oct 19, 2019
Apparently Weblate needs the translations in the repo before it can be set up.

References <#3754>.

Also see <#2040 (comment)>.
@Frenzie Frenzie added this to the 2019.11 milestone Oct 19, 2019
@Frenzie
Copy link
Member Author

Frenzie commented Oct 19, 2019

Until Weblate is set up I'll just leave Transifex as it is. An update should about as simple as tx pull followed by committing the changes.

@Frenzie
Copy link
Member Author

Frenzie commented Dec 13, 2019

I just received notice that Weblate is now up and running. I'll probably let it slide for the December release but this ticket will finally be able to be closed soon.

@Frenzie Frenzie removed this from the 2019.12 milestone Dec 13, 2019
@Frenzie Frenzie added this to the 2020.01 milestone Dec 13, 2019
Frenzie added a commit to Frenzie/koreader that referenced this issue Dec 31, 2019
Frenzie added a commit that referenced this issue Dec 31, 2019
Frenzie added a commit to Frenzie/koreader that referenced this issue Dec 31, 2019
Frenzie added a commit to Frenzie/koreader that referenced this issue Dec 31, 2019
Closes koreader#3754.

Adds an automated source file push to the koreader/koreader-translations repo and a cute little badge.
Frenzie added a commit that referenced this issue Dec 31, 2019
Closes #3754.

Adds an automated source file push to the koreader/koreader-translations repo and a cute little badge.
@Frenzie
Copy link
Member Author

Frenzie commented Dec 31, 2019

I uploaded @pazos' suggestion to Transifex, disabled the Transifex push in 49f06f8, and Weblate is now fully operational.

So everyone can head over to https://hosted.weblate.org/projects/koreader/koreader and start translating! ;-)

I'm already really happy about Weblate, because now many issues with spacing are automatically signaled to translators. The quality of the translations has already improved in the past few hours thanks to Weblate alone.

Text on Transifex

Screenshot_2019-12-31_11-13-35

Frenzie added a commit to Frenzie/koreader that referenced this issue Jan 1, 2020
Frenzie added a commit that referenced this issue Jan 1, 2020
mwoz123 pushed a commit to mwoz123/koreader that referenced this issue Mar 29, 2020
Thanks to <koreader#5237> we can now  extract the knowledge currently embedded in Transifex and put it directly in our source. This positively affects <koreader#3754>.

Translation instructions and knowledge that comes out of localization-related questions should be preserved in the source, because Transifex is too ephemeral. For example, the links from <koreader#2290> are no longer accessible. Even when they are, it's quite useful to have this information around while dealing with the code as well, and I also hope it'll be informative to contributors who seldom visit Transifex.

This commit also makes a few minor changes to obviate the need for comments where possible.
mwoz123 pushed a commit to mwoz123/koreader that referenced this issue Mar 29, 2020
Apparently Weblate needs the translations in the repo before it can be set up.

References <koreader#3754>.

Also see <koreader#2040 (comment)>.
mwoz123 pushed a commit to mwoz123/koreader that referenced this issue Mar 29, 2020
mwoz123 pushed a commit to mwoz123/koreader that referenced this issue Mar 29, 2020
Closes koreader#3754.

Adds an automated source file push to the koreader/koreader-translations repo and a cute little badge.
mwoz123 pushed a commit to mwoz123/koreader that referenced this issue Mar 29, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants