* Make JS util test changes to reflect the annotation updates (like not null parameters). This is followup to recent cl/300367316.
* Add non-nullable modifier to return type of functions never returning null. More details in cl/300838092
* Removing blank line.
* Updates the type annotations in phonenumberutil.js
Updates the type annotations to indicate the inputs are required to be non-null.
* Update pending_code_changes.txt
* Update pending_code_changes.txt
* Abolish MX's international mobile token
* Porting phoneutil changes to JS and AYTF changes to not to swallow parts that are not part of formatting rule.
* Make fake change to trigger travis build again
The format of the data has changed such that formatting patterns now only refer to \d, not specific numbers, so we don't need the special handling in the AYTF code which converts them to \d.
* Ensure the test runner decodes files as UTF-8
Before this change, the `document.charset` of the HTML test files would be 'windows-1252' when accessed through the `file://` protocol, resulting in issues with library or test files containing non-ASCII symbols.
This patch ensures tests still run correctly when files contain non-ASCII symbols.
* Ensure ASCII-safety of source code
Presently we are supporting unicode characters of Russian extension characters manually in JS.
This should be changed in future by setting right flags.
Previous PR: #2223
Surprisingly, we need not set unicode characters of upper case '\u0414\u041E\u0411'. This woks fine.
* Configure Russian extension character доб as a valid one while parsing the numbers
* Escaping non ascii characters for better standardization.
* Added generated RU test data file. This is why travis test are failing at: https://travis-ci.org/googlei18n/libphonenumber/builds/407078226
* Removing manual support of encoded versions as it is already taken care in RegEx flags. Updated based on new review comments.
* ShortNumberInfo metadata tooling - add missing fields to generated JSON.
Adjust javascript metadata generation tooling to include PhoneMetadata proto fields 29,30,31, and 33 that were previously excluded which are now needed for ShortNumberInfo.
* Add shortnumberinfo metadata to build metadata golden tests.
* Remove inaccurate comments in build tooling
* Add namespace to BuildMetadataJsonFromXml to support tool reuse
* Use updated build tooling to generate short number metadata file
* update phonemetadata.pb.js to match the current proto definition
* remove field 7 from phonemetadata.pb.js
* Update build tool to correctly namespacee the generated metadata files
* Stop field 32 from being populated as it is not used in the APIs
* remove metadata accessors for field 32.
* Add tests for connectsToEmergenyNumber and isEmergencyNumber.
Updated linter to include shortnumberinfo related files, and fixed some
lint issues existing with PhoneNumberUtil files.
* ShortNumberInfo functionality and tests ported. Unformatted and missing jsdoc
* Added comments, and fixed as many lint issues as possible.
* lint and comment review comments from andyst addressed.
* Add a golden metadata build test for short number metadata.
* Revert changes to the original phone metadata golden tests.
* Fix a lot of linting and jsdoc typing errors caught by the compiler.
* Add ShortNumberInfo to the javascript demo pages.
* Add ShortNumberIInfo porting to pending_code_changes.
* Add constants to golden tests.
* Update the build tooling
* uUdate pending changes to differentiate build and code changes
* Update build file, fix small test closure compilation issues
* Regenerate short number metadata to account for metadata updates between original generation and now.
* Move requires to alphabetical order
* It was confusing and unnecessary. Not every country that has short numbers beginning with a 0 had it, and it is not the only digit that could overlap with a national prefix and hence be interpreted incorrectly.
* Make canBeInternationallyDialled_API public in Java and CPP
* update notes in pending_code_changes.txt
* Remove TODO on canBeInternationallyDialled as it is already an public API in JS
* Make JS canBeInternationallyDialled API doc consistent with Java and CPP
* Handling possible out-of-bounds exception that would be thrown in C++
and Java if a number with a phone-context tag is entered (RFC3966
format) but no actual phone context.
Added the missing requires this detected, removed the extra require. One
missing require was added manually (goog.object) since it's unable to
detect it.
Updated the readme: compiling everything seems to work at the moment.
Update doc references to refer to CLDR and the page of CLDR codes where
appropriate - it used to say ISO country codes were used, but they aren't.
Also updated to refer to two *or three* letter language codes since they may be three letters (we use the shortest defined one for a language)
Updating comments about leadingDigits field at territory level as well.
* isNumberMatch fix for numbers with italian leading zero fields set. Only
affects people who haven't correctly constructed phone numbers using
methods like 'parse'.
* Adding C++ tests and fixing bug in ExactlySameAs method, which wasn't
updated to handle the number_of_leading_zeros field when that was added
to the phone number proto.
See pending_code_changes.txt for more details.
* Support semicolon as extension character while parsing
* Add notes to pending_code_changes.txt
* JS port: Support semicolon as extension character while parsing
* Update comments in phonenumberutil.js
This could break client code. For anyone who has custom behaviour based on the value of the error, please compare against error.message instead of the error itself.
Metadata changes:
-- Drops the "-1" that was erroneously included in possible lengths before (didn't break anything, but was wrong) - it was a possibleLength of a sub-component so got added to the generalDesc possibleLengths
-- possibleNumberPattern no longer inherited: we don't use this anyway, we will do another CL soon to stop including it at all in the generated metadata
-- exampleNumber is no longer set on fixed-line and mobile elements from the generalDesc
XML file changes:
-- Stopped specifying "NA" and "-1" specifically for fixed-line and mobile blocks; now they are treated as every other type of phone number: if missing, don't fill them in from generalDesc, but leave them missing.
Code changes:
-- Stop using the exampleNumber on generalDesc for non-geo entities, but look at their phonenumber descs - the exampleNumber won't be stored on the generalDesc anymore. This affects porters if they either copied our build logic or used our built metadata in some way; they should update this method in their port too.
* New useful getExampleNumber methods (for testing) - one for invalid
numbers and one for getting a number of a particular type without
specifying a country.