import re

def parse_translations_file(filepath):
    with open(filepath, 'r', encoding='utf-8') as f:
        content = f.read()
    
    # Let's find language maps like: "en": { ... }, "fr": { ... }
    # Look for patterns like "lang": { or 'lang': {
    pattern = re.compile(r'[\'"]([a-zA-Z\-]+)[\'"]\s*:\s*\{')
    matches = pattern.findall(content)
    return matches

print("Legacy translations.dart languages:")
print(parse_translations_file("scratch/legacy_translations.dart"))

print("\nLegacy driver_translations.dart languages:")
print(parse_translations_file("scratch/legacy_driver_translations.dart"))
