Skip to content

Commit 3923e10

Browse files
authored
Merge pull request #762 from mozilla/anca/cm-cleanup
Anca/ L10n - Add some missing sites from regions
2 parents e2ea36b + 5b79568 commit 3923e10

File tree

12 files changed

+54
-34
lines changed

12 files changed

+54
-34
lines changed

choose_l10n_beta_split.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,10 @@ def distribute_mappings_evenly(mappings):
2626
loads[min_idx] += len(regions)
2727
for i in range(len(balanced_splits)):
2828
logging.info(f"Beta split: {i}")
29-
current_split = [f"{site} {' '.join(regions)}" for site, regions in balanced_splits[i].items()]
29+
current_split = [
30+
f"{site} {' '.join(regions)}"
31+
for site, regions in balanced_splits[i].items()
32+
]
3033
logging.info(f"{'\n'.join(current_split)}")
3134
return balanced_splits
3235

choose_l10n_ci_set.py

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,19 @@ def valid_l10n_mappings():
3131
if region_file.get("sites"):
3232
for site in region_file.get("sites"):
3333
report_mapping = True
34-
if site != "demo" and os.path.exists(f"./l10n_CM/constants/{site}/{region}"):
35-
with open(f"./l10n_CM/constants/{site}/{region}/{site}_ad.json", "r+") as ad_file, open(f"./l10n_CM/constants/{site}/{region}/{site}_cc.json", "r+") as cc_file:
34+
if site != "demo" and os.path.exists(
35+
f"./l10n_CM/constants/{site}/{region}"
36+
):
37+
with (
38+
open(
39+
f"./l10n_CM/constants/{site}/{region}/{site}_ad.json",
40+
"r+",
41+
) as ad_file,
42+
open(
43+
f"./l10n_CM/constants/{site}/{region}/{site}_cc.json",
44+
"r+",
45+
) as cc_file,
46+
):
3647
ad = json.load(ad_file)
3748
cc = json.load(cc_file)
3849
if ad.get("skip") and cc.get("skip"):

l10n_CM/region/AT.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,10 @@
22
"region": "AT",
33
"sites": [
44
"demo",
5-
"giesswein",
6-
"holzkern",
75
"ebay",
6+
"giesswein",
87
"hofer",
8+
"holzkern",
99
"mediamarkt"
1010
],
1111
"tests": [

l10n_CM/region/BE.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
{
22
"region": "BE",
33
"sites": [
4+
"brico",
45
"demo",
5-
"torfs",
6-
"standaardboekhandel",
76
"douglas",
8-
"brico",
9-
"toychamp"
7+
"standaardboekhandel",
8+
"toychamp",
9+
"torfs"
1010
],
1111
"tests": [
1212
]

l10n_CM/region/CA.json

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,17 @@
22
"region": "CA",
33
"sites": [
44
"amazon",
5-
"walmart",
5+
"burtsbees",
6+
"calvinklein",
7+
"canadatire",
68
"demo",
9+
"ebay",
710
"etsy",
11+
"gapcanada",
12+
"movieposters",
813
"newbalance",
9-
"canadatire",
10-
"ebay",
11-
"burtsbees",
1214
"staples",
13-
"gapcanada"
15+
"walmart"
1416
],
1517
"tests": [
1618
]

l10n_CM/region/DE.json

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,14 @@
22
"region": "DE",
33
"sites": [
44
"amazon",
5-
"mediamarkt",
5+
"bijoubrigitte",
66
"demo",
7+
"ebay",
78
"justspices",
8-
"bijoubrigitte"
9+
"mediamarkt",
10+
"newbalance",
11+
"thomann",
12+
"zalando"
913
],
1014
"tests": [
1115
]

l10n_CM/region/FR.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,4 +9,4 @@
99
],
1010
"tests": [
1111
]
12-
}
12+
}

l10n_CM/region/GB.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
{
22
"region": "GB",
33
"sites": [
4-
"ebay",
4+
"assos",
55
"demo",
6-
"peacocks",
7-
"whittard",
86
"diy",
9-
"assos"
7+
"ebay",
8+
"peacocks",
9+
"whittard"
1010
],
1111
"tests": [
1212
]

l10n_CM/region/IT.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
{
22
"region": "IT",
33
"sites": [
4-
"ebay",
54
"calvinklein",
6-
"tiffany",
7-
"euronics",
85
"douglas",
6+
"ebay",
7+
"euronics",
98
"thenorthface",
9+
"tiffany",
1010
"zalando"
1111
],
1212
"tests": [

l10n_CM/region/PL.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
{
22
"region": "PL",
33
"sites": [
4+
"ceneo",
5+
"cocolita",
46
"demo",
5-
"zalando",
67
"duka",
7-
"ceneo",
88
"tanie-leczenie",
9-
"cocolita"
9+
"zalando"
1010
],
1111
"tests": [
1212
]

0 commit comments

Comments
 (0)