1.1 KiB
1.1 KiB
Contributing
Getting Started
- Fork and clone the repository
- Run
flutter pub getto install dependencies - Run
dart run build_runner buildto generate code - Start developing!
Development
- Follow Dart/Flutter conventions
- Run
flutter analyzebefore submitting - Test your changes thoroughly
Internationalization (i18n)
This project uses slang for internationalization with JSON files.
Adding New Strings
-
Add your string to
lib/i18n/strings.i18n.json:{ "section": { "myNewString": "My new text" } } -
Run
dart run slangto regenerate translation files -
Use in your code:
Text(t.section.myNewString)
Adding New Languages
- Create new JSON file:
lib/i18n/strings_[locale].i18n.json - Copy structure from
strings.i18n.jsonand translate values - Run
dart run slangto regenerate files
Guidelines
- Organize strings logically in nested objects
- Use camelCase for keys
- Keep strings concise and clear
- Always run
dart run slangafter changes