Skip to content

Commit 7fb8b23

Browse files
add docs
1 parent 96d176f commit 7fb8b23

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

choose_l10n_ci_set.py

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,12 @@
1313

1414

1515
def valid_l10n_mappings():
16+
"""
17+
Get a dictionary of valid l10n mappings by going through the region files.
18+
19+
Returns:
20+
The dictionary of valid l10n mappings.
21+
"""
1622
mapping = defaultdict(set)
1723
region_paths = [d for d in os.listdir("./l10n_CM/region/")]
1824
for region_path in region_paths:
@@ -39,6 +45,13 @@ def add_selected_mappings(mappings):
3945

4046

4147
def process_changed_file(f, selected_mappings):
48+
"""
49+
process the changed file to add the site/region mappings.
50+
51+
Args:
52+
f: the changed file.
53+
selected_mappings: the selected mappings dictionary (updated in place).
54+
"""
4255
split = f.split(SLASH)
4356
if f.startswith("l10n_CM/sites/") or f.startswith("l10n_CM/constants/"):
4457
# if constants or sites are changed, add a single site/region mapping entry.

0 commit comments

Comments
 (0)