Skip to content

Fixed-Zero quantity in messages doesn't work in English #4057

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

Merged
merged 1 commit into from
Dec 1, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -207,9 +207,11 @@ public void showTabs() {
*/
public void setNumOfUploads(int uploadCount) {
if (activeFragment == ActiveFragment.CONTRIBUTIONS) {
setTitle(getResources().getString(R.string.contributions_fragment) +" "+ getResources()
setTitle(getResources().getString(R.string.contributions_fragment) +" "+ (
!(uploadCount == 0) ?
getResources()
.getQuantityString(R.plurals.contributions_subtitle,
uploadCount, uploadCount));
uploadCount, uploadCount):getString(R.string.contributions_subtitle_zero)));
}
}

Expand Down
4 changes: 1 addition & 3 deletions app/src/main/res/values/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,6 @@
<item quantity="other">%1$d files uploading</item>
</plurals>
<plurals name="contributions_subtitle">
<!--zero is not used in english. Category mentioned here for easy reference in future-->
<item quantity="zero">@string/contributions_subtitle_zero</item>
<item quantity="one">(%1$d)</item>
<item quantity="other">(%1$d)</item>
</plurals>
Expand Down Expand Up @@ -98,7 +96,7 @@
<string name="display_list_button">List</string>
<string name="gps_disabled">GPS is disabled in your device. Would you like to enable it?</string>
<string name="enable_gps">Enable GPS</string>
<string name="contributions_subtitle_zero">No uploads yet</string>
<string name="contributions_subtitle_zero">(No uploads yet)</string>
<string name="categories_not_found">No categories matching %1$s found</string>
<string name="depictions_not_found">No Wikidata items matching %1$s found</string>
<string name="no_child_classes">%1$s has no child classes</string>
Expand Down