Skip to content
Browse files

Update nationalPrefixOptionalWhenFormatting documentation.

  • Loading branch information...
1 parent 90fb886 commit a342989093fbd56c75b3cba655b3107d4d9a823a @keghani keghani committed
View
4 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
View
2 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;
View
9 tools/java/common/src/com/google/i18n/phonenumbers/BuildMetadataFromXml.java
@@ -294,10 +294,10 @@ static void loadNationalFormat(PhoneMetadata metadata, Element numberFormatEleme
}
/**
- * 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 @@ static void loadAvailableFormats(PhoneMetadata metadata,
} else {
format.nationalPrefixFormattingRule = nationalPrefixFormattingRule;
}
-
if (numberFormatElement.hasAttribute(NATIONAL_PREFIX_OPTIONAL_WHEN_FORMATTING)) {
format.nationalPrefixOptionalWhenFormatting =
Boolean.valueOf(numberFormatElement.getAttribute(

0 comments on commit a342989

Please sign in to comment.
Something went wrong with that request. Please try again.