Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix Armenian megs #156

Merged
merged 1 commit into from
Mar 22, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion README.rdoc
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,7 @@ Converte números em letras utilizando a biblioteca I18n.
=> "en miljoner en hundra"
=> "jeden milión jedno sto"
=> "một triệu một trăm"
=> "միլիոն հարյուր"
=> "մեկ միլիոն հարյուր"

1000000000000000000000000000000000.to_words
=> "one decillion"
Expand Down
17 changes: 0 additions & 17 deletions lib/numbers_and_words/strategies/figures_converter/languages/hy.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,23 +3,6 @@ module Strategies
module FiguresConverter
module Languages
class Hy < Base
def capacity_iteration
words = []
capacity_words = words_in_capacity(@current_capacity)
words.push(megs) unless capacity_words.empty?
words += capacity_words unless thousand? && one?
words
end

private

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

def thousand?
FiguresArray::THOUSAND_CAPACITY <= @current_capacity
end
end
end
end
Expand Down
12 changes: 6 additions & 6 deletions spec/numbers_and_words/integer/fixture_examples/hy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,8 @@ to_words:
909: ինը հարյուր ինը
999: ինը հարյուր իննսունինը
thousands:
1000: հազար
1001: հազար մեկ
1000: մեկ հազար
1001: մեկ հազար մեկ
2000: երկու հազար
2010: երկու հազար տասը
4030: չորս հազար երեսուն
Expand All @@ -68,14 +68,14 @@ to_words:
999990: ինը հարյուր իննսունինը հազար ինը հարյուր իննսուն
999999: ինը հարյուր իննսունինը հազար ինը հարյուր իննսունինը
millions:
1000000: միլիոն
1000100: միլիոն հարյուր
1000000: մեկ միլիոն
1000100: մեկ միլիոն հարյուր
2000000: երկու միլիոն
999000999: ինը հարյուր իննսունինը միլիոն ինը հարյուր իննսունինը
999999999: ինը հարյուր իննսունինը միլիոն ինը հարյուր իննսունինը հազար ինը հարյուր իննսունինը
billions:
1174315110: միլիարդ հարյուր յոթանասունչորս միլիոն երեք հարյուր տասնհինգ հազար հարյուր տասը
1174315119: միլիարդ հարյուր յոթանասունչորս միլիոն երեք հարյուր տասնհինգ հազար հարյուր տասնինը
1174315110: մեկ միլիարդ հարյուր յոթանասունչորս միլիոն երեք հարյուր տասնհինգ հազար հարյուր տասը
1174315119: մեկ միլիարդ հարյուր յոթանասունչորս միլիոն երեք հարյուր տասնհինգ հազար հարյուր տասնինը
15174315110: տասնհինգ միլիարդ հարյուր յոթանասունչորս միլիոն երեք հարյուր տասնհինգ հազար հարյուր տասը
35174315119: երեսունհինգ միլիարդ հարյուր յոթանասունչորս միլիոն երեք հարյուր տասնհինգ հազար հարյուր տասնինը
935174315119: ինը հարյուր երեսունհինգ միլիարդ հարյուր յոթանասունչորս միլիոն երեք հարյուր տասնհինգ հազար հարյուր տասնինը