amugofjava / anytime_podcast_player

Simple, easy to use Podcast player app written in Flutter and Dart.
BSD 3-Clause "New" or "Revised" License
376 stars 99 forks source link

Use Weblate for translations management #96

Open Chralu opened 1 year ago

Chralu commented 1 year ago

Describe the solution you'd like Translations management is tricky and many issues can occur.

I just gave a try to https://weblate.org, and I think it could be a huge help for translations management.

To me, the interesting features are :

@amugofjava If that's alright to you, I can setup a Weblate project to give it a try.

amugofjava commented 1 year ago

Hi @Chralu,

I agree that translation management is tricky and Anytime relies on a fork of the original intl_translation package, but there is method in the madness.

By default, Anytimes uses the LocalisationsDelegate class to load localisations, but there is also an EmbeddedLocalisationsDelegate that allow specific translations for specific locales to be overridden. The idea here is that this allows third-parties who may wish to use Anytime as the basis of or within their own app to change translated strings. An example of this is the Breez app that takes Anytime as the basis of their own podcast player within their app.

I'm very happy to consider other solutions that will make translations easier, but we would need to maintain this override functionality. :+1:

Chralu commented 1 year ago

That's an interesting point indeed !

According to my tests, Weblate only updates *.arb files. So LocalizationDelegate generation remains the build pipeline responsability.

To be further tested...