mirror of
https://github.com/zjs81/meshcore-open.git
synced 2026-07-01 14:40:32 +10:00
Add path trace localizations for all languages
- Translate path trace strings to all 14 supported locales - Regenerate localization Dart files - Fix translate.py to also detect empty string values as missing
This commit is contained in:
+4
-1
@@ -466,7 +466,7 @@ def fmt_duration(seconds: float) -> str:
|
||||
|
||||
|
||||
def find_missing_keys(source_data: Dict[str, Any], target_data: Dict[str, Any]) -> List[str]:
|
||||
"""Find keys that are in source but not in target (excluding metadata keys)."""
|
||||
"""Find keys that are in source but not in target, or have empty values (excluding metadata keys)."""
|
||||
missing = []
|
||||
for key in source_data:
|
||||
if key == "@@locale":
|
||||
@@ -475,6 +475,9 @@ def find_missing_keys(source_data: Dict[str, Any], target_data: Dict[str, Any])
|
||||
continue
|
||||
if key not in target_data:
|
||||
missing.append(key)
|
||||
elif isinstance(target_data.get(key), str) and target_data[key].strip() == "":
|
||||
# Also include keys with empty string values
|
||||
missing.append(key)
|
||||
return missing
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user