Skip to content

Commit

Permalink
docs: add submit translations guide
Browse files Browse the repository at this point in the history
  • Loading branch information
KRTirtho committed Aug 26, 2023
1 parent 067629e commit 5378571
Showing 1 changed file with 19 additions and 0 deletions.
19 changes: 19 additions & 0 deletions CONTRIBUTION.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ All types of contributions are encouraged and valued. See the [Table of Contents
- [Before Submitting an Enhancement](#before-submitting-an-enhancement)
- [How Do I Submit a Good Enhancement Suggestion?](#how-do-i-submit-a-good-enhancement-suggestion)
- [Your First Code Contribution](#your-first-code-contribution)
- [Submit translations](#submit-translations)

## Code of Conduct

Expand Down Expand Up @@ -145,3 +146,21 @@ Do the following:
```

Do debugging/testing/build etc then submit to us with PR against the development branch (master) & we'll review your code
### Submit Translations
Make sure you're familiar with [Flutter localization](https://docs.flutter.dev/ui/accessibility-and-localization/internationalization). Then, you can start translating the app by following these steps:

- Do all the steps in [Your First Code Contribution](#your-first-code-contribution)
- Make sure application starts in debug mode
- Now, in `lib/l10n/app_<2-letter code of your language>.arb` (create if not exists) add necessary translations
> (You can follow the `lib/l10n/app_en.arb` for reference)
- If you're adding missing translations, you can check the `/untranslated_messages.json` file to see which messages are missing in your native locale
- If you added entirely new translations:
- Add `const Locale('<2-letter language code>', '<2-letter ISO country code>')` in `lib/l10n/l10n.dart`'s `static final all = [...]` variable
- Uncomment the Map entry of your locale from `lib/collections/language_codes.dart`'s `static final Map isoLangs = {` variable
- Now restart (hot restart if running already) the app in debug mode & go to "Settings" > "Language" & see if your locale shows up
- If it does, select it & see if the app is translated properly
- Now git commit the changes & push
- Finally, submit a PR against the development branch (dev) & we'll review your code

0 comments on commit 5378571

Please sign in to comment.