|
1 year ago | |
---|---|---|
android | 1 year ago | |
assets | 1 year ago | |
integration_test | 1 year ago | |
ios | 2 years ago | |
lib | 1 year ago | |
linux | 1 year ago | |
test | 1 year ago | |
test_driver | 1 year ago | |
windows | 1 year ago | |
.drone.yml | 1 year ago | |
.gitignore | 1 year ago | |
.metadata | 2 years ago | |
ARCH.md | 1 year ago | |
LIBCWTCH-GO.version | 1 year ago | |
README.md | 1 year ago | |
SPEC.md | 1 year ago | |
fetch-libcwtch-go.ps1 | 1 year ago | |
fetch-libcwtch-go.sh | 1 year ago | |
l10n.yaml | 1 year ago | |
pubspec.lock | 1 year ago | |
pubspec.yaml | 1 year ago | |
regenerate_opaque_theme.sh | 1 year ago |
README.md
flwtch
A new Flutter application.
Getting Started
click the play button in android studio
Linux
- libCwtch-go: the result of
make linux
,libCwtch.so
should be in the link path tor
should be in the PATH
Windows
- libCwtch-go: the result of
make windows
,libCwtch.dll
should be placed in the source root - tor is bundled in
windors/Tor
l10n
Adding a new string
Strings are managed directly from our Lokalise(url?) project. Keys should be valid Dart variable names in lowerCamelCase. After adding a new key and providing/obtaining translations for it, follow the next step to update your local copy.
Updating translations
Only Open Privacy staff members can update translations automatically:
flutter pub run flutter_lokalise download -v --api-token "<X>" --project-id "<Y>"
This will download a bundle of translations from Lokalise and convert it to resource files in lib/l10n/intl_*.arb
.
The next time Flwtch is built, Flutter will notice the changes and update app_localizations.dart
accordingly (thanks to generate:true
in pubspec.yaml
).
Using a string
Any widget underneath the main MaterialApp should be able to:
import 'package:flutter_gen/gen_l10n/app_localizations.dart';
and then use:
Text(AppLocalizations.of(context).stringIdentifer),
Configuration
API tokens are only available to Open Privacy staff at this time, who will perform the translation updates for you as part of merging your PRs.
With generate: true
in pubspec.yaml
, the Flutter build process checks l10n.yaml
for input/output filenames.