Add translations for 6 languages (de, es, fr, ja, ko, pt-BR)
Translate 200 strings to German, Spanish, French, Japanese, Korean, and Brazilian Portuguese, bringing localization coverage from 35% to 95%. Also adds translation helper script for future localization work. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
29
scripts/analyze_translations.py
Normal file
29
scripts/analyze_translations.py
Normal file
@@ -0,0 +1,29 @@
|
||||
#!/usr/bin/env python3
|
||||
import json
|
||||
import sys
|
||||
|
||||
with open('/Users/treyt/Desktop/code/Feels/Feels/Localizable.xcstrings', 'r') as f:
|
||||
d = json.load(f)
|
||||
|
||||
strings = d.get('strings', {})
|
||||
|
||||
# Get strings that need translation
|
||||
missing = []
|
||||
for key, val in strings.items():
|
||||
if not key.strip():
|
||||
continue
|
||||
localizations = val.get('localizations', {})
|
||||
|
||||
# Check if German has a translation
|
||||
if 'de' not in localizations:
|
||||
missing.append(key)
|
||||
elif 'stringUnit' in localizations.get('de', {}):
|
||||
state = localizations['de']['stringUnit'].get('state', '')
|
||||
if state != 'translated':
|
||||
missing.append(key)
|
||||
|
||||
# Print all missing strings
|
||||
print("Missing translations:")
|
||||
for s in missing:
|
||||
print(repr(s))
|
||||
print(f'\nTotal missing: {len(missing)}')
|
||||
Reference in New Issue
Block a user