Skip to content

Commit

Permalink
Merge 53d5ded into 6b681be
Browse files Browse the repository at this point in the history
  • Loading branch information
miks committed Nov 19, 2013
2 parents 6b681be + 53d5ded commit 23bfe3a
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 8 deletions.
2 changes: 1 addition & 1 deletion lib/numbers_and_words/i18n/locales/numbers.lv.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ lv:
hundreds: [simtu, divi simti, trīs simti, četri simti, pieci simti, seši simti, septiņi simti, astoņi simti, deviņi simti]
one_hundred: simts
thousands:
one: tūkstots
one: tūkstotis
other: tūkstoši
millions:
one: miljons
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,18 +11,14 @@ def capacity_iteration
words = []
capacity_words = words_in_capacity(@current_capacity)
words.push(megs) unless capacity_words.empty?
words += capacity_words unless is_a_thousand? and is_a_one?
words += capacity_words
words
end

def is_a_one?
[translations.ones(1)] == words_in_capacity(@current_capacity)
end

def is_a_thousand?
FiguresArray::THOUSAND_CAPACITY == @current_capacity
end

def hundreds
super({:is_hundred => (figures[1,2] == [0,1] && simple_number_to_words.empty?)})
end
Expand Down
4 changes: 2 additions & 2 deletions spec/numbers_and_words/integer/fixture_examples/lv.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,12 +23,12 @@ to_words:
990: deviņi simti deviņdesmit
999: deviņi simti deviņdesmit deviņi
thousands:
1000: tūkstots
1000: viens tūkstotis
2000: divi tūkstoši
4000: četri tūkstoši
5000: pieci tūkstoši
11000: vienpadsmit tūkstoši
21000: divdesmit viens tūkstots
21000: divdesmit viens tūkstotis
999000: deviņi simti deviņdesmit deviņi tūkstoši
999999: deviņi simti deviņdesmit deviņi tūkstoši deviņi simti deviņdesmit deviņi
millions:
Expand Down

0 comments on commit 23bfe3a

Please sign in to comment.