You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We're experiencing issues with localizations in DoiWallet where translations are either lost or missing after changes, particularly in files like /loc/de_de.json. We need an automated solution to manage and maintain our localizations.
Proposed Solution
Implement a GitHub Action that monitors and manages localizations automatically.
Workflow Overview
Monitor changes in base localization files (en.json and de_de.json)
Compare all other localization files against these base files
Automatically identify missing or obsolete translations
Use AI translation API to generate missing translations
Create PR with suggested updates
Technical Implementation Draft
name: Localization Syncon:
push:
paths:
'loc/en.json''loc/de_de.json'branches:
maindevelopjobs:
sync-localizations:
runs-on: ubuntu-lateststeps:
uses: actions/checkout@v3name: Set up Node.jsuses: actions/setup-node@v3with:
node-version: '18'name: Install dependenciesrun: npm installname: Run localization syncenv:
AI_TRANSLATION_API_KEY: ${{ secrets.AI_TRANSLATION_API_KEY }}run: node scripts/sync-localizations.js```javascriptmembersThis issue template provides a comprehensive overview of the problem and a proposed solution with technical implementation details. It can be customized further based on specific project needs and requirements.
Required Components
Base Script (scripts/sync-localizations.js)
asyncfunctionsyncLocalizations(){// 1. Load base files (en.json and de_de.json)constenglishBase=require('../loc/en.json');constgermanBase=require('../loc/de_de.json');// 2. Get all localization filesconstlocFiles=fs.readdirSync('../loc');// 3. For each localization file:// - Compare against base files// - Identify missing keys// - Request AI translations for missing entries// - Update files// 4. Create PR with changes if needed}
Translation Service Integration
Integration with OpenAI API or similar for automated translations
Quality assurance checks for generated translations
Fallback mechanisms for failed translations
Reporting System
Generate reports of missing translations
List of automated translations added
Statistics on translation coverage
Success Criteria
No manual intervention required for basic translation updates
All localization files maintain consistent structure
Missing translations are automatically added
Obsolete translations are identified and removed
Translation quality meets minimum standards
Clear reporting of changes made
Notes
Need to decide on preferred AI translation service
Consider rate limits and costs of translation API
May need human review process for critical translations
Consider implementing translation memory to reduce API calls
Description
We're experiencing issues with localizations in DoiWallet where translations are either lost or missing after changes, particularly in files like
/loc/de_de.json. We need an automated solution to manage and maintain our localizations.Proposed Solution
Implement a GitHub Action that monitors and manages localizations automatically.
Workflow Overview
Technical Implementation Draft
Required Components
Base Script (
scripts/sync-localizations.js)Translation Service Integration
Reporting System
Success Criteria
Notes
Labels
/cc @relevant-team-members