zulip / zulip-flutter

Future Zulip client using Flutter
Apache License 2.0
159 stars 131 forks source link

Wire up to a platform for contributing translations #276

Open gnprice opened 1 year ago

gnprice commented 1 year ago

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:

gnprice commented 2 months ago

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.