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

Remove quantity="zero" from English strings #5255

Merged
merged 2 commits into from
Dec 5, 2023

Conversation

amire80
Copy link
Contributor

@amire80 amire80 commented Dec 3, 2023

The "zero" quantity is not used in English. This has no effect on the app, but on translatewiki, where Oppia is localized, it is flagged as an error by the validator.

The "zero" quantity is not used in English. This has no effect on the app, but on translatewiki, where Oppia is localized, it is flagged as an error by the validator.
@amire80 amire80 requested a review from a team as a code owner December 3, 2023 04:12
@amire80 amire80 requested a review from adhiamboperes December 3, 2023 04:12
Copy link
Collaborator

@adhiamboperes adhiamboperes left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @amire80,

Could you please specify the translate wiki validation error? Possibly by sharing a screenshot.

We introduced zero since per docs, it is handled differently in languages such as Arabic.

A more complete solution here would be to remove the plurals from english but ensure it is in the arabic file. It is my undersstanding that translations rely on what is in the english file as a base.

It is also part of our acceptance criteria to include screenshots that show user facing changes like this, and incase you don't have the project set up to do this verification, I suggest that you convert this to an issue instead, and one of our contributors will work on it.

@amire80
Copy link
Contributor Author

amire80 commented Dec 4, 2023

Thanks @amire80,

Could you please specify the translate wiki validation error? Possibly by sharing a screenshot.

You can see, for example, here:
https://translatewiki.net/wiki/Special:LanguageStats?language=en&suppresscomplete=1&group=mediawiki&x=D

It's a list of projects with untranslated messages into English (note the "en" code at the top). Naturally, all the messages are "translated" into English, because English is the source language for everything, but "Oppia Android" is the only project in the list with three "untranslated" messages because if messages have any validation errors, they are considered "untransated".

We introduced zero since per docs, it is handled differently in languages such as Arabic.

"zero" is indeed necessary in Arabic. (I'm also quite happy to say that the specific case of Arabic plural forms is very well-documented in translatewiki: https://translatewiki.net/wiki/Localisation_guidelines/ar . There used to be issues with Arabic translations, but a year ago, I attended an international conference in Dubai about the Arabic language in our projects, and I worked with native Arabic speakers and experienced translators to address them all and write comprehensive documentation to avoid future issues.)

However, while "zero" is necessary in Arabic, it is not necessary in English. In fact, it has no effect in English at all (except producing validation errors in translatewiki). The plural support in Android is based on the CLDR, which defines only "one" and "other" for English, but zero, one, two, few, many, and other for Arabic. Other languages have different sets of forms. You can see the list for all the languages here: https://www.unicode.org/cldr/charts/44/supplemental/language_plural_rules.html .

A more complete solution here would be to remove the plurals from english but ensure it is in the arabic file. It is my undersstanding that translations rely on what is in the english file as a base.

This is the correct thinking, and I'm glad to say that this is already ensured by the same validator in translatewiki. It sees unsupported "zero" forms in English, and marks the messages as "untranslated", and it applies the same logic to Arabic: if a translator tries to publish a translation without "zero" or "two", an error will be shown. The first two messages are already correctly translated into Arabic with all the forms:

The third message (minutes_ago) is not yet translated into Arabic. A volunteer should do it, and if they omit any forms, they'll see a validation error. Here's a link to this particular message:

And here's a link to all the messages untranslated into Arabic, because why not:

It is also part of our acceptance criteria to include screenshots that show user facing changes like this, and incase you don't have the project set up to do this verification, I suggest that you convert this to an issue instead, and one of our contributors will work on it.

Sorry, I don't have a whole development environment for that. I made similar patches in a bunch of other projects (e.g. OpenStreetMap), and they were always accepted. If you insist, I'll make an issue, but I'm quite sure that the eventual patch by someone else will be the same :)

Copy link
Collaborator

@adhiamboperes adhiamboperes left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @amire80, this looks good.

@adhiamboperes adhiamboperes enabled auto-merge (squash) December 5, 2023 20:22
@adhiamboperes adhiamboperes merged commit 697aeb2 into oppia:develop Dec 5, 2023
36 checks passed
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.

2 participants