added missing files from Vladyslav
This commit is contained in:
@@ -1 +1 @@
|
||||
Version 2.00.0 (2012-07-18 12:45:12) dev
|
||||
Version 2.00.0 (2012-07-18 12:48:05) dev
|
||||
|
||||
@@ -0,0 +1,5 @@
|
||||
#!/usr/bin/env python
|
||||
{
|
||||
# "singular form (0)": ["first plural form (1)", "second plural form (2)", ...],
|
||||
'file': ['files'],
|
||||
}
|
||||
@@ -0,0 +1,5 @@
|
||||
#!/usr/bin/env python
|
||||
{
|
||||
# "singular form (0)": ["first plural form (1)", "second plural form (2)", ...],
|
||||
'файл': ['файла','файлов'],
|
||||
}
|
||||
@@ -0,0 +1,5 @@
|
||||
#!/usr/bin/env python
|
||||
{
|
||||
# "singular form (0)": ["first plural form (1)", "second plural form (2)", ...],
|
||||
'файл': ['файли','файлів'],
|
||||
}
|
||||
@@ -0,0 +1,40 @@
|
||||
#!/usr/bin/python
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
# This is an app-specific example router
|
||||
#
|
||||
# This simple router is used for setting languages from app/languages directory
|
||||
# as a part of the application path: app/<lang>/controller/function
|
||||
# Language from default.py or 'en' (if the file is not found) is used as
|
||||
# a default_language
|
||||
#
|
||||
# See <web2py-root-dir>/router.example.py for parameter's detail
|
||||
#-------------------------------------------------------------------------------------
|
||||
# To enable this route file you must do the steps:
|
||||
#
|
||||
# 1. rename <web2py-root-dir>/router.example.py to routes.py
|
||||
# 2. rename this APP/routes.example.py to APP/routes.py
|
||||
# (where APP - is your application directory)
|
||||
# 3. restart web2py (or reload routes in web2py admin interfase)
|
||||
#
|
||||
# YOU CAN COPY THIS FILE TO ANY APLLICATION'S ROOT DIRECTORY WITHOUT CHANGES!
|
||||
|
||||
from fileutils import abspath
|
||||
from languages import read_possible_languages
|
||||
|
||||
possible_languages = read_possible_languages(abspath('applications', app))
|
||||
#NOTE! app - is an application based router's parameter with name of an
|
||||
# application. E.g.'welcome'
|
||||
|
||||
routers = {
|
||||
app: dict(
|
||||
default_language = possible_languages['default'][0],
|
||||
languages = [lang for lang in possible_languages
|
||||
if lang != 'default']
|
||||
)
|
||||
}
|
||||
|
||||
#NOTE! To change language in your application using these rules add this line
|
||||
#in one of your models files:
|
||||
# if request.uri_language: T.force(request.uri_language)
|
||||
|
||||
@@ -0,0 +1,17 @@
|
||||
#!/usr/bin/env python
|
||||
# -*- coding: utf8 -*-
|
||||
# Plural-Forms for af (Afrikaans (South Africa))
|
||||
|
||||
nplurals=2 # Afrikaans language has 2 forms:
|
||||
# 1 singular and 1 plural
|
||||
|
||||
# Determine plural_id for number *n* as sequence of positive
|
||||
# integers: 0,1,...
|
||||
# NOTE! For singular form ALWAYS return plural_id = 0
|
||||
get_plural_id = lambda n: int(n != 1)
|
||||
|
||||
# Construct and return plural form of *word* using
|
||||
# *plural_id* (which ALWAYS>0). This function will be executed
|
||||
# for words (or phrases) not found in plural_dict dictionary
|
||||
# construct_plural_form = lambda word, plural_id: (word + 'suffix')
|
||||
|
||||
@@ -0,0 +1,17 @@
|
||||
#!/usr/bin/env python
|
||||
# -*- coding: utf8 -*-
|
||||
# Plural-Forms for bg (Bulgarian)
|
||||
|
||||
nplurals=2 # Bulgarian language has 2 forms:
|
||||
# 1 singular and 1 plural
|
||||
|
||||
# Determine plural_id for number *n* as sequence of positive
|
||||
# integers: 0,1,...
|
||||
# NOTE! For singular form ALWAYS return plural_id = 0
|
||||
get_plural_id = lambda n: int(n != 1)
|
||||
|
||||
# Construct and return plural form of *word* using
|
||||
# *plural_id* (which ALWAYS>0). This function will be executed
|
||||
# for words (or phrases) not found in plural_dict dictionary
|
||||
# construct_plural_form = lambda word, plural_id: (word + 'suffix')
|
||||
|
||||
@@ -0,0 +1,19 @@
|
||||
#!/usr/bin/env python
|
||||
# -*- coding: utf8 -*-
|
||||
# Plural-Forms for cs (Czech)
|
||||
|
||||
nplurals=3 # Czech language has 3 forms:
|
||||
# 1 singular and 2 plurals
|
||||
|
||||
# Determine plural_id for number *n* as sequence of positive
|
||||
# integers: 0,1,...
|
||||
# NOTE! For singular form ALWAYS return plural_id = 0
|
||||
get_plural_id = lambda n: ( 0 if n==1 else
|
||||
1 if 2<=n<=4 else
|
||||
2 )
|
||||
|
||||
# Construct and return plural form of *word* using
|
||||
# *plural_id* (which ALWAYS>0). This function will be executed
|
||||
# for words (or phrases) not found in plural_dict dictionary
|
||||
# construct_plural_form = lambda word, plural_id: (word + 'suffix')
|
||||
|
||||
@@ -0,0 +1,17 @@
|
||||
#!/usr/bin/env python
|
||||
# -*- coding: utf8 -*-
|
||||
# Plural-Forms for de (Deutsch)
|
||||
|
||||
nplurals=2 # German language has 2 forms:
|
||||
# 1 singular and 1 plural
|
||||
|
||||
# Determine plural_id for number *n* as sequence of positive
|
||||
# integers: 0,1,...
|
||||
# NOTE! For singular form ALWAYS return plural_id = 0
|
||||
get_plural_id = lambda n: int(n != 1)
|
||||
|
||||
# Construct and return plural form of *word* using
|
||||
# *plural_id* (which ALWAYS>0). This function will be executed
|
||||
# for words (or phrases) not found in plural_dict dictionary
|
||||
# construct_plural_form = lambda word, plural_id: (word + 'suffix')
|
||||
|
||||
@@ -0,0 +1,20 @@
|
||||
#!/usr/bin/env python
|
||||
# -*- coding: utf8 -*-
|
||||
# Plural-Forms for en (English)
|
||||
|
||||
nplurals=2 # English language has 2 forms:
|
||||
# 1 singular and 1 plural
|
||||
|
||||
# Determine plural_id for number *n* as sequence of positive
|
||||
# integers: 0,1,...
|
||||
# NOTE! For singular form ALWAYS return plural_id = 0
|
||||
get_plural_id = lambda n: int(n != 1)
|
||||
|
||||
# Construct and return plural form of *word* using
|
||||
# *plural_id* (which ALWAYS>0). This function will be executed
|
||||
# for words (or phrases) not found in plural_dict dictionary
|
||||
construct_plural_form = lambda word, plural_id: (word +
|
||||
('es' if word[-1:] in ('s','x','o') or
|
||||
word[-2:] in ('sh','ch')
|
||||
else 's'))
|
||||
|
||||
@@ -0,0 +1,17 @@
|
||||
#!/usr/bin/env python
|
||||
# -*- coding: utf8 -*-
|
||||
# Plural-Forms for es (Spanish)
|
||||
|
||||
nplurals=2 # Spanish language has 2 forms:
|
||||
# 1 singular and 1 plural
|
||||
|
||||
# Determine plural_id for number *n* as sequence of positive
|
||||
# integers: 0,1,...
|
||||
# NOTE! For singular form ALWAYS return plural_id = 0
|
||||
get_plural_id = lambda n: int(n != 1)
|
||||
|
||||
# Construct and return plural form of *word* using
|
||||
# *plural_id* (which ALWAYS>0). This function will be executed
|
||||
# for words (or phrases) not found in plural_dict dictionary
|
||||
# construct_plural_form = lambda word, plural_id: (word + 'suffix')
|
||||
|
||||
@@ -0,0 +1,17 @@
|
||||
#!/usr/bin/env python
|
||||
# -*- coding: utf8 -*-
|
||||
# Plural-Forms for fr (French))
|
||||
|
||||
nplurals=2 # French language has 2 forms:
|
||||
# 1 singular and 1 plural
|
||||
|
||||
# Determine plural_id for number *n* as sequence of positive
|
||||
# integers: 0,1,...
|
||||
# NOTE! For singular form ALWAYS return plural_id = 0
|
||||
get_plural_id = lambda n: int(n != 1)
|
||||
|
||||
# Construct and return plural form of *word* using
|
||||
# *plural_id* (which ALWAYS>0). This function will be executed
|
||||
# for words (or phrases) not found in plural_dict dictionary
|
||||
# construct_plural_form = lambda word, plural_id: (word + 'suffix')
|
||||
|
||||
@@ -0,0 +1,17 @@
|
||||
#!/usr/bin/env python
|
||||
# -*- coding: utf8 -*-
|
||||
# Plural-Forms for he (Hebrew)
|
||||
|
||||
nplurals=2 # Hebrew language has 2 forms:
|
||||
# 1 singular and 1 plural
|
||||
|
||||
# Determine plural_id for number *n* as sequence of positive
|
||||
# integers: 0,1,...
|
||||
# NOTE! For singular form ALWAYS return plural_id = 0
|
||||
get_plural_id = lambda n: int(n != 1)
|
||||
|
||||
# Construct and return plural form of *word* using
|
||||
# *plural_id* (which ALWAYS>0). This function will be executed
|
||||
# for words (or phrases) not found in plural_dict dictionary
|
||||
# construct_plural_form = lambda word, plural_id: (word + 'suffix')
|
||||
|
||||
@@ -0,0 +1,17 @@
|
||||
#!/usr/bin/env python
|
||||
# -*- coding: utf8 -*-
|
||||
# Plural-Forms for he (Hindi)
|
||||
|
||||
nplurals=2 # Hindi has 2 forms:
|
||||
# 1 singular and 1 plural
|
||||
|
||||
# Determine plural_id for number *n* as sequence of positive
|
||||
# integers: 0,1,...
|
||||
# NOTE! For singular form ALWAYS return plural_id = 0
|
||||
get_plural_id = lambda n: int(n != 1)
|
||||
|
||||
# Construct and return plural form of *word* using
|
||||
# *plural_id* (which ALWAYS>0). This function will be executed
|
||||
# for words (or phrases) not found in plural_dict dictionary
|
||||
# construct_plural_form = lambda word, plural_id: (word + 'suffix')
|
||||
|
||||
@@ -0,0 +1,17 @@
|
||||
#!/usr/bin/env python
|
||||
# -*- coding: utf8 -*-
|
||||
# Plural-Forms for hu (Hungarian)
|
||||
|
||||
nplurals=2 # Hungarian language has 2 forms:
|
||||
# 1 singular and 1 plural
|
||||
|
||||
# Determine plural_id for number *n* as sequence of positive
|
||||
# integers: 0,1,...
|
||||
# NOTE! For singular form ALWAYS return plural_id = 0
|
||||
get_plural_id = lambda n: int(n != 1)
|
||||
|
||||
# Construct and return plural form of *word* using
|
||||
# *plural_id* (which ALWAYS>0). This function will be executed
|
||||
# for words (or phrases) not found in plural_dict dictionary
|
||||
# construct_plural_form = lambda word, plural_id: (word + 'suffix')
|
||||
|
||||
@@ -0,0 +1,17 @@
|
||||
#!/usr/bin/env python
|
||||
# -*- coding: utf8 -*-
|
||||
# Plural-Forms for it (Italian)
|
||||
|
||||
nplurals=2 # Italian language has 2 forms:
|
||||
# 1 singular and 1 plural
|
||||
|
||||
# Determine plural_id for number *n* as sequence of positive
|
||||
# integers: 0,1,...
|
||||
# NOTE! For singular form ALWAYS return plural_id = 0
|
||||
get_plural_id = lambda n: int(n != 1)
|
||||
|
||||
# Construct and return plural form of *word* using
|
||||
# *plural_id* (which ALWAYS>0). This function will be executed
|
||||
# for words (or phrases) not found in plural_dict dictionary
|
||||
# construct_plural_form = lambda word, plural_id: (word + 'suffix')
|
||||
|
||||
@@ -0,0 +1,14 @@
|
||||
#!/usr/bin/env python
|
||||
# -*- coding: utf8 -*-
|
||||
# Plural-Forms for ja (Japanese)
|
||||
|
||||
nplurals=1 # Japanese language has ONE form!
|
||||
|
||||
# Always returns 0:
|
||||
get_plural_id = lambda n: 0
|
||||
|
||||
# Construct and return plural form of *word* using
|
||||
# *plural_id* (which ALWAYS>0). This function will be executed
|
||||
# for words (or phrases) not found in plural_dict dictionary
|
||||
# construct_plural_form = lambda word, plural_id: word
|
||||
|
||||
@@ -0,0 +1,19 @@
|
||||
#!/usr/bin/env python
|
||||
# -*- coding: utf8 -*-
|
||||
# Plural-Forms for lt (Lithuanian)
|
||||
|
||||
nplurals=3 # Lithuanian language has 3 forms:
|
||||
# 1 singular and 2 plurals
|
||||
|
||||
# Determine plural_id for number *n* as sequence of positive
|
||||
# integers: 0,1,...
|
||||
# NOTE! For singular form ALWAYS return plural_id = 0
|
||||
get_plural_id = lambda n: (0 if n % 10 == 1 and n % 100 != 11 else
|
||||
1 if n % 10 >= 2 and (n % 100 < 10 or n % 100 >= 20) else
|
||||
2)
|
||||
|
||||
# Construct and return plural form of *word* using
|
||||
# *plural_id* (which ALWAYS>0). This function will be executed
|
||||
# for words (or phrases) not found in plural_dict dictionary
|
||||
# construct_plural_form = lambda word, plural_id: (word + 'suffix')
|
||||
|
||||
@@ -0,0 +1,19 @@
|
||||
#!/usr/bin/env python
|
||||
# -*- coding: utf8 -*-
|
||||
# Plural-Forms for pl (Polish)
|
||||
|
||||
nplurals=3 # Polish language has 3 forms:
|
||||
# 1 singular and 2 plurals
|
||||
|
||||
# Determine plural_id for number *n* as sequence of positive
|
||||
# integers: 0,1,...
|
||||
# NOTE! For singular form ALWAYS return plural_id = 0
|
||||
get_plural_id = lambda n: (0 if n==1 else
|
||||
1 if 2<=n<=4 else
|
||||
2)
|
||||
|
||||
# Construct and return plural form of *word* using
|
||||
# *plural_id* (which ALWAYS>0). This function will be executed
|
||||
# for words (or phrases) not found in plural_dict dictionary
|
||||
# construct_plural_form = lambda word, plural_id: (word + 'suffix')
|
||||
|
||||
@@ -0,0 +1,17 @@
|
||||
#!/usr/bin/env python
|
||||
# -*- coding: utf8 -*-
|
||||
# Plural-Forms for pt (Portuguese)
|
||||
|
||||
nplurals=2 # Portuguese has 2 forms:
|
||||
# 1 singular and 1 plural
|
||||
|
||||
# Determine plural_id for number *n* as sequence of positive
|
||||
# integers: 0,1,...
|
||||
# NOTE! For singular form ALWAYS return plural_id = 0
|
||||
get_plural_id = lambda n: int(n != 1)
|
||||
|
||||
# Construct and return plural form of *word* using
|
||||
# *plural_id* (which ALWAYS>0). This function will be executed
|
||||
# for words (or phrases) not found in plural_dict dictionary
|
||||
# construct_plural_form = lambda word, plural_id: (word + 'suffix')
|
||||
|
||||
@@ -0,0 +1,17 @@
|
||||
#!/usr/bin/env python
|
||||
# -*- coding: utf8 -*-
|
||||
# Plural-Forms for ro (Romanian)
|
||||
|
||||
nplurals=2 # Romanian has 2 forms:
|
||||
# 1 singular and 1 plural
|
||||
|
||||
# Determine plural_id for number *n* as sequence of positive
|
||||
# integers: 0,1,...
|
||||
# NOTE! For singular form ALWAYS return plural_id = 0
|
||||
get_plural_id = lambda n: int(n != 1)
|
||||
|
||||
# Construct and return plural form of *word* using
|
||||
# *plural_id* (which ALWAYS>0). This function will be executed
|
||||
# for words (or phrases) not found in plural_dict dictionary
|
||||
# construct_plural_form = lambda word, plural_id: (word + 'suffix')
|
||||
|
||||
@@ -0,0 +1,20 @@
|
||||
#!/usr/bin/env python
|
||||
# -*- coding: utf8 -*-
|
||||
# Plural-Forms for ru (Russian)
|
||||
|
||||
nplurals=3 # Russian language has 3 forms:
|
||||
# 1 singular and 2 plurals
|
||||
|
||||
# Determine plural_id for number *n* as sequence of positive
|
||||
# integers: 0,1,...
|
||||
# NOTE! For singular form ALWAYS return plural_id = 0
|
||||
get_plural_id = lambda n: (0 if n % 10 == 1 and n % 100 != 11 else
|
||||
1 if n % 10 >= 2 and n % 10 <= 4 and
|
||||
(n % 100 < 10 or n % 100 >= 20) else
|
||||
2)
|
||||
|
||||
# construct_plural_form() is not used now because of complex
|
||||
# rules of Russian language. Default version of
|
||||
# this function is used to simple insert new words into
|
||||
# plural_dict dictionary)
|
||||
# construct_plural_form = lambda word, plural_id: word
|
||||
@@ -0,0 +1,20 @@
|
||||
#!/usr/bin/env python
|
||||
# -*- coding: utf8 -*-
|
||||
# Plural-Forms for sk (Slovak (Slovakia))
|
||||
|
||||
nplurals=3 # Slovak language has 3 forms:
|
||||
# 1 singular and 2 plurals
|
||||
|
||||
# Determine plural_id for number *n* as sequence of positive
|
||||
# integers: 0,1,...
|
||||
# NOTE! For singular form ALWAYS return plural_id = 0
|
||||
get_plural_id = lambda n: (0 if n % 10 == 1 and n % 100 != 11 else
|
||||
1 if n % 10 >= 2 and n % 10 <= 4 and
|
||||
(n % 100 < 10 or n % 100 >= 20) else
|
||||
2)
|
||||
|
||||
# construct_plural_form() is not used now because of complex
|
||||
# rules of Slovak language. Default version of this function
|
||||
# is used to simple insert new words into plural_dict dictionary)
|
||||
# construct_plural_form = lambda word, plural_id: word
|
||||
|
||||
@@ -0,0 +1,20 @@
|
||||
#!/usr/bin/env python
|
||||
# -*- coding: utf8 -*-
|
||||
# Plural-Forms for sl (Slovenian)
|
||||
|
||||
nplurals=4 # Slovenian language has 4 forms:
|
||||
# 1 singular and 3 plurals
|
||||
|
||||
# Determine plural_id for number *n* as sequence of positive
|
||||
# integers: 0,1,...
|
||||
# NOTE! For singular form ALWAYS return plural_id = 0
|
||||
get_plural_id = lambda n: (0 if n % 100 == 1 else
|
||||
1 if n % 100 == 2 else
|
||||
2 if n % 100 in (3,4) else
|
||||
3)
|
||||
|
||||
# Construct and return plural form of *word* using
|
||||
# *plural_id* (which ALWAYS>0). This function will be executed
|
||||
# for words (or phrases) not found in plural_dict dictionary
|
||||
# construct_plural_form = lambda word, plural_id: (word + 'suffix')
|
||||
|
||||
@@ -0,0 +1,14 @@
|
||||
#!/usr/bin/env python
|
||||
# -*- coding: utf8 -*-
|
||||
# Plural-Forms for tr (Turkish)
|
||||
|
||||
nplurals=1 # Turkish language has ONE form!
|
||||
|
||||
# Always returns 0:
|
||||
get_plural_id = lambda n: 0
|
||||
|
||||
# Construct and return plural form of *word* using
|
||||
# *plural_id* (which ALWAYS>0). This function will be executed
|
||||
# for words (or phrases) not found in plural_dict dictionary
|
||||
# construct_plural_form = lambda word, plural_id: word
|
||||
|
||||
@@ -0,0 +1,21 @@
|
||||
#!/usr/bin/env python
|
||||
# -*- coding: utf8 -*-
|
||||
# Plural-Forms for uk (Ukrainian)
|
||||
|
||||
nplurals=3 # Ukrainian language has 3 forms:
|
||||
# 1 singular and 2 plurals
|
||||
|
||||
# Determine plural_id for number *n* as sequence of positive
|
||||
# integers: 0,1,...
|
||||
# NOTE! For singular form ALWAYS return plural_id = 0
|
||||
get_plural_id = lambda n: (0 if n % 10 == 1 and n % 100 != 11 else
|
||||
1 if n % 10 >= 2 and n % 10 <= 4 and
|
||||
(n % 100 < 10 or n % 100 >= 20) else
|
||||
2)
|
||||
|
||||
# construct_plural_form() is not used now because of complex
|
||||
# rules of Ukrainian language. Default version of
|
||||
# this function is used to simple insert new words into
|
||||
# plural_dict dictionary)
|
||||
# construct_plural_form = lambda word, plural_id: word
|
||||
|
||||
@@ -0,0 +1,14 @@
|
||||
#!/usr/bin/env python
|
||||
# -*- coding: utf8 -*-
|
||||
# Plural-Forms for zh (Chinese)
|
||||
|
||||
nplurals=1 # Chinese language has ONE form!
|
||||
|
||||
# Always returns 0:
|
||||
get_plural_id = lambda n: 0
|
||||
|
||||
# Construct and return plural form of *word* using
|
||||
# *plural_id* (which ALWAYS>0). This function will be executed
|
||||
# for words (or phrases) not found in plural_dict dictionary
|
||||
# construct_plural_form = lambda word, plural_id: word
|
||||
|
||||
Reference in New Issue
Block a user