Skip to content

Commit

Permalink
2.0.4 fix
Browse files Browse the repository at this point in the history
  • Loading branch information
Victor Kachalov committed Nov 18, 2020
1 parent c49bb60 commit 9747e44
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 4 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
## [2.0.4] - 18.11.2020

* Race condition fixed

## [2.0.3] - 18.11.2020

* Documentation improved
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ String extensions for localization and a translation utility
- Add this to your package's pubspec.yaml file:
``` Dart
dependencies:
localized: ^2.0.3
localized: ^2.0.4
```
- Get dependencies

Expand Down
6 changes: 4 additions & 2 deletions bin/main.dart
Original file line number Diff line number Diff line change
Expand Up @@ -498,14 +498,16 @@ bool _isSupported(String locale) => kSupportedLanguages.contains(locale);
/// Also check for [langCodes]. Will exit with code [0] if no
/// lang codes were found.
///
void _createLocalizedFiles(List<String> langCodes, String dirPath) {
Future<void> _createLocalizedFiles(
List<String> langCodes, String dirPath) async {
if (langCodes.isEmpty) {
stdout.writeln(
'To create files you need to provide at least one language code. Exiting...');
exit(0);
}
final directory = Directory(dirPath);
!directory.existsSync()
final exists = await directory.exists();
!exists
? _createContent(directory, langCodes, dirPath)
: _rewrite(directory, langCodes, dirPath);
}
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: localized
description: String extensions for different localizations and a translation utility without additional efforts.
version: 2.0.3
version: 2.0.4
homepage: https://github.com/VictorKachalov/localized

environment:
Expand Down

0 comments on commit 9747e44

Please sign in to comment.