This repository has been moved: https://git.openprivacy.ca/cwtch.im/cwtch-ui
Go to file
Sarah Jamie Lewis 3e8a838aa7 Merge pull request 'contact wiring for newpeer' (#10) from erinnplods into newPeer
Reviewed-on: #10
2021-03-01 14:25:50 -08:00
android minor updates to contact wiring 2021-02-10 13:04:49 -08:00
assets erinndev 2021-01-21 12:37:35 -08:00
integration_test Initial Prototype...loading profiles and contacts 2021-01-06 15:09:58 -08:00
ios Initial Prototype...loading profiles and contacts 2021-01-06 15:09:58 -08:00
lib changing l10n keys 2021-02-25 18:36:43 -08:00
linux ffi respond to NewPeer event 2021-02-05 16:32:35 -08:00
test slowly massaging things into new state model 2021-02-03 03:22:25 -08:00
.gitignore Initial Prototype...loading profiles and contacts 2021-01-06 15:09:58 -08:00
.metadata Initial Prototype...loading profiles and contacts 2021-01-06 15:09:58 -08:00
ARCH.md Theme switching with ChangeProvider 2021-01-27 12:21:36 -08:00
README.md move existing strings to l10n 2021-02-25 15:33:15 -08:00
l10n.yaml translations wip 2021-02-22 18:55:10 -08:00
pubspec.lock translations wip 2021-02-22 18:55:10 -08:00
pubspec.yaml translations wip 2021-02-22 18:55:10 -08:00
regenerate_opaque_theme.sh erinndev 2021-01-21 12:37:35 -08:00

README.md

flwtch

A new Flutter application.

Getting Started

click the play button in android studio

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.