HomePhabricator
Diffusion Comm a957585273d5

[native] Generalize pluralize function

Description

[native] Generalize pluralize function

Test Plan:
All the current usages shouldn't be affected.
To verify it, I created a simple script which invoked this function with different parameters.
First number is a number of strings, second is maxNumberOfNouns:
1 1 user1
1 2 user1
1 3 user1
1 4 user1
1 5 user1
2 1 2 users
2 2 user1 and user2
2 3 user1 and user2
2 4 user1 and user2
2 5 user1 and user2
3 1 3 users
3 2 user1 and 2 others
3 3 user1, user2, and user3
3 4 user1, user2, and user3
3 5 user1, user2, and user3
4 1 4 users
4 2 user1 and 3 others
4 3 user1, user2, and 2 others
4 4 user1, user2, user3, and user4
4 5 user1, user2, user3, and user4
5 1 5 users
5 2 user1 and 4 others
5 3 user1, user2, and 3 others
5 4 user1, user2, user3, and 2 others
5 5 user1, user2, user3, user4, and user5

Reviewers: ashoat

Reviewed By: ashoat

Subscribers: KatPo, zrebcu411, Adrian, atul, subnub, karol-bisztyga

Differential Revision: https://phabricator.ashoat.com/D701

Details

Provenance
tomekAuthored on Feb 5 2021, 5:31 AM
Reviewer
ashoat
Differential Revision
Restricted Differential Revision
Parents
rCOMM6432699fb238: Show processingStep in multimedia progress indicator
Branches
Unknown
Tags
Unknown

Event Timeline