-
Notifications
You must be signed in to change notification settings - Fork 23
Translation Workflow
Sky Blu edited this page Jan 25, 2022
·
11 revisions
- Open
lib/l10n/app_en.arb
. - Add a new key. For example (and see more examples):
"helloWorld": "Hello, world!"
- Rebuild or restart the app (to regenerate files in
.dart_tool/flutter_gen/gen_l10n/
).
- IMPORTANT: use
Debug Anyway
to ignore errors and force file regeneration
- Use the new key in code. For example:
import 'package:flutter_gen/gen_l10n/app_localizations.dart';
..
final localization = AppLocalizations.of(context)!;
..
title: localization.helloWorld,
- Make and merge a PR against
master
. - Merge
master
intoweblate
to automatically update the Weblate repo.
- Go to https://translate.hypha.earth/projects/seeds-light-wallet/flutter-app/.
- Click
Language > Translate
. - Translate strings.
- Weblate will periodically push changes to the
weblate
branch. - Periodically create a PR from the Weblate push branch against
master
.