File tree Expand file tree Collapse file tree 1 file changed +2
-20
lines changed
Orange/widgets/utils/localization Expand file tree Collapse file tree 1 file changed +2
-20
lines changed Original file line number Diff line number Diff line change 1- def pl (n : int , forms : str ) -> str : # pylint: disable=invalid-name
2- """
3- Choose a singular/plural form for English - or create one, for regular nouns
1+ from orangecanvas .utils .localization import pl
42
5- `forms` can be a string containing the singular and plural form, separated
6- by "|", for instance `"dictionary|dictionaries".
7-
8- IF `forms` does not contain character |, plural is formed by appending
9- an 's'.
10-
11- Args:
12- n: number
13- forms: plural forms, separated by "|", or a single (regular) noun
14-
15- Returns:
16- form corresponding to the given number
17- """
18- if "|" in forms :
19- return forms .split ("|" )[n != 1 ]
20- else :
21- return forms + "s" * (n != 1 )
3+ __all__ = ['pl' ]
You can’t perform that action at this time.
0 commit comments