Skip to content

Commit

Permalink
feat: prepare next release
Browse files Browse the repository at this point in the history
  • Loading branch information
Tienisto committed Oct 30, 2020
1 parent 611d59e commit 0f07a3b
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 5 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
## 1.8.1

- Hotfix: possible NPE error when calling LocaleSettings.useDeviceLocale or LocaleSettings.setLocale

## 1.8.0

- New advanced mode: final t = Translations.of(context)
Expand Down
9 changes: 7 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ Lightweight i18n solution. Use JSON files to create typesafe translations.

```yaml
dependencies:
fast_i18n: ^1.8.0
fast_i18n: ^1.8.1

dev_dependencies:
build_runner: any
Expand Down Expand Up @@ -103,6 +103,7 @@ String translated = t.hello(name: 'Tom');
Text(t.login.success)
// advanced
TranslationProvider(child: MyApp()); // wrap your app with the TranslationProvider
final t = Translations.of(context); // reacts on locale changes
String translateAdvanced = t.hello(name: 'Tom');
```
Expand All @@ -111,7 +112,11 @@ String translateAdvanced = t.hello(name: 'Tom');

When the dart code has been generated, you will see some useful classes and functions

`t` - the most important translate variable
`t` - the translate variable for simple translations

`Translations.of(context)` - translations which reacts to locale changes

`TranslationProvider` - App wrapper, used for `Translations.of(context)`

`LocaleSettings.useDeviceLocale()` - use the locale of the device

Expand Down
9 changes: 7 additions & 2 deletions example/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

```yaml
dependencies:
fast_i18n: ^1.8.0
fast_i18n: ^1.8.1

dev_dependencies:
build_runner: any
Expand Down Expand Up @@ -97,6 +97,7 @@ String translated = t.hello(name: 'Tom');
Text(t.login.success)
// advanced
TranslationProvider(child: MyApp()); // wrap your app with the TranslationProvider
final t = Translations.of(context); // reacts on locale changes
String translateAdvanced = t.hello(name: 'Tom');
```
Expand All @@ -105,7 +106,11 @@ String translateAdvanced = t.hello(name: 'Tom');

When the dart code has been generated, you will see some useful classes and functions

`t` - the most important translate variable
`t` - the translate variable for simple translations

`Translations.of(context)` - translations which reacts to locale changes

`TranslationProvider` - App wrapper, used for `Translations.of(context)`

`LocaleSettings.useDeviceLocale()` - use the locale of the device

Expand Down
2 changes: 1 addition & 1 deletion pubspec.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: fast_i18n
description: Lightweight i18n solution. Use JSON files to create typesafe translations.
version: 1.8.0
version: 1.8.1
homepage: https://github.com/Tienisto/flutter-fast-i18n

environment:
Expand Down

0 comments on commit 0f07a3b

Please sign in to comment.