Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion choose_l10n_beta_split.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,10 @@ def distribute_mappings_evenly(mappings):
loads[min_idx] += len(regions)
for i in range(len(balanced_splits)):
logging.info(f"Beta split: {i}")
current_split = [f"{site} {' '.join(regions)}" for site, regions in balanced_splits[i].items()]
current_split = [
f"{site} {' '.join(regions)}"
for site, regions in balanced_splits[i].items()
]
logging.info(f"{'\n'.join(current_split)}")
return balanced_splits

Expand Down
15 changes: 13 additions & 2 deletions choose_l10n_ci_set.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,19 @@ def valid_l10n_mappings():
if region_file.get("sites"):
for site in region_file.get("sites"):
report_mapping = True
if site != "demo" and os.path.exists(f"./l10n_CM/constants/{site}/{region}"):
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:
if site != "demo" and os.path.exists(
f"./l10n_CM/constants/{site}/{region}"
):
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,
):
ad = json.load(ad_file)
cc = json.load(cc_file)
if ad.get("skip") and cc.get("skip"):
Expand Down
4 changes: 2 additions & 2 deletions l10n_CM/region/AT.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@
"region": "AT",
"sites": [
"demo",
"giesswein",
"holzkern",
"ebay",
"giesswein",
"hofer",
"holzkern",
"mediamarkt"
],
"tests": [
Expand Down
8 changes: 4 additions & 4 deletions l10n_CM/region/BE.json
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
{
"region": "BE",
"sites": [
"brico",
"demo",
"torfs",
"standaardboekhandel",
"douglas",
"brico",
"toychamp"
"standaardboekhandel",
"toychamp",
"torfs"
],
"tests": [
]
Expand Down
12 changes: 7 additions & 5 deletions l10n_CM/region/CA.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,17 @@
"region": "CA",
"sites": [
"amazon",
"walmart",
"burtsbees",
"calvinklein",
"canadatire",
"demo",
"ebay",
"etsy",
"gapcanada",
"movieposters",
"newbalance",
"canadatire",
"ebay",
"burtsbees",
"staples",
"gapcanada"
"walmart"
],
"tests": [
]
Expand Down
8 changes: 6 additions & 2 deletions l10n_CM/region/DE.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,14 @@
"region": "DE",
"sites": [
"amazon",
"mediamarkt",
"bijoubrigitte",
"demo",
"ebay",
"justspices",
"bijoubrigitte"
"mediamarkt",
"newbalance",
"thomann",
"zalando"
],
"tests": [
]
Expand Down
2 changes: 1 addition & 1 deletion l10n_CM/region/FR.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,4 @@
],
"tests": [
]
}
}
8 changes: 4 additions & 4 deletions l10n_CM/region/GB.json
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
{
"region": "GB",
"sites": [
"ebay",
"assos",
"demo",
"peacocks",
"whittard",
"diy",
"assos"
"ebay",
"peacocks",
"whittard"
],
"tests": [
]
Expand Down
6 changes: 3 additions & 3 deletions l10n_CM/region/IT.json
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
{
"region": "IT",
"sites": [
"ebay",
"calvinklein",
"tiffany",
"euronics",
"douglas",
"ebay",
"euronics",
"thenorthface",
"tiffany",
"zalando"
],
"tests": [
Expand Down
6 changes: 3 additions & 3 deletions l10n_CM/region/PL.json
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
{
"region": "PL",
"sites": [
"ceneo",
"cocolita",
"demo",
"zalando",
"duka",
"ceneo",
"tanie-leczenie",
"cocolita"
"zalando"
],
"tests": [
]
Expand Down
12 changes: 6 additions & 6 deletions l10n_CM/region/US.json
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
{
"region": "US",
"sites": [
"aldoshoes",
"amazon",
"walmart",
"lowes",
"etsy",
"calvinklein",
"apple",
"bestbuy",
"calvinklein",
"demo",
"etsy",
"lowes",
"newegg",
"aldoshoes",
"apple",
"walmart",
"wish"
],
"tests": []
Expand Down
2 changes: 1 addition & 1 deletion l10n_CM/run_l10n.py
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@
"yellowkorner",
"zalando",
"zara",
"zooplus"
"zooplus",
}

loaded_valid_sites = valid_l10n_mappings().keys()
Expand Down
Loading