Update: 2026-06-13 00:57:17
This commit is contained in:
17
scratch/analyze_driver_translations.py
Normal file
17
scratch/analyze_driver_translations.py
Normal file
@@ -0,0 +1,17 @@
|
||||
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"))
|
||||
Reference in New Issue
Block a user