* formatting like dashes, dots and spaces. See E_PHONE_NUMBER_MATCH_EXACT.
* @E_BOOK_QUERY_EQUALS_NATIONAL_PHONE_NUMBER: check that a field and the
* test value match when interpreted as phone number, except for the
- * (omitted) country code.
+ * (omitted) country calling code.
* @E_BOOK_QUERY_EQUALS_SHORT_PHONE_NUMBER: check that a field and the test
* value match is the sense that both values appear to be phone numbers,
* and one might be a part (suffix) of the other.
static std::string
e_phone_number_make_region_code (const gchar *region_code)
{
- /* Get country code from current locale's address facet if supported */
+ /* Get two-letter country code from current locale's address facet if supported */
#if HAVE__NL_ADDRESS_COUNTRY_AB2
if (region_code == NULL || region_code[0] == '\0')
region_code = nl_langinfo (_NL_ADDRESS_COUNTRY_AB2);
#endif /* HAVE__NL_ADDRESS_COUNTRY_AB2 */
- /* Extract country code from current locale id if needed */
+ /* Extract two-letter country code from current locale id if needed */
if (region_code == NULL || region_code[0] == '\0') {
/* From outside this is a C library, so we better consult the
* C infrastructure instead of std::locale, which might divert. */
case E_PHONE_NUMBER_ERROR_NOT_A_NUMBER:
return _("Not a phone number");
case E_PHONE_NUMBER_ERROR_INVALID_COUNTRY_CODE:
- return _("Invalid country code");
+ return _("Invalid country calling code");
case E_PHONE_NUMBER_ERROR_TOO_SHORT_AFTER_IDD:
- return _("Remaining text after the country code is to short for a phone number");
+ return _("Remaining text after the country calling code is to short for a phone number");
case E_PHONE_NUMBER_ERROR_TOO_SHORT:
return _("Text is too short for a phone number");
case E_PHONE_NUMBER_ERROR_TOO_LONG:
/**
* e_phone_number_get_country_code_for_region:
- * @region_code: (allow-none): a 2-letter country code, or %NULL
+ * @region_code: (allow-none): a two-letter country code, or %NULL
*
- * Returns the preferred country code for @region_code, e.g. 358 for "fi".
+ * Retrieves the preferred country calling code for @region_code,
+ * e.g. 358 for "fi".
*
* If %NULL is passed for @region_code the default region as returned by
* e_phone_number_get_default_region() is used.
*
- * Returns: a valid country code, or zero if an unknown region code was passed.
+ * Returns: a valid country calling code, or zero if an unknown region
+ * code was passed.
*
* Since: 3.8
*/
/**
* e_phone_number_get_default_region:
*
- * Retrieves the current 2-letter region code that's used by default for
+ * Retrieves the current two-letter country code that's used by default for
* parsing phone numbers in e_phone_number_from_string(). It can be useful
* to store this number before parsing a bigger number of phone numbers.
*
* locale name configured for %LC_ADDRESS is parsed.
*
* Returns: (transfer full): a newly allocated string containing the
- * current locale's 2-letter code for phone number parsing.
+ * current locale's two-letter code for phone number parsing.
*
* Since: 3.8
*/
/**
* e_phone_number_from_string:
* @phone_number: the phone number to parse
- * @region_code: (allow-none): a 2-letter country code, or %NULL
+ * @region_code: (allow-none): a two-letter country code, or %NULL
* @error: (out): a #GError to set an error, if any
*
* Parses the string passed in @phone_number. Note that no validation is
* performed whether the recognized phone number is valid for a particular
* region.
*
- * The 2-letter country code passed in @region_code only is used if the
+ * The two-letter country code passed in @region_code only is used if the
* @phone_number is not written in international format. The application's
* default region as returned by e_phone_number_get_default_region() is used
* if @region_code is %NULL.
* @phone_number: the phone number to query
* @source: an optional location for storing the phone number's origin, or %NULL
*
- * Queries the @phone_number's country code and optionally stores the country code's
- * origin in @source. For instance when parsing "+1-617-5423789" this function
- * would return one and assing E_PHONE_NUMBER_COUNTRY_FROM_FQTN to @source.
+ * Queries the @phone_number's country calling code and optionally stores the country
+ * calling code's origin in @source. For instance when parsing "+1-617-5423789" this
+ * function would return one and assing E_PHONE_NUMBER_COUNTRY_FROM_FQTN to @source.
*
- * Returns: A valid country code, or zero if no country code is known.
+ * Returns: A valid country calling code, or zero if no code is known.
*
* Since: 3.8
**/
* @E_PHONE_NUMBER_FORMAT_INTERNATIONAL: a formatted phone number always
* starting with the country calling code: "+49 30 55667788".
* @E_PHONE_NUMBER_FORMAT_NATIONAL: a formatted phone number in national
- * scope, that is without country code: "(030) 55667788".
+ * scope, that is without country calling code: "(030) 55667788".
* @E_PHONE_NUMBER_FORMAT_RFC3966: a tel: URL according to RFC 3966:
* "tel:+49-30-55667788".
*
* EPhoneNumberMatch:
* @E_PHONE_NUMBER_MATCH_NONE: The phone numbers did not match.
* @E_PHONE_NUMBER_MATCH_EXACT: The phone numbers matched exactly.
- * @E_PHONE_NUMBER_MATCH_NATIONAL: There was no country code for at least
- * one of the numbers, but the national parts matched.
- * @E_PHONE_NUMBER_MATCH_SHORT: There was no country code for at least
- * one of the numbers, but one number might be part (suffix) of the other.
+ * @E_PHONE_NUMBER_MATCH_NATIONAL: There was no country calling code
+ * for at least one of the numbers, but the national parts matched.
+ * @E_PHONE_NUMBER_MATCH_SHORT: There was no country calling code for
+ * at least one of the numbers, but one number might be part (suffix)
+ * of the other.
*
* The quality of a phone number match.
* Let's consider the phone number "+1-221-5423789", then comparing with
* "+1.221.542.3789" we have get E_PHONE_NUMBER_MATCH_EXACT because country
* code, region code and local number are matching. Comparing with "2215423789"
- * will result in E_PHONE_NUMBER_MATCH_NATIONAL because the country code is
- * missing, but the national portion is matching. Finally comparing with
+ * will result in E_PHONE_NUMBER_MATCH_NATIONAL because the country calling code
+ * is missing, but the national portion is matching. Finally comparing with
* "5423789" gives E_PHONE_NUMBER_MATCH_SHORT. For more detail have a look at
* the following table:
*
* @E_PHONE_NUMBER_ERROR_UNKNOWN: the phone number parser reported an yet
* unkown error code.
* @E_PHONE_NUMBER_ERROR_INVALID_COUNTRY_CODE: the supplied phone number has an
- * invalid country code.
+ * invalid country calling code.
* @E_PHONE_NUMBER_ERROR_NOT_A_NUMBER: the supplied text is not a phone number.
* @E_PHONE_NUMBER_ERROR_TOO_SHORT_AFTER_IDD: the remaining text after the
- * country code is to short for a phone number.
+ * country calling code is to short for a phone number.
* @E_PHONE_NUMBER_ERROR_TOO_SHORT: the text is too short for a phone number.
* @E_PHONE_NUMBER_ERROR_TOO_LONG: the text is too long for a phone number.
*
/**
* EPhoneNumberCountrySource:
* @E_PHONE_NUMBER_COUNTRY_FROM_FQTN: the EPhoneNumber was build from a
- * fully qualified telephone number that contained a valid country code
+ * fully qualified telephone number that contained a valid country
+ * calling code
* @E_PHONE_NUMBER_COUNTRY_FROM_IDD: the parsed phone number started
* with the current locale's international call prefix, followed by a
- * valid country code
+ * valid country calling code
* @E_PHONE_NUMBER_COUNTRY_FROM_DEFAULT: the parsed phone didn't start
- * with a (recognizable) country code, the country code was chosen by
+ * with a (recognizable) country calling code, the code was chosen by
* checking the current locale settings
*
- * The origin of a parsed EPhoneNumber's country code.
+ * The origin of a parsed EPhoneNumber's country calling code.
*
* Since: 3.8
**/