Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
M
marketParser
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
nazarf
marketParser
Commits
ba0881a9
Commit
ba0881a9
authored
Apr 06, 2020
by
kolosfed
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Adding Ukrainian pluralization rules
parent
91c22087
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
23 additions
and
1 deletion
+23
-1
localization.rb
config/initializers/localization.rb
+3
-1
pluralizer.uk.rb
config/locales/pluralizer.uk.rb
+20
-0
No files found.
config/initializers/localization.rb
View file @
ba0881a9
I18n
.
available_locales
=
[
:uk
]
I18n
.
available_locales
=
[
:uk
]
I18n
.
default_locale
=
:uk
I18n
.
default_locale
=
:uk
I18n
::
Backend
::
Simple
.
include
(
I18n
::
Backend
::
Pluralization
)
\ No newline at end of file
config/locales/pluralizer.uk.rb
0 → 100644
View file @
ba0881a9
{
uk:
{
i18n:
{
plural:
{
keys:
[
:one
,
:few
,
:many
,
:other
],
rule:
lambda
do
|
n
|
if
n
%
10
==
1
&&
n
%
100
!=
11
:one
elsif
[
2
,
3
,
4
].
include?
(
n
%
10
)
&&
!
[
12
,
13
,
14
].
include?
(
n
%
100
)
:few
elsif
n
%
10
==
0
||
[
5
,
6
,
7
,
8
,
9
].
include?
(
n
%
10
)
||
[
11
,
12
,
13
,
14
].
include?
(
n
%
100
)
:many
else
:other
end
end
}
}
}
}
\ No newline at end of file
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment