Skip to content

Commit

Permalink
Only extract variants names that are tagged for translation
Browse files Browse the repository at this point in the history
  • Loading branch information
wawanbreton committed Nov 6, 2024
1 parent 59eac3e commit cf392bb
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion recipes/translationextractor/all/conanfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -129,8 +129,17 @@ def _extract_variants_names(self, setting_json_data: List[tuple[Path, dict[str,
for _, setting_dict in setting_json_data:
if "metadata" in setting_dict:
setting_metadata = setting_dict["metadata"]

variants_name = None
if "variants_name" in setting_metadata:
variants_names.add(setting_metadata["variants_name"])
variants_name = setting_metadata["variants_name"]

variants_name_has_translation = None
if "variants_name_has_translation" in setting_metadata:
variants_name_has_translation = setting_metadata["variants_name_has_translation"]

if variants_name is not None and variants_name_has_translation == True:
variants_names.add(variants_name)

return variants_names

Expand Down

0 comments on commit cf392bb

Please sign in to comment.