-
-
Notifications
You must be signed in to change notification settings - Fork 228
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
In vietnam #39
Comments
Hi there! Thanks for the issue. Phony does not yet contain rules for vietnamese telephone numbers (see lib/countries.rb). If you can provide some via pull request or via documentation, that would be most welcome. |
Yes, the rules are correct |
@willingchangthernguyen Would you be willing to implement the rules and send a pull request? (I almost have no time for this right now) |
How can I do ? |
You can fork the project, then pull the code to your computer, and edit the code. The tests can be run by entering rake. (If all this is gibberish to you, never mind – I will look at it next week :) ) |
@willingchangthernguyen I've included Vietnam in Phony. Enjoy and please tell me if there are any problems. |
Thanks, I will check it Willing |
Hi Floere When I add country_code 84 9y x x x x x x x -> 0 9y x x x x x x x ->ok Thanks |
Hi Willing, As outlined in the README, "This gem can normalize, format and split E164 numbers." – so this only works with E164 numbers with a country code. How do you expect the gem to know what to do if there is no country code? Cheers, |
Hi Floere Thanks |
Hi Floere but about US: Thanks |
Hi Willing, I'm not sure what you mean. What are you doing in the step "->", i.e. what does the arrow mean? Cheers, |
HI Florian Thanks |
What did you do to get these numbers? I did this with your example: require 'phony'
p Phony.formatted(Phony.normalize("1415 922 4711")) # => "+1 415 922 4711"
# Or just:
#
p Phony.formatted("14159224711") # => "+1 415 922 4711" I get |
HI Florian |
Hi Willing, I think I get it now. If one uses national formatting, it should not add a zero for US numbers, but for Vietnamese numbers it's ok. Am I right? Cheers, |
Hi Florian Thanks |
Hi Florian Please change it asap ,I am using your gem Thanks |
Hi Willing This is not how open source software works. If you want "asap", you have to pay: My going rate is 200$ an hour. If you can wait a bit, it is free. "a bit" is dependent on the quality of interaction, and the helpfulness of the other party. Cheers, |
Hi Florian |
Hi Willing Thanks for the wait and your understanding. The fix is released in version 1.7.0. It is demonstrated here: If you notice another error, don't hesitate to open another issue, describing – best in code – what the problem was. Please also remember that I am providing my work and invested free time out of the goodness of my heart, and ask for nothing else but the occasional thank you note, which are surprisingly rare. All the best and enjoy, |
Hi Florian 14159224711 ->still 04159224711 |
Have you updated the gem to the latest version > 1.7.0? This is what I get: $ gem install phony
Successfully installed phony-1.7.1
1 gem installed
Installing ri documentation for phony-1.7.1...
Installing RDoc documentation for phony-1.7.1...
$ ruby -e 'require "phony"; p Phony.formatted("14159224711", :format => :national)'
"415 922 4711" (Note the last line – no zero) |
Hi Florian |
Good to hear! |
Hi Florian |
Hi Willing, The great thing about gems and Ruby is that gems are focussed pieces of code. Phony deals with phone numbers and countries deals with countries. I could pull in countries into phony. But then, not everybody needs country stuff in their phone numbers. So I'd rather leave it up to the users of Phony whether to pull in countries or not. Thanks for your feedback! |
can not run in vietnam
The text was updated successfully, but these errors were encountered: