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

Fix an error in string resource (#4997) #4999

Merged
merged 1 commit into from
Jan 20, 2022
Merged

Conversation

bmarty
Copy link
Member

@bmarty bmarty commented Jan 19, 2022

Fixes #4997

@bmarty bmarty requested a review from onurays January 19, 2022 20:40
@github-actions
Copy link

Unit Test Results

  68 files  ±0    68 suites  ±0   47s ⏱️ -7s
136 tests ±0  136 ✔️ ±0  0 💤 ±0  0 ±0 
420 runs  ±0  420 ✔️ ±0  0 💤 ±0  0 ±0 

Results for commit 953f34f. ± Comparison against base commit 491044b.

@github-actions
Copy link

Matrix SDK

Integration Tests Results:

  • [org.matrix.android.sdk.session]
    passed="21" failures="0" errors="0" skipped="2"
  • [org.matrix.android.sdk.account]
    passed="5" failures="0" errors="0" skipped="2"
  • [org.matrix.android.sdk.internal]
    passed="158" failures="12" errors="0" skipped="38"
  • [org.matrix.android.sdk.ordering]
    passed="16" failures="0" errors="0" skipped="0"
  • [org.matrix.android.sdk.PermalinkParserTest]
    passed="2" failures="0" errors="0" skipped="0"

@ouchadam
Copy link
Contributor

I'm a little confused by the issue of using zero, does weblate not support unique plurals per locale?

Copy link
Contributor

@onurays onurays left a comment

Choose a reason for hiding this comment

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

Surprised and lgtm!

@bmarty
Copy link
Member Author

bmarty commented Jan 20, 2022

I'm a little confused by the issue of using zero, does weblate not support unique plurals per locale?

Using zero for English language is not correct, see https://developer.android.com/guide/topics/resources/string-resource#Plurals:

In English, a string for zero is ignored even if the quantity is 0, because 0 isn't grammatically different from 2, or any other number except 1 ("zero books", "one book", "two books", and so on)

On some other language, zero can have specific plural form. So If we want to special case zero in English (and so in all the languages), we have to do it manually like on this PR.

Other languages may need to define zero for the plural poll_total_vote_count_before_ended_and_not_voted to be correct regarding the plural form, but in the fact, this translation will never be used in that case.

@bmarty bmarty merged commit c40fc52 into develop Jan 20, 2022
@bmarty bmarty deleted the feature/bma/zero_vote branch January 20, 2022 09:38
@ouchadam
Copy link
Contributor

ouchadam commented Jan 20, 2022

💯 ahhh it's an empty case rather than 0 specific plural

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.

Missing plurals in localization
3 participants