main
Last change
on this file was
42bd667,
checked in by David Fuertes <dfuertes@…>, 4 years ago
|
Historial Limpio
|
-
Property mode set to
100755
|
File size:
778 bytes
|
Line | |
---|
1 | #!/usr/bin/env python |
---|
2 | # -*- coding: utf8 -*- |
---|
3 | # Plural-Forms for uk (Ukrainian) |
---|
4 | |
---|
5 | nplurals=3 # Ukrainian language has 3 forms: |
---|
6 | # 1 singular and 2 plurals |
---|
7 | |
---|
8 | # Determine plural_id for number *n* as sequence of positive |
---|
9 | # integers: 0,1,... |
---|
10 | # NOTE! For singular form ALWAYS return plural_id = 0 |
---|
11 | get_plural_id = lambda n: (0 if n % 10 == 1 and n % 100 != 11 else |
---|
12 | 1 if n % 10 >= 2 and n % 10 <= 4 and |
---|
13 | (n % 100 < 10 or n % 100 >= 20) else |
---|
14 | 2) |
---|
15 | |
---|
16 | # construct_plural_form() is not used now because of complex |
---|
17 | # rules of Ukrainian language. Default version of |
---|
18 | # this function is used to simple insert new words into |
---|
19 | # plural_dict dictionary) |
---|
20 | # construct_plural_form = lambda word, plural_id: word |
---|
21 | |
---|
Note: See
TracBrowser
for help on using the repository browser.