File tree Expand file tree Collapse file tree 1 file changed +13
-0
lines changed Expand file tree Collapse file tree 1 file changed +13
-0
lines changed Original file line number Diff line number Diff line change 13
13
14
14
15
15
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
+ """
16
22
mapping = defaultdict (set )
17
23
region_paths = [d for d in os .listdir ("./l10n_CM/region/" )]
18
24
for region_path in region_paths :
@@ -39,6 +45,13 @@ def add_selected_mappings(mappings):
39
45
40
46
41
47
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
+ """
42
55
split = f .split (SLASH )
43
56
if f .startswith ("l10n_CM/sites/" ) or f .startswith ("l10n_CM/constants/" ):
44
57
# if constants or sites are changed, add a single site/region mapping entry.
You can’t perform that action at this time.
0 commit comments