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

Full support for Brazilian Portuguese #139

Merged
merged 6 commits into from Jun 8, 2017

Conversation

azolotov
Copy link
Contributor

@azolotov azolotov commented Jun 7, 2017

No description provided.

@coveralls
Copy link

Coverage Status

Coverage decreased (-0.1%) to 99.412% when pulling 7a3f951 on gunpowderlabs:brazilian-portuguese into c24a2ed on kslazarev:master.

1 similar comment
@coveralls
Copy link

coveralls commented Jun 7, 2017

Coverage Status

Coverage decreased (-0.1%) to 99.412% when pulling 7a3f951 on gunpowderlabs:brazilian-portuguese into c24a2ed on kslazarev:master.

@coveralls
Copy link

coveralls commented Jun 7, 2017

Coverage Status

Coverage decreased (-0.1%) to 99.412% when pulling cd90772 on gunpowderlabs:brazilian-portuguese into c24a2ed on kslazarev:master.

Copy link
Collaborator

@jlduran jlduran left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you!

I commented on a few details.

.gitignore Outdated
@@ -2,3 +2,4 @@ coverage
pkg
Gemfile.lock
.bundle
.idea
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's not commit this file

Gemfile Outdated
@@ -6,6 +6,7 @@ gem 'activesupport'
group :development do
gem 'rake'
gem 'jeweler'
gem 'pry'
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's not commit this file

end
end
end
end
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Missing line at the end

end
end
end
end
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Missing line at the end

end
end
end
end
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Missing line at the end

end
end
end
end
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Missing line at the end

end
end
end
end
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Missing line at the end

end
end
end
end
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Missing line at the end

end
end
end
end
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Missing line at the end

1.0: um
0.7: sete décimos
3.5: três e cinco décimos
42.1: quarenta e dois e um décimo
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Missing line at the end

@coveralls
Copy link

Coverage Status

Coverage increased (+0.4%) to 99.893% when pulling 7e9941e on gunpowderlabs:brazilian-portuguese into c24a2ed on kslazarev:master.

@coveralls
Copy link

coveralls commented Jun 8, 2017

Coverage Status

Coverage decreased (-0.1%) to 99.412% when pulling 7e9941e on gunpowderlabs:brazilian-portuguese into c24a2ed on kslazarev:master.

@jlduran
Copy link
Collaborator

jlduran commented Jun 8, 2017

Thank you!

I have only one more question:

Does Portugal use the long scale of numbers? I know Brazil uses the short scale. I am not familiar with the Acordo Ortográfico da Língua Portuguesa de 1990.

If so, this should be changed to pt-BR.

@azolotov
Copy link
Contributor Author

azolotov commented Jun 8, 2017

@jlduran We realized that, too, and are already working on switching it to pt-BR, so the original pt implementation will remain and we're adding an entirely new pt-BR one with this pull request. cc @rafaelcaricio

@rafaelcaricio
Copy link

I will update the PR soon enough. 😃

@rafaelcaricio
Copy link

@jlduran @azolotov should be good to go now.

@coveralls
Copy link

coveralls commented Jun 8, 2017

Coverage Status

Coverage decreased (-0.2%) to 99.369% when pulling 8791570 on gunpowderlabs:brazilian-portuguese into c24a2ed on kslazarev:master.

21000: vinte e um mil
21001: vinte e um mil e um
999000: novecentos e noventa e nove mil
999999: novecentos e noventa e nove mil e novecentos e noventa e nove
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you verify this is correct? I think it should be how it actually is (if so, other numbers should change as well):

999999: novecentos e noventa e nove mil novecentos e noventa e nove

Looking at a few documents:

https://www.legisweb.com.br/legislacao/?id=178282 Art. 3º, Seção 2º

... o número nove milhões, novecentos e noventa e nove mil novecentos e noventa e nove ...

Also:

http://www.languagesandnumbers.com/how-to-count-in-portuguese-brazil/en/por-bra/

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You are right. Just keep in mind that the website "languagesandnumbers.com" does not add the required commas, but we are adding in our implementation. So we are correct in that matter and the site wrong.

@coveralls
Copy link

coveralls commented Jun 8, 2017

Coverage Status

Coverage decreased (-0.2%) to 99.369% when pulling ffff97b on gunpowderlabs:brazilian-portuguese into c24a2ed on kslazarev:master.

@coveralls
Copy link

coveralls commented Jun 8, 2017

Coverage Status

Coverage decreased (-0.2%) to 99.369% when pulling 0a23de6 on gunpowderlabs:brazilian-portuguese into c24a2ed on kslazarev:master.

@jlduran
Copy link
Collaborator

jlduran commented Jun 8, 2017

Thank you. I think this is good to go now. I will merge it right now, however I'm not sure if I can cut a new gem today.

Let's ask @dblock, otherwise by the end of the week I'll have it ready.

@jlduran jlduran merged commit 902091b into kslazarev:master Jun 8, 2017
jlduran added a commit that referenced this pull request Jun 11, 2017
Features

- Add full support for Brazilian Portuguese.  [#139]
- Add option `precision` to `to_words`.  [#134]

Bugs

- Fix README typo for 231 in French.
- Fix big numbers in Spanish.  [#129]
- Fix typo for number twenty-one in Spanish.  [#127]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants