element-hq / element-x-ios

Next generation Matrix client for iOS built with SwiftUI on top of matrix-rust-sdk.
https://element.io/labs/element-x
GNU Affero General Public License v3.0
423 stars 101 forks source link

Define new localization flows #124

Closed stefanceriu closed 1 year ago

stefanceriu commented 2 years ago

Now that we're reusing Android strings we need to define the flow for contributing back iOS specific ones.

One approach would be to create a separate Everything Mobile project and weblate and copy over actually used strings. This would help with cleaning up existing android strings.

Another approach would be to split it up in 2 different Android weblate projects and have each client use a separate one. We would benefit from the existing Android strings but we won't have a hard dependency on them anymore.

stefanceriu commented 1 year ago

While looking into a conversion error on our android importing script I ran accross this https://docs.weblate.org/en/latest/faq.html#how-to-translate-multi-platform-projects

It seems that we can have multi-platform projects on weblate and move away from custom conversion scripts. We'll need a new project to test this out but definitely worth a shot.

pixlwave commented 1 year ago

I've looked into using Weblate, Localazy, Phrase Strings and Lokalise:

Weblate

Localazy

Phrase Strings

Lokalise

manuroe commented 1 year ago

@bmarty what do you think about Localazy for Android?

bmarty commented 1 year ago

https://poeditor.com/ is another possible option.

Some thoughts:

manuroe commented 1 year ago

Thanks @bmarty.

poeditor has been mentioned. @pixlwave did you have a look at it?

Hosting the string on an external server and get them at runtime seems a bit scary

This is out of scope. Let's make it work first before trying to optimise app size by lazy loading internalisation. If we go there at some point, we will need to check privacy concerns involved by this technique. Even using element.io to store the strings is not great.

pixlwave commented 1 year ago

I originally dismissed poeditor as it doesn't support an iOS stringsdict directly (instead needing you to go through some kind of import dance with XLIFF files if you want plurals). I'm happy to try out the demo and see what that would mean for us in practice if you want? I see its free for OSS projects which would be a big win if it works for us.

If we go there at some point

That whole idea makes me really nervous, don't think I'd be keen to do it based on any platform.

pixlwave commented 1 year ago

POEditor

manuroe commented 1 year ago

We are using localazy now. See the doc.