Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add missing languages to locales_config.xml #3583

Closed
wants to merge 4 commits into from
Closed

Add missing languages to locales_config.xml #3583

wants to merge 4 commits into from

Conversation

nikclayton
Copy link
Contributor

@nikclayton nikclayton commented Apr 27, 2023

  • Update the language names, where necessary, with the language names from the icu4j v73.1 data
  • Sort the list of language names using the ICU collator

This makes some baseline lint errors obsolete, remove them.

This makes some baseline lint errors obsolete, remove them.
@connyduck
Copy link
Collaborator

Some are deliberatly missing from this list because they are imcomplete, e.g. ber hasn't even 10% of all strings translated.
Not sure what is a good value to make the cutoff though? Maybe 50%?

@nikclayton
Copy link
Contributor Author

Why have the cutoff at all? E.g., with "ber", if I've read the docs correctly and the user's device has that set as the language then Tusky will use those translated strings, even if it's just 10%, falling back to English for the untranslated ones.

The XML file controls https://developer.android.com/guide/topics/resources/app-languages#use-localeconfig, so users can set a different language from the device language if they want.

There's also a possible argument that user seeing an incomplete translation is also incentivised to join the translation project to improve things.

@connyduck
Copy link
Collaborator

Well I don't like Apps that present me half baked translations, but I guess thats me.

If you want to go forward with all, the lists in donottranslate.xml need to be updated as well.

@nikclayton
Copy link
Contributor Author

Yeah, unfortunately Weblate doesn't let you set a threshold of minimum number or percentage of translated strings before pushing (WeblateOrg/weblate#3436).

@nikclayton nikclayton marked this pull request as draft May 2, 2023 09:49
@nikclayton
Copy link
Contributor Author

Flipped to draft, I'm unsure how to represent the name of the Berber languages, I've contacted the person who's done the translation for advice.

@nikclayton
Copy link
Contributor Author

Also, I'm not sure yet of the best practices for representing a sorted list of languages when some of those languages are written in different scripts.

@Lakoja
Copy link
Collaborator

Lakoja commented May 2, 2023

Also, I'm not sure yet of the best practices for representing a sorted list of languages when some of those languages are written in different scripts.

How about using their script name as first part and English as a second part in brackets?
And sort by English. (Except the default one and frequently used at the top.)

- Add language entry for Berber
- Update the language names, where necessary, with the language names from the icu4j v73.1 data
- Sort the list of language names using the ICU collator
@nikclayton
Copy link
Contributor Author

How about using their script name as first part and English as a second part in brackets? And sort by English. (Except the default one and frequently used at the top.)

I did some more research, and decided that using the ICU collation code makes the most sense.

Ideally this would happen on the device, but some of the necessary features aren't present until the Q release, so a fixed order is the best we can do at the moment.

The ordering here is using the ICU collation order, after case folding each entry. This appears to match the order that they appear in the Android System language chooser as well.

I didn't do this by hand, I wrote a tool to do that. I'll be preparing a separate PR with that, so that in the future this can be generted automatically at build time

@nikclayton nikclayton marked this pull request as ready for review May 4, 2023 12:48
@nikclayton nikclayton requested review from Tak, mcclure, DavidEdwards and Lakoja and removed request for connyduck August 22, 2023 20:32
@nikclayton nikclayton closed this by deleting the head repository Aug 27, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants