Skip to content

Commit dc75eb7

Browse files
changes to choose_ci_set_l10n
1 parent 8c373e5 commit dc75eb7

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

.github/workflows/l10n.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -281,7 +281,6 @@ jobs:
281281
$env:FX_EXECUTABLE = 'C:\Program Files\Custom Firefox\firefox.exe'
282282
Start-Process -FilePath $env:FX_EXECUTABLE -ArgumentList "--version" -Wait -NoNewWindow
283283
pipenv run python choose_l10n_ci_set.py
284-
cat selected_l10n_mappings
285284
"0" | Set-Content -Path "TEST_EXIT_CODE"
286285
$SCRIPT_EXIT_CODE = 0
287286
Get-Content "selected_l10n_mappings" | ForEach-Object {

choose_l10n_ci_set.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,15 +53,18 @@ def process_changed_file(f, selected_mappings):
5353
selected_mappings: the selected mappings dictionary (updated in place).
5454
"""
5555
split = f.split(SLASH)
56-
if f.startswith("l10n_CM/sites/") or f.startswith("l10n_CM/constants/"):
56+
57+
if f.startswith(os.path.join("l10n_CM", "sites")) or f.startswith(
58+
os.path.join("l10n_CM", "constants")
59+
):
5760
# if constants or sites are changed, add a single site/region mapping entry.
5861
site = split[2]
5962
region = split[3]
6063
region_path = os.path.join("l10n_CM", "region", f"{region}.json")
6164
# make sure the region mapping file exists before adding the mapping
6265
if os.path.exists(region_path):
6366
selected_mappings[site].add(region)
64-
elif f.startswith("l10n_CM/region/"):
67+
elif f.startswith(os.path.join("l10n_CM", "region")):
6568
# if a region file is changed, add the region to each site mapping.
6669
region = split[-1].split(".")[0]
6770
with open(f, "r+") as f:

0 commit comments

Comments
 (0)