Flutter ARB Translation Helper
VS Code extension for managing translations in Flutter project
Features
- ✨ Quick fix provider for untranslated strings
- 🔄 Automatic ARB files update
- 🌐 English & Bahasa Indonesia support
- ⚡️ Auto runs
flutter gen-l10n
- 💡 Smart translation key suggestions
Requirements
- VS Code ^1.97.0
- Flutter project with ARB structure:
assets/
l10n/
talenta_en.arb
talenta_id.arb
Installation
- Download VSIX file
- Install via VS Code:
code --install-extension flutter-arb-localization-helper-0.0.1.vsix
Or via Command Palette:
Cmd+Shift+P
- Select "Install from VSIX"
- Choose downloaded VSIX
Usage
- Open Dart file in Flutter project
- Hover over untranslated string
- Click lightbulb (⚡) or
Cmd+.
- Select "Add Translation"
- Enter requested info:
- Translation key (e.g.
labelSubmit )
- English text
- Bahasa text
The extension will automatically:
- Update ARB files
- Run code generation
- Create translation classes
Example
Before:
Text('Submit'),
After:
Text(localizations.labelSubmit),
Updated ARB files:
// talenta_en.arb
{
"labelSubmit": "Submit"
}
// talenta_id.arb
{
"labelSubmit": "Kirim"
}
Development
- Clone repo
- Install deps:
npm install
- Run dev mode:
npm run watch
- Press F5 in VS Code to debug
Contributing
- Fork repo
- Create feature branch
git checkout -b feature/amazing-feature
- Commit changes
git commit -m 'Add amazing feature'
- Push branch
git push origin feature/amazing-feature
- Open Pull Request
License
MIT License. See LICENSE
Author
Your Name - @naufaldirfq
https://github.com/naufaldirfq/flutter-arb-localization-helper
| |