Skip to content

Wire up to a platform for contributing translations #276

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

Open
gnprice opened this issue Aug 17, 2023 · 2 comments
Open

Wire up to a platform for contributing translations #276

gnprice opened this issue Aug 17, 2023 · 2 comments
Labels
a-i18n Translation, localization, internationalization a-tools Our own development tooling, scripts, and infrastructure

Comments

@gnprice
Copy link
Member

gnprice commented Aug 17, 2023

This is a followup to #275. After we have that basic framework for using translated strings in the UI, we'll want to set things up so that Zulip's volunteer translators can contribute translations.

The obvious direction to go for this would be to wire things up to Transifex, which is what we use for zulip-mobile and for Zulip web, desktop, and server. But… the format the Dart ecosystem supports for internationalized messages is ARB, and Transifex does not support ARB.

If we were determined to stick with Transifex, we could build tooling to work around that — ARB files appear to be just JSON with some reasonable schema, so it shouldn't be hard to translate ARB to some other format and back. But we've independently been wanting to move off Transifex, to a more open platform like Weblate. So probably this will involve moving to a new service.

TBD how to handle that from a project-management perspective. Some thoughts:

  • The end state should be that the whole Zulip project is using a single translation service, be that Weblate or something else. We should avoid dragging on for a long period (like many months) on two services, or migrating and then finding ourselves migrating again — those are likely to be a burden on our translation contributors.

  • Translating zulip-flutter may not need to block on migrating the whole Zulip project, though. It might instead serve as the pilot, followed by migrating the rest of the project. We'll just want, when we commit to a service for zulip-flutter, to be confident that we will then be able to migrate the rest of the project there without too much further fuss.

  • So in particular before we broadly ask our translators to go start translating on a new service, we'll want to have poked around both to understand exactly how we want it set up for zulip-flutter, and also to understand the setup we'll want for other parts of the project at least well enough to convince ourselves that there won't be any dealbreakers later.

@gnprice gnprice added a-i18n Translation, localization, internationalization a-tools Our own development tooling, scripts, and infrastructure labels Aug 17, 2023
@gnprice gnprice added this to the Launch milestone Aug 17, 2023
gnprice added a commit to Khader-1/zulip-flutter that referenced this issue Jun 7, 2024
Before launch, in order to manage contributions from many people
for translations into many languages, we'll wire things up to
an appropriate platform: zulip#276.  For now, though, we have just this
one partial translation into Japanese, as an end-to-end demo of the
i18n setup within the app, and we maintain it directly in the repo.
Update that translation to reflect this rename.
@gnprice
Copy link
Member Author

gnprice commented Jul 6, 2024

One quirk in Dart's package:intl which we might have to handle when we go to implement this issue: for number/plural forms, the package expects forms named =1 and =0 when it actually means the behaviors whose standard names are one and zero. See:

So it's likely that Transifex or whatever other platform we use will emit one and zero forms, and we'll have to write a bit of code to translate them to =1 and =0 as part of the process of syncing them down from there into our repo.

See also related chat thread.

@gnprice gnprice modified the milestones: M5: Launch, M4: Wider beta Nov 21, 2024
gnprice added a commit to gnprice/zulip-flutter that referenced this issue Dec 11, 2024
Fixes most of zulip#276.  (The remaining work is to have this process
a bit more automated; that's in progress.)  Thanks to Alex for
doing the bulk of the actual work of setting this up.

The steps to produce this were those in the current version
of .github/workflows/update-translations.yml :

    git remote add weblate https://hosted.weblate.org/git/zulip/zulip-flutter/
    git fetch weblate
    git merge --ff-only weblate/main

plus:

    tools/check l10n --fix
    git add lib/generated/l10n/
    git commit --amend

Trying the app out, it seems to work great.  If I switch my system
language setting to Polish, I see the new Polish translations.

Co-authored-by: Alex Vandiver <[email protected]>
shivanshsharma13 pushed a commit to shivanshsharma13/zulip-flutter that referenced this issue Dec 13, 2024
Fixes most of zulip#276.  (The remaining work is to have this process
a bit more automated; that's in progress.)  Thanks to Alex for
doing the bulk of the actual work of setting this up.

The steps to produce this were those in the current version
of .github/workflows/update-translations.yml :

    git remote add weblate https://hosted.weblate.org/git/zulip/zulip-flutter/
    git fetch weblate
    git merge --ff-only weblate/main

plus:

    tools/check l10n --fix
    git add lib/generated/l10n/
    git commit --amend

Trying the app out, it seems to work great.  If I switch my system
language setting to Polish, I see the new Polish translations.

Co-authored-by: Alex Vandiver <[email protected]>
@gnprice gnprice modified the milestones: M5: Launch, M5-a: Server 10 Jan 14, 2025
gnprice added a commit that referenced this issue Feb 8, 2025
I forgot to do this before today's v0.0.26, oops.

The process is only semi-automated at this point (see #276).  It
was fresher in mind as of the last couple of releases, but I didn't
think of it today.  That's what a checklist is for; add it there.
github-actions bot pushed a commit that referenced this issue Feb 12, 2025
I forgot to do this before today's v0.0.26, oops.

The process is only semi-automated at this point (see #276).  It
was fresher in mind as of the last couple of releases, but I didn't
think of it today.  That's what a checklist is for; add it there.
@gnprice
Copy link
Member Author

gnprice commented Mar 26, 2025

Current status:

  • We have a working setup on Weblate (thanks @alexmv!): https://hosted.weblate.org/projects/zulip/zulip-flutter/ . In fact the integration is smoother than it was with Transifex:

    • Weblate picks up source strings automatically as soon as we push to the main branch;
    • for syncing the resulting translations back into the app, we have a GitHub action which automatically makes a PR each week and can also be triggered manually.

    There are a couple of follow-up improvements I'd like to make, but those can be tracked separately.

  • We don't yet have the majority of Zulip's community of translation contributors active in Weblate.

    The main ingredient in making this happen will be that we're planning to migrate to Weblate for the Zulip server and web/desktop app too, and when we do that we'll make an announcement to ask people to join us on Weblate.

    That task is outside the work of the mobile team; but it's important that it happens before the new mobile app is launched (and at least a few weeks before, so that people have time to translate). I'm therefore keeping this issue open in order to track that dependency in our project board.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
a-i18n Translation, localization, internationalization a-tools Our own development tooling, scripts, and infrastructure
Projects
Status: No status
Development

No branches or pull requests

1 participant