In vietnam #39

Closed
willingchangthernguyen opened this Issue May 6, 2012 · 27 comments

Comments

Projects
None yet
2 participants
@willingchangthernguyen

can not run in vietnam

@floere

This comment has been minimized.

Show comment
Hide comment
@floere

floere May 6, 2012

Owner

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.
Are these rules correct? https://en.wikipedia.org/wiki/Telephone_numbers_in_Vietnam

Owner

floere commented May 6, 2012

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.
Are these rules correct? https://en.wikipedia.org/wiki/Telephone_numbers_in_Vietnam

@willingchangthernguyen

This comment has been minimized.

Show comment
Hide comment
@willingchangthernguyen

willingchangthernguyen May 6, 2012

Yes, the rules are correct
Thanks

Yes, the rules are correct
Thanks

@floere

This comment has been minimized.

Show comment
Hide comment
@floere

floere May 6, 2012

Owner

@willingchangthernguyen Would you be willing to implement the rules and send a pull request? (I almost have no time for this right now)

Owner

floere commented May 6, 2012

@willingchangthernguyen Would you be willing to implement the rules and send a pull request? (I almost have no time for this right now)

@willingchangthernguyen

This comment has been minimized.

Show comment
Hide comment
@willingchangthernguyen

willingchangthernguyen May 6, 2012

How can I do ?

How can I do ?

@floere

This comment has been minimized.

Show comment
Hide comment
@floere

floere May 6, 2012

Owner

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 :) )

Owner

floere commented May 6, 2012

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 :) )

@floere floere reopened this May 13, 2012

@floere floere closed this in 97ac497 May 13, 2012

@floere

This comment has been minimized.

Show comment
Hide comment
@floere

floere May 13, 2012

Owner

@willingchangthernguyen I've included Vietnam in Phony. Enjoy and please tell me if there are any problems.

Owner

floere commented May 13, 2012

@willingchangthernguyen I've included Vietnam in Phony. Enjoy and please tell me if there are any problems.

@willingchangthernguyen

This comment has been minimized.

Show comment
Hide comment
@willingchangthernguyen

willingchangthernguyen May 16, 2012

Thanks, I will check it

Willing

Thanks, I will check it

Willing

@willingchangthernguyen

This comment has been minimized.

Show comment
Hide comment
@willingchangthernguyen

willingchangthernguyen May 16, 2012

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
But when setting 0 9y x x x x x x x -> delete 0 -> 9y x x x x x x x -> not ok

Thanks
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
But when setting 0 9y x x x x x x x -> delete 0 -> 9y x x x x x x x -> not ok

Thanks
Willing

@floere

This comment has been minimized.

Show comment
Hide comment
@floere

floere May 16, 2012

Owner

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,
Florian

Owner

floere commented May 16, 2012

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,
Florian

@willingchangthernguyen

This comment has been minimized.

Show comment
Hide comment
@willingchangthernguyen

willingchangthernguyen May 16, 2012

Hi Floere
In USA
415 922 4711 -> 05922 4711 not include 0
1415 922 4711 -> 0415 922 4711 ??

Thanks
Willing

Hi Floere
In USA
415 922 4711 -> 05922 4711 not include 0
1415 922 4711 -> 0415 922 4711 ??

Thanks
Willing

@willingchangthernguyen

This comment has been minimized.

Show comment
Hide comment
@willingchangthernguyen

willingchangthernguyen May 16, 2012

Hi Floere
Ok ,we need a country code

but about US:
1415 922 4711 -> 0415 922 4711 ?? ,they don't need 0

Thanks
Willing

Hi Floere
Ok ,we need a country code

but about US:
1415 922 4711 -> 0415 922 4711 ?? ,they don't need 0

Thanks
Willing

@floere

This comment has been minimized.

Show comment
Hide comment
@floere

floere May 16, 2012

Owner

Hi Willing,

I'm not sure what you mean. What are you doing in the step "->", i.e. what does the arrow mean?
What do you expect to happen? Can you give me an annotated example where phony does the wrong thing, please?

Cheers,
Florian

Owner

floere commented May 16, 2012

Hi Willing,

I'm not sure what you mean. What are you doing in the step "->", i.e. what does the arrow mean?
What do you expect to happen? Can you give me an annotated example where phony does the wrong thing, please?

Cheers,
Florian

@willingchangthernguyen

This comment has been minimized.

Show comment
Hide comment
@willingchangthernguyen

willingchangthernguyen May 16, 2012

HI Florian
I give an example in US
1415 922 4711 , the phony generates 0415 922 4711 ?? , don't need 0 letter ,should 415 922 4711

Thanks
Willing

HI Florian
I give an example in US
1415 922 4711 , the phony generates 0415 922 4711 ?? , don't need 0 letter ,should 415 922 4711

Thanks
Willing

@floere

This comment has been minimized.

Show comment
Hide comment
@floere

floere May 16, 2012

Owner

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 +1 415 922 4711. So what exactly are you doing?

Owner

floere commented May 16, 2012

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 +1 415 922 4711. So what exactly are you doing?

@willingchangthernguyen

This comment has been minimized.

Show comment
Hide comment
@willingchangthernguyen

willingchangthernguyen May 16, 2012

HI Florian
for US
Phony.formatted('14159224711', :format => :national).should == '4159224711'
in vietnam is ok Phony.formatted('84903670454', :format => :national) should == 0903670454
Thanks
Willing

HI Florian
for US
Phony.formatted('14159224711', :format => :national).should == '4159224711'
in vietnam is ok Phony.formatted('84903670454', :format => :national) should == 0903670454
Thanks
Willing

@floere

This comment has been minimized.

Show comment
Hide comment
@floere

floere May 16, 2012

Owner

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,
Florian

Owner

floere commented May 16, 2012

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,
Florian

@willingchangthernguyen

This comment has been minimized.

Show comment
Hide comment
@willingchangthernguyen

willingchangthernguyen May 17, 2012

Hi Florian
You are right

Thanks
Willing

Hi Florian
You are right

Thanks
Willing

@willingchangthernguyen

This comment has been minimized.

Show comment
Hide comment
@willingchangthernguyen

willingchangthernguyen May 17, 2012

Hi Florian

Please change it asap ,I am using your gem

Thanks
Willing

Hi Florian

Please change it asap ,I am using your gem

Thanks
Willing

@floere

This comment has been minimized.

Show comment
Hide comment
@floere

floere May 17, 2012

Owner

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,
Florian

Owner

floere commented May 17, 2012

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,
Florian

@willingchangthernguyen

This comment has been minimized.

Show comment
Hide comment
@willingchangthernguyen

willingchangthernguyen May 17, 2012

Hi Florian
:D
I will wait
Thanks
Willing

Hi Florian
:D
I will wait
Thanks
Willing

@floere floere reopened this May 17, 2012

@floere

This comment has been minimized.

Show comment
Hide comment
@floere

floere May 17, 2012

Owner

Hi Willing

Thanks for the wait and your understanding. The fix is released in version 1.7.0.

It is demonstrated here:
https://github.com/floere/phony/blob/master/spec/lib/phony_spec.rb#L175-177

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,
Florian

Owner

floere commented May 17, 2012

Hi Willing

Thanks for the wait and your understanding. The fix is released in version 1.7.0.

It is demonstrated here:
https://github.com/floere/phony/blob/master/spec/lib/phony_spec.rb#L175-177

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,
Florian

@floere floere closed this May 17, 2012

@willingchangthernguyen

This comment has been minimized.

Show comment
Hide comment
@willingchangthernguyen

willingchangthernguyen May 17, 2012

Hi Florian

14159224711 ->still 04159224711
please delete 0
Thanks
Willing

Hi Florian

14159224711 ->still 04159224711
please delete 0
Thanks
Willing

@floere

This comment has been minimized.

Show comment
Hide comment
@floere

floere May 17, 2012

Owner

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)

Owner

floere commented May 17, 2012

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)

@willingchangthernguyen

This comment has been minimized.

Show comment
Hide comment
@willingchangthernguyen

willingchangthernguyen May 17, 2012

Hi Florian
Successful
Thanks
Willing

Hi Florian
Successful
Thanks
Willing

@floere

This comment has been minimized.

Show comment
Hide comment
@floere

floere May 17, 2012

Owner

Good to hear!

Owner

floere commented May 17, 2012

Good to hear!

@willingchangthernguyen

This comment has been minimized.

Show comment
Hide comment
@willingchangthernguyen

willingchangthernguyen May 29, 2012

Hi Florian
I saw countries gem ,it's data have some great thing ,please check it to improve phony
Thanks
Willing

Hi Florian
I saw countries gem ,it's data have some great thing ,please check it to improve phony
Thanks
Willing

@floere

This comment has been minimized.

Show comment
Hide comment
@floere

floere Jun 4, 2012

Owner

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.
Using Ruby, you can combine them to be a great combo!

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!
Florian

Owner

floere commented Jun 4, 2012

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.
Using Ruby, you can combine them to be a great combo!

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!
Florian

glebm pushed a commit to glebm/phony that referenced this issue Jul 1, 2012

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment