-
Notifications
You must be signed in to change notification settings - Fork 115
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
#42. Add Spanish language. (experimental)
Merge remote-tracking branch 'remotes/highercomve/master' into feature/add_spanish_language
- Loading branch information
Showing
8 changed files
with
84 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
es: | ||
numbers: | ||
ones: [cero, uno, dos, tres, cuatro, cinco, seis, siete, ocho, nueve] | ||
teens: [diez, once, doce, trece, catorce, quince, dieciséis, diecisiete, dieciocho, diecinueve] | ||
tens: [0, 10, veinte, teinta, cuarenta, cincuenta, sesenta, setenta, ochenta, noventa] | ||
mega: [ones, thousands, millions, billions, trillions, quadrillions, quintillion, sextillions, septillions, octillions, nonillions, decillions] | ||
hundreds: | ||
one: cien | ||
many: ciento | ||
thousands: | ||
one: mil | ||
many: mil | ||
millions: | ||
one: millon | ||
many: millones | ||
billions: | ||
one: millardo | ||
many: millardos | ||
trillions: | ||
one: billardo | ||
many: billardos | ||
quadrillions: | ||
one: billardo | ||
many: billardos | ||
quintillions: | ||
one: trillion | ||
many: trillions | ||
sextillions: | ||
one: trilliard | ||
many: trilliards | ||
septillions: | ||
one: quadrillion | ||
many: quadrillions | ||
octillions: | ||
one: quadrilliard | ||
many: quadrilliards | ||
nonillions: | ||
one: quintillion | ||
many: quintillions | ||
decillions: | ||
one: quintilliard | ||
many: quintilliards |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
module NumbersAndWords | ||
module I18n | ||
module Plurals | ||
module Es | ||
RULE = lambda { |n| one_conditions(n) ? :one : :many } | ||
|
||
extend self | ||
|
||
def one_conditions n | ||
n % 10 == 1 && n % 100 != 11 | ||
end | ||
end | ||
end | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
module NumbersAndWords | ||
module Strategies | ||
class Es < Base | ||
include Families::Latin | ||
include NumbersAndWords::TranslationsHelpers::Es | ||
end | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,6 +7,8 @@ module En | |
def translation_tens_with_ones numbers | ||
super numbers, '-' | ||
end | ||
|
||
|
||
end | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
module NumbersAndWords | ||
module TranslationsHelpers | ||
module Es | ||
include NumbersAndWords::TranslationsHelpers::Base | ||
include NumbersAndWords::TranslationsHelpers::Families::Latin | ||
|
||
def translation_tens_with_ones numbers | ||
super numbers, ' y ' | ||
end | ||
|
||
end | ||
end | ||
end |