Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

International phone number formatting for FirefoxOS

11 views
Skip to first unread message

Zbigniew Braniecki

unread,
Dec 18, 2012, 8:03:00 PM12/18/12
to
Hi all!

Andreas Gal wrote a cool library to format phone numbers[1]. It's very light and should deal with *almost* all combinations of numbers and how they're visible on the screen.

In some countries (like Poland, heh) mobile OSes do pretty often format the numbers in a very odd ways.

Now is our chance to fix that, and for that we need a variety of tests for each locale.

I started an etherpad[2] and I'm asking you to jump in and add number formats for your country.

The format is:

Format(dial, fromWhere, resultNumber, resultCountry, nationalFormat, internationalFormat)

dial - number that the user types on the keyboard
formWhere - in which country he is when he types it
resultNumber - what number will be dialed
resultCountry - in which country this number will be dialed
nationalFormat - how this number should look on the phone
internationalFormat - how the number should look on the phone if calling from abroad

As a head start I added some examples for polish. Let's gather a good chunk of those for all locales and add them to our test suite.

Cheers,
g.


1) https://github.com/andreasgal/PhoneNumber.js
2) https://etherpad.mozilla.org/fxos-intl-num-formatting

Gervase Markham

unread,
Dec 19, 2012, 6:11:28 AM12/19/12
to
On 19/12/12 01:03, Zbigniew Braniecki wrote:
> Now is our chance to fix that, and for that we need a variety of tests for each locale.
>
> I started an etherpad[2] and I'm asking you to jump in and add number formats for your country.

Hi Gandalf,

I think this request needs a little clarification; I've tried to provide
some in the Etherpad, but could you check that I've got it all right?

Also, may I briefly question the approach? :-) Certainly in the UK, the
rules here are long and complex. Would it perhaps be better to create a
tool which generated random phone numbers within certain parameters
(e.g. in the UK, length 9 or 10, beginning with a 0) and then fed them
into Andreas' tool and also one of the many other phone number
formatting tools, and flagged up inconsistencies?

http://www.aa-asterisk.org.uk/index.php/Libphonenumber

Or use some of the other systems to generate the test cases rather than
writing them by hand?

Do we know why Andreas decided not to use the Javascript port of
libphonenumber?

Thanks,

Gerv


0 new messages