Skip to content

Instantly share code, notes, and snippets.

@CoMatu
Created October 26, 2021 06:11
Show Gist options
  • Select an option

  • Save CoMatu/154b42ace0d1592a938df0d7a2a21852 to your computer and use it in GitHub Desktop.

Select an option

Save CoMatu/154b42ace0d1592a938df0d7a2a21852 to your computer and use it in GitHub Desktop.
Множественная форма существительного
String projectsCount(int number) => number < 20
? "singularProject".trPluralParams(
number > 1 && number < 5 ? "someProject" : "pluralProject",
number,
{"number": number.toString()},
)
: "singularProject".trPluralParams(
number % 10 > 1 && number % 10 < 5 ? "someProject" : "pluralProject",
number,
{"number": number.toString()},
);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment