-
-
Notifications
You must be signed in to change notification settings - Fork 68
Open
Description
The ConvertVars class in scripts/convert.py uses hardcoded lists to define valid languages and versions:
LANGUAGE_CHOICES = ["all", "en", "es", ...]
VERSION_CHOICES = ["all", "latest", "1.0", "1.1", ...]
This creates several issues:
- Manual maintenance required whenever a new language or version is added.
- Risk of inconsistency if new files are added to source/ but not reflected in the script.
- Low discoverability, as contributors may not realize the script must also be updated.
Proposed Solution
- Refactor ConvertVars to dynamically detect available editions, versions, and languages at runtime by scanning project directories.
Requirements
- Scan source/ directory for .yaml files.
- Extract metadata from filenames (edition-layout-version-language pattern) or from YAML meta blocks.
- Populate choice lists dynamically during class initialization.
- Preserve special logic for all and latest.
Files Involved
- scripts/convert.py (specifically the ConvertVars class)
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels