Skip to content

Commit

Permalink
Merge pull request #33 from icapps/feature/#31-documentation
Browse files Browse the repository at this point in the history
#31: version bump locale_gen
  • Loading branch information
NicolaVerbeeck authored Mar 30, 2021
2 parents e1f0431 + f41c91b commit 4dca4a4
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 6 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
# Changelog
## [4.2.0] - 2021-03-30
### Added
- Version bump to locale_gen 3.2.0

## [4.1.0] - 2021-03-26
### Added
-#30 Support for skipping a locale at runtime. example: only use dutch in alpha but not in beta & production (locale_gen)
Expand Down
15 changes: 14 additions & 1 deletion bin/src/params.dart
Original file line number Diff line number Diff line change
@@ -1,13 +1,26 @@
import 'dart:io';

import 'package:locale_gen/locale_gen.dart';
import 'package:path/path.dart';

class Params extends LocaleGenParams {
static const ENV_API_KEY = 'API_KEY_ICAPPS_TRANSLATIONS';

String? apiKey;

Params(String programName) : super(programName);
factory Params(String programName) {
final pubspecYaml = File(join(Directory.current.path, 'pubspec.yaml'));
if (!pubspecYaml.existsSync()) {
throw Exception(
'This program should be run from the root of a flutter/dart project');
}

final pubspecContent = pubspecYaml.readAsStringSync();
return Params.fromYamlString(programName, pubspecContent);
}

Params.fromYamlString(String programName, String pubspecContent)
: super.fromYamlString(programName, pubspecContent);

@override
void configure(config) {
Expand Down
7 changes: 3 additions & 4 deletions pubspec.yaml
Original file line number Diff line number Diff line change
@@ -1,16 +1,15 @@
name: icapps_translations
description: Dart tool to generate flutter translations code from the icapps translations tool
version: 4.1.0
version: 4.2.0
homepage: https://github.com/icapps/flutter-icapps-translations

environment:
sdk: ">=2.12.0 <3.0.0"

dependencies:
http: ^0.13.1
locale_gen: ^3.1.0
locale_gen: ^3.2.0
path: ^1.8.0

dev_dependencies:
flutter_test:
sdk: flutter
test: ^1.16.8
2 changes: 1 addition & 1 deletion test/icapps_translations_test.dart
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import 'package:flutter_test/flutter_test.dart';
import 'package:test/test.dart';

void main() {
group('Empty test', () {
Expand Down

0 comments on commit 4dca4a4

Please sign in to comment.