Skip to content

Commit ec22ce9

Browse files
Hani Yacoubphilimon-reset
authored andcommitted
Enable Es
1 parent 041c8e1 commit ec22ce9

File tree

3 files changed

+13
-3
lines changed

3 files changed

+13
-3
lines changed

l10n_CM/region/ES.json

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
{
2+
"region": "ES",
3+
"sites": [
4+
"demo",
5+
"ebay"
6+
],
7+
"tests": [
8+
]
9+
}

l10n_CM/run_l10n.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
current_dir = os.path.dirname(__file__)
1616
valid_flags = {"--run-headless", "-n", "--reruns", "--fx-executable", "--ci"}
1717
flag_with_parameter = {"-n", "--reruns"}
18-
valid_region = {"US", "CA", "DE", "FR", "IT", "GB"}
18+
valid_region = {"US", "CA", "DE", "FR", "IT", "GB", "ES"}
1919
valid_sites = {
2020
"demo",
2121
"amazon",

modules/util.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ def __init__(self):
104104
"Yukon": "YT",
105105
}
106106
# temporary fix until faker issue is resolved
107-
self.country_local_translation = {"Germany": "Deutschland", "Italy": "Italia"}
107+
self.country_local_translation = {"Germany": "Deutschland", "Italy": "Italia", "Spain": "Espana"}
108108
self.fake = None
109109
self.locale = None
110110

@@ -546,6 +546,7 @@ def normalize_regional_phone_numbers(self, phone: str, region: str) -> str:
546546
"DE": "49",
547547
"GB": "44",
548548
"IT": "39",
549+
"ES": "34"
549550
}
550551

551552
# Sub out anything that matches this regex statement with an empty string to get rid of extensions in generated phone numbers
@@ -566,7 +567,7 @@ def normalize_regional_phone_numbers(self, phone: str, region: str) -> str:
566567
local_number = digits[len(country_code) :]
567568

568569
# Handle leading zero in local numbers (France & Germany)
569-
if region in ["FR", "DE", "GB", "IT"] and local_number.startswith("0"):
570+
if region in ["FR", "DE", "GB", "IT", "ES"] and local_number.startswith("0"):
570571
# Remove the leading zero
571572
local_number = local_number[1:]
572573

0 commit comments

Comments
 (0)