Opened 8 years ago

Closed 8 years ago

Last modified 3 years ago

#3987 closed enhancement (fixed)

Google Android’s format is natively supported in Transifex

Reported by: runa Owned by: runa
Priority: Medium Milestone:
Component: Community/Translations Version:
Severity: Keywords:
Cc: n8fr8 Actual Points:
Parent ID: Points:
Reviewer: Sponsor:

Description

Google Android’s format, .xml, is natively supported in Transifex. This means that we can drop the .po files and the po2xml script.

Child Tickets

Change History (8)

comment:1 Changed 8 years ago by runa

Cc: n8fr8 added

comment:2 Changed 8 years ago by n8fr8

Owner: changed from runa to n8fr8
Status: newassigned

Great news!

comment:3 Changed 8 years ago by runa

Owner: changed from n8fr8 to runa

I'll take care of switching from .po to .xml on the Transifex server. And I'll drop you an email explaining how it all works.

comment:4 Changed 8 years ago by runa

I have created a new translation resource for strings.xml on Transifex. Pushing and pulling translations works just fine, but there is a catch: when you pull translated files that are .xml, you get everything. You get files that are 100% translated, files that are 89% translated, and files that are 2% translated. As far as I know, you cannot pull only files that are 100% translated.

You have the same issue when you pull translations as .po files, but the po2xml script takes care of the problem for you. The script will only convert a translation from .po to .xml if 80% or more has been translated. If 90% of the file has been translated into Norwegian, po2xml will write a .xml file that is 90% Norwegian and 10% English, keeping the file intact and ready to ship.

So, Nathan, how do you want to do this? Do you want to pull .xml files directly and use them as they are (meaning you can end up shipping incomplete menus for various languages), or do you want to stick with the .po files and let the po2xml script handle the rest?

And oh, it's perfectly fine to say "I'm not sure, do whatever you want". In that case, I'll stick with the .po files and use the po2xml script. It's just nicer that way.

comment:5 Changed 8 years ago by n8fr8

That is actually fine, in that Android doesn't mind if an .xml for a specific locale only has 20% of the strings in it. It will use what it has, and then fallback to the default locale, aka en-US. This is probably why it is behaving this way.

Exciting!

comment:6 in reply to:  5 Changed 8 years ago by runa

Replying to n8fr8:

That is actually fine, in that Android doesn't mind if an .xml for a specific locale only has 20% of the strings in it. It will use what it has, and then fallback to the default locale, aka en-US. This is probably why it is behaving this way.

Exciting!

Ah, great! I'm just waiting for a personal orbot repository, then I'll set things up.

comment:7 Changed 8 years ago by runa

Resolution: fixed
Status: assignedclosed

Fixed, just waiting for n8fr8 to fetch the changes from my personal repository. The new Orbot page on Transifex is https://www.transifex.net/projects/p/torproject/resource/3-orbot-strings-xml/. Whenever n8fr8 updates the English xml file, Transifex will update the translations automatically.

comment:8 Changed 3 years ago by isabela

Component: User Experience/TranslationsCommunity/Translations
Note: See TracTickets for help on using tickets.