Permalink
Browse files
Update nationalPrefixOptionalWhenFormatting documentation.
- Loading branch information...
|
|
@@ -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
|
|
|
|
@@ -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;
|
|
|
|
|
|
|
@@ -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