element-hq / riot-android

A glossy Matrix collaboration client for Android
Apache License 2.0
1.4k stars 394 forks source link

translate inteface to pl #759

Closed ghost closed 5 years ago

ghost commented 7 years ago

Hello I installed riot yesterday and Im impressed by this communicator. God job. I have only one note. It would be more effective if there were transaltor for other languages for ex. polish. I can treansalte such interface but I ony need to know which file is related.

ylecollen commented 7 years ago

our strings are in the resource files. vector-android/vector/src/main/res/values/strings.xml

jpfox commented 7 years ago

what is the method to add a new language in this file ? I'm ready to add french support Thanks

ghost commented 7 years ago

hello As I understand correctly to add translation we need to add resource in proper language and change strings. My file strings.xml with translation to polish english is under address https://github.com/bartekn80/vector-android/blob/master/vector/src/main/res/values/strings.xml. Ylecollen thanks for your reply. Is there possibilty to check translation on the mobile phone after replacing original file. Id like to test it.

jpfox commented 7 years ago

this file strings.xml does not seem to have a structure permitting to contain several language ?

@ylecollen : have you a sample with multiple languages ?

ylecollen commented 7 years ago

You need to create a the same xml file. The differences will be on project structure.

maxlinux2000 commented 7 years ago

...but we need to create a new dropdown selector in the Settings panel were the user can select the language. But the first step, can be automactly select the language using the Locale of phone. If a user is using French in his phone, is probable that will choose French in Riot.

ylecollen commented 7 years ago

The application should use the device locale (and english by default).

mytbk commented 7 years ago

I made an attempt on translating to Chinese: https://github.com/mytbk/riot-android/commit/3927027b22e38bebccb0fae442ae1e3649573c51

It works and I can see my translation. However, there are many strings and it's not easy to maintain. I hope the Riot people can create a project on Transifex or Zanata.

TheLastProject commented 7 years ago

I'll pitch in on this issue as it has the most replies:

For what it's worth, if a web translation system is chosen (which I can very much recommend as it is very helpful getting non-technical people on board), I would like to suggest Weblate. It's a FOSS translation system that integrates nicely with GitHub, offering both a free hosting plan for Open Source projects (although Matrix may be big for them) and allows to be self-hosted. I set it up back when AsteroidOS got i18n support and it serves us quite well.

ara4n commented 7 years ago

yup, everyone seems to rate Weblate. @bartekn80 and @mytbk - are your translations available as PRs to strings.xml? If so, we'll merge them and then manage them with Weblate.

mytbk commented 7 years ago

Oh. I'll sort out my translation now, it's a little bit out of date. Also, I don't know if array.xml is really needed.