1{namespace com.google.phonenumbers.demo.singleNumber} 2{template singleNumber} 3{@param phoneNumber: string} 4{@param defaultCountry: string} 5{@param geocodingLocale: string} 6 7{@param countryCode: int} 8{@param nationalNumber: int} 9{@param extension: string} 10{@param countryCodeSource: string} 11{@param italianLeadingZero: bool} 12{@param numberOfLeadingZeros: int} 13{@param rawInput: string} 14{@param preferredDomesticCarrierCode: string} 15 16{@param isPossibleNumber: bool} 17{@param isValidNumber: bool} 18{@param isValidNumberForRegion: bool|null} 19{@param phoneNumberRegion: string|null} 20{@param numberType: string} 21{@param validationResult: string} 22 23{@param isPossibleShortNumber: bool} 24{@param isValidShortNumber: bool} 25{@param isPossibleShortNumberForRegion: bool|null} 26{@param isValidShortNumberForRegion: bool|null} 27 28{@param e164Format: string} 29{@param originalFormat: string} 30{@param nationalFormat: string} 31{@param internationalFormat: string} 32{@param outOfCountryFormatFromUs: string} 33{@param outOfCountryFormatFromCh: string} 34{@param mobileDiallingFormatFromUs: string} 35{@param nationalDiallingFormatWithPreferredCarrierCode: string} 36 37{@param rows: list<list<string>>} 38 39{@param descriptionForNumber: string} 40{@param timeZonesForNumber: string} 41{@param nameForNumber: string} 42{@param newIssueLink: string} 43{@param guidelinesLink: string} 44 45 46<!DOCTYPE html> 47<HTML lang="en"> 48<HEAD> 49 <LINK type="text/css" rel="stylesheet" href="/stylesheets/main.css"/> 50 <title>Results for {$phoneNumber}</title> 51</HEAD> 52<BODY> 53<p>Phone Number entered: {$phoneNumber}</p> 54<p>Default Country entered: {$defaultCountry}</p> 55<p>Language entered: {$geocodingLocale}</p> 56<DIV> 57 <TABLE border=1> 58 <TR> 59 <TD colspan=2>Parsing Result (parseAndKeepRawInput())</TD> 60 </TR> 61 <TR> 62 <TH>country_code</TH> 63 <TD>{$countryCode}</TD> 64 </TR> 65 <TR> 66 <TH>national_number</TH> 67 <TD>{$nationalNumber}</TD> 68 </TR> 69 <TR> 70 <TH>extension</TH> 71 <TD>{$extension}</TD> 72 </TR> 73 <TR> 74 <TH>country_code_source</TH> 75 <TD>{$countryCodeSource}</TD> 76 </TR> 77 <TR> 78 <TH>italian_leading_zero</TH> 79 <TD>{$italianLeadingZero}</TD> 80 </TR> 81 <TR> 82 <TH>number_of_leading_zeros</TH> 83 <TD>{$numberOfLeadingZeros}</TD> 84 </TR> 85 <TR> 86 <TH>raw_input</TH> 87 <TD>{$rawInput}</TD> 88 </TR> 89 <TR> 90 <TH>preferred_domestic_carrier_code</TH> 91 <TD>{$preferredDomesticCarrierCode}</TD> 92 </TR> 93 </TABLE> 94</DIV> 95<DIV> 96 <TABLE border=1> 97 <TR> 98 <TD colspan=2>Validation Results</TD> 99 </TR> 100 <TR> 101 <TH>Result from isPossibleNumber()</TH> 102 <TD>{$isPossibleNumber}</TD> 103 </TR> 104{if $isPossibleNumber} 105 {if $validationResult == "IS_POSSIBLE_LOCAL_ONLY"} 106 <TR> 107 <TH>Result from isPossibleNumberWithReason()</TH> 108 <TD>{$validationResult}</TD> 109 </TR> 110 <TR> 111 <TD colspan=2>Number is considered invalid as it is not a possible national number.</TD> 112 </TR> 113 {else} 114 <TR> 115 <TH>Result from isValidNumber()</TH> 116 <TD>{$isValidNumber}</TD> 117 </TR> 118 {if $isValidNumberForRegion != null} 119 <TR> 120 <TH>Result from isValidNumberForRegion()</TH> 121 <TD>{$isValidNumberForRegion}</TD> 122 </TR> 123 {/if} 124 <TR> 125 <TH>Phone Number region</TH> 126 <TD>{$phoneNumberRegion ?: ""}</TD> 127 </TR> 128 <TR> 129 <TH>Result from getNumberType()</TH> 130 <TD>{$numberType}</TD> 131 </TR> 132 {/if} 133{else} 134 <TR> 135 <TH>Result from isPossibleNumberWithReason()</TH> 136 <TD>{$validationResult}</TD> 137 </TR> 138 <TR> 139 <TD colspan=2>Note: Numbers that are not possible have type UNKNOWN, an unknown region, and are considered invalid.</TD> 140 </TR> 141{/if} 142 </TABLE> 143</DIV> 144 145{if not $isValidNumber} 146<DIV> 147 <TABLE border=1> 148 <TR><TD colspan=2>Short Number Results</TD></TR> 149 <TR> 150 <TH>Result from isPossibleShortNumber()</TH> 151 <TD>{$isPossibleShortNumber}</TD> 152 </TR> 153 {if $isPossibleShortNumber} 154 <TR> 155 <TH>Result from isValidShortNumber()</TH> 156 <TD>{$isValidShortNumber}</TD> 157 </TR> 158 {/if} 159 {if $isPossibleShortNumberForRegion != null} 160 <TR> 161 <TH>Result from isPossibleShortNumberForRegion()</TH> 162 <TD>{$isPossibleShortNumberForRegion}</TD> 163 </TR> 164 {if $isPossibleShortNumberForRegion and $isValidShortNumberForRegion != null} 165 <TR> 166 <TH>Result from isValidShortNumberForRegion()</TH> 167 <TD>{$isValidShortNumberForRegion}</TD> 168 </TR> 169 {/if} 170 {/if} 171 </TABLE> 172</DIV> 173{/if} 174 175<DIV> 176 <TABLE border=1> 177 <TR> 178 <TD colspan=2>Formatting Results</TD> 179 </TR> 180 <TR> 181 <TH>E164 format</TH> 182 <TD>{$e164Format}</TD> 183 </TR> 184 <TR> 185 <TH>Original format</TH> 186 <TD>{$originalFormat}</TD> 187 </TR> 188 <TR> 189 <TH>National format</TH> 190 <TD>{$nationalFormat}</TD> 191 </TR> 192 <TR> 193 <TH>International format</TH> 194 <TD>{$internationalFormat}</TD> 195 </TR> 196 <TR> 197 <TH>Out-of-country format from US</TH> 198 <TD>{$outOfCountryFormatFromUs}</TD> 199 </TR> 200 <TR> 201 <TH>Out-of-country format from CH</TH> 202 <TD>{$outOfCountryFormatFromCh}</TD> 203 </TR> 204 <TR> 205 <TH>Format for mobile dialing (calling from US)</TH> 206 <TD>{$mobileDiallingFormatFromUs}</TD> 207 </TR> 208 <TR> 209 <TH>Format for national dialing with preferred carrier code and empty fallback carrier code</TH> 210 <TD>{$nationalDiallingFormatWithPreferredCarrierCode}</TD> 211 </TR> 212 </TABLE> 213</DIV> 214 215<DIV> 216 <TABLE border=1> 217 <TR> 218 <TD colspan=2>AsYouTypeFormatter Results</TD> 219 </TR> 220 {for $row in $rows} 221 <TR> 222 <TH>Char entered: '{$row[0]}' Output: "</TH> 223 <TD>{$row[1]}</TD> 224 </TR> 225 {/for} 226 227 </TABLE> 228</DIV> 229 230 231{if $isValidNumber} 232 233<DIV> 234 <TABLE border=1> 235 <TR> 236 <TD colspan=2>PhoneNumberOfflineGeocoder Results</TD> 237 </TR> 238 <TR> 239 <TH>Location</TH> 240 <TD>{$descriptionForNumber}</TD> 241 </TR> 242 </TABLE> 243</DIV> 244<DIV> 245 <TABLE border=1> 246 <TR> 247 <TD colspan=2>PhoneNumberToTimeZonesMapper Results</TD> 248 </TR> 249 <TR> 250 <TH>Time zone(s)</TH> 251 <TD>{$timeZonesForNumber}</TD> 252 </TR> 253 </TABLE> 254</DIV> 255 {if ['MOBILE', 'FIXED_LINE_OR_MOBILE', 'PAGER'].contains($numberType)} 256<DIV> 257 <TABLE border=1> 258 <TR> 259 <TD colspan=2>PhoneNumberToCarrierMapper Results</TD> 260 </TR> 261 <TR> 262 <TH>Carrier</TH> 263 <TD>{$nameForNumber}</TD> 264 </TR> 265 </TABLE> 266</DIV> 267 {/if} 268{/if} 269 270<b style="color:red">File an issue</b>: by clicking on <a target="_blank" href="{$newIssueLink}">this link</a>, I confirm that I have read the <a target="_blank" href="{$guidelinesLink}">contributor's guidelines</a>. 271</BODY> 272</HTML> 273{/template}