Skip to content

Commit 8e02cd6

Browse files
committed
Update l10n.dart file template, and changelog and readme files
1 parent 21fbefd commit 8e02cd6

File tree

4 files changed

+8
-12
lines changed

4 files changed

+8
-12
lines changed

CHANGELOG.md

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,17 +5,15 @@ All notable changes to the "flutter-intl" extension will be documented in this f
55
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
66
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
77

8-
## 1.2.3 - 2020-03-30
8+
## 1.2.1 - 2020-03-30
99

10-
- Handle empty plural and gender forms
11-
12-
## 1.2.2 - 2020-03-30
10+
- Update order of supported locales
1311

1412
- Replace `dynamic` with concrete type for generated Dart methods
1513

16-
## 1.2.1 - 2020-03-29
14+
- Handle empty plural and gender forms
1715

18-
- Update order of supported locales
16+
- Update `l10n.dart` file template (remove `localeName`)
1917

2018
## 1.2.0 - 2020-03-16
2119

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ Dart package that creates a binding between your translations from .arb files an
44

55
## Usage
66

7-
You can use this package directly (ie for Continuous Integration tools or via CLI) or leave it to [Visual Studio Code](https://marketplace.visualstudio.com/items?itemName=localizely.flutter-intl) or [IntelliJ/Android Studio](https://plugins.jetbrains.com/plugin/13666-flutter-intl) plugins to run it automatically whenever you modify ARB files.
7+
You can use this package directly (i.e. for Continuous Integration tools or via CLI) or leave it to [Visual Studio Code](https://marketplace.visualstudio.com/items?itemName=localizely.flutter-intl) or [IntelliJ/Android Studio](https://plugins.jetbrains.com/plugin/13666-flutter-intl) plugins to run it automatically whenever you modify ARB files.
88

99
Follow these steps to get started:
1010

lib/src/templates.dart

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ import 'intl/messages_all.dart';
1414
// **************************************************************************
1515
1616
class $className {
17-
$className(this.localeName);
17+
$className();
1818
1919
static const AppLocalizationDelegate delegate =
2020
AppLocalizationDelegate();
@@ -24,16 +24,14 @@ class $className {
2424
final String localeName = Intl.canonicalizedLocale(name);
2525
return initializeMessages(localeName).then((_) {
2626
Intl.defaultLocale = localeName;
27-
return $className(localeName);
27+
return $className();
2828
});
2929
}
3030
3131
static $className of(BuildContext context) {
3232
return Localizations.of<$className>(context, $className);
3333
}
3434
35-
final String localeName;
36-
3735
${labels.map((label) => label.generateDartGetter()).join("\n\n")}
3836
}
3937

pubspec.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
name: intl_utils
22
description: intl_utils is a dart library that generates Dart localization code from ARB file. Generated code relies on Intl library.
3-
version: 1.2.3
3+
version: 1.2.1
44
homepage: https://pub.dev/packages/intl_utils
55

66
environment:

0 commit comments

Comments
 (0)