From a342989093fbd56c75b3cba655b3107d4d9a823a Mon Sep 17 00:00:00 2001 From: Keghani Kouzoujian Date: Mon, 29 Feb 2016 18:24:46 +0100 Subject: [PATCH] Update nationalPrefixOptionalWhenFormatting documentation. --- java/release_notes.txt | 4 ++++ resources/phonemetadata.proto | 2 +- .../google/i18n/phonenumbers/BuildMetadataFromXml.java | 9 ++++----- 3 files changed, 9 insertions(+), 6 deletions(-) diff --git a/java/release_notes.txt b/java/release_notes.txt index 2e89ec2e0..4fc606787 100644 --- a/java/release_notes.txt +++ b/java/release_notes.txt @@ -1,3 +1,7 @@ +Pending changes: +Code changes: + - Update nationalPrefixOptionalWhenFormatting documentation. + Feb 25, 2016: libphonenumber-7.2.6 Metadata changes: - Updated phone metadata for region code(s): DJ, MA, NA, US diff --git a/resources/phonemetadata.proto b/resources/phonemetadata.proto index 2246a9227..593ac7181 100644 --- a/resources/phonemetadata.proto +++ b/resources/phonemetadata.proto @@ -82,7 +82,7 @@ message NumberFormat { // commonly seen this number written by people without the leading 0, for // example as (20) XXXX XXXX, this field would be set to true. This will be // inherited from the value set for the territory in the XML file, unless a - // national_prefix_formatting_rule is defined specifically for this + // national_prefix_optional_when_formatting is defined specifically for this // NumberFormat. optional bool national_prefix_optional_when_formatting = 6; diff --git a/tools/java/common/src/com/google/i18n/phonenumbers/BuildMetadataFromXml.java b/tools/java/common/src/com/google/i18n/phonenumbers/BuildMetadataFromXml.java index b0436b9f5..f55716388 100644 --- a/tools/java/common/src/com/google/i18n/phonenumbers/BuildMetadataFromXml.java +++ b/tools/java/common/src/com/google/i18n/phonenumbers/BuildMetadataFromXml.java @@ -294,10 +294,10 @@ public class BuildMetadataFromXml { } /** - * Extracts the available formats from the provided DOM element. If it does not contain any - * nationalPrefixFormattingRule, the one passed-in is retained. The nationalPrefix, - * nationalPrefixFormattingRule and nationalPrefixOptionalWhenFormatting values are provided from - * the parent (territory) element. + * Extracts the available formats from the provided DOM element. If it does not contain any + * nationalPrefixFormattingRule, the one passed-in is retained; similarly for + * nationalPrefixOptionalWhenFormatting. The nationalPrefix, nationalPrefixFormattingRule and + * nationalPrefixOptionalWhenFormatting values are provided from the parent (territory) element. */ // @VisibleForTesting static void loadAvailableFormats(PhoneMetadata metadata, @@ -324,7 +324,6 @@ public class BuildMetadataFromXml { } else { format.nationalPrefixFormattingRule = nationalPrefixFormattingRule; } - if (numberFormatElement.hasAttribute(NATIONAL_PREFIX_OPTIONAL_WHEN_FORMATTING)) { format.nationalPrefixOptionalWhenFormatting = Boolean.valueOf(numberFormatElement.getAttribute(