Skip to content

Commit 2e84518

Browse files
chore: update translations to support dynamic right side
1 parent 84af8a3 commit 2e84518

File tree

14 files changed

+17
-17
lines changed

14 files changed

+17
-17
lines changed

configurator/lib/src/configuration.dart

+1-1
Original file line numberDiff line numberDiff line change
@@ -170,7 +170,7 @@ class Configuration {
170170
0.0;
171171
}
172172

173-
Map<String, Map<String, String>> currentTranslations(String key) {
173+
Map<String, Map<String, dynamic>> currentTranslations(String key) {
174174
return _scopesSorted.reversed.firstWhereOrNull((s) {
175175
return s.translations.isNotEmpty && s.translations.containsKey(key);
176176
})?.translations ??

configurator/lib/src/scopes/proxy.dart

+1-1
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ class ProxyScope extends ConfigScope {
3939
Map<String, dynamic> textStyles;
4040

4141
@override
42-
Map<String, Map<String, String>> translations;
42+
Map<String, Map<String, dynamic>> translations;
4343

4444
ProxyScope({
4545
required this.name,

configurator/lib/src/scopes/scope.dart

+1-1
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ abstract class ConfigScope {
1818
final Map<String, double> radius = const {};
1919
final Map<String, dynamic> textStyles = const {};
2020
final Map<int, String?> routes = const {};
21-
final Map<String, Map<String, String>> translations = const {};
21+
final Map<String, Map<String, dynamic>> translations = const {};
2222

2323
static ConfigScope empty({required String name}) {
2424
return ProxyScope(name: name);

configurator/lib/src/writers/configuration_writer.dart

+1-1
Original file line numberDiff line numberDiff line change
@@ -286,7 +286,7 @@ class ConfigWriter extends Writer {
286286
),
287287
_valueGetter(
288288
name: 'translations',
289-
returnType: 'Map<String, Map<String, String>>',
289+
returnType: 'Map<String, Map<String, dynamic>>',
290290
assignment: Code(() {
291291
var data = jsonEncode(translations).replaceAll(r'\\', r'\');
292292

configurator/pubspec.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
name: configurator
22
description: A new Flutter package project.
3-
version: 1.0.5
3+
version: 1.0.6
44
homepage:
55

66
environment:

configurator/test/assets/act/personal_account_type/src/config/personal_account_type.config.dart

+1-1
Original file line numberDiff line numberDiff line change
@@ -218,7 +218,7 @@ class GeneratedPersonalAccountType extends ConfigScope {
218218
final Map<int, String> routes = const {};
219219

220220
@override
221-
final Map<String, Map<String, String>> translations = const {};
221+
final Map<String, Map<String, dynamic>> translations = const {};
222222
}
223223

224224
// ********************************

configurator/test/assets/act/personal_getting_started/src/config/personal_getting_started.config.dart

+1-1
Original file line numberDiff line numberDiff line change
@@ -234,7 +234,7 @@ class GeneratedPersonalGettingStarted extends ConfigScope {
234234
final Map<int, String> routes = const {};
235235

236236
@override
237-
final Map<String, Map<String, String>> translations = const {};
237+
final Map<String, Map<String, dynamic>> translations = const {};
238238
}
239239

240240
// ********************************

configurator/test/assets/act/storefront/src/config/store_front.config.dart

+1-1
Original file line numberDiff line numberDiff line change
@@ -367,7 +367,7 @@ class GeneratedStoreFrontScope extends ConfigScope {
367367
};
368368

369369
@override
370-
final Map<String, Map<String, String>> translations = const {};
370+
final Map<String, Map<String, dynamic>> translations = const {};
371371
}
372372

373373
// ********************************

configurator/test/assets/parts/base.config.dart

+1-1
Original file line numberDiff line numberDiff line change
@@ -213,7 +213,7 @@ class GeneratedBaseScope extends ConfigScope {
213213
final Map<int, String> routes = const {};
214214

215215
@override
216-
final Map<String, Map<String, String>> translations = const {};
216+
final Map<String, Map<String, dynamic>> translations = const {};
217217
}
218218

219219
// ********************************

configurator/test/assets/test_1.config.dart

+1-1
Original file line numberDiff line numberDiff line change
@@ -325,7 +325,7 @@ class GeneratedAppScope extends ConfigScope {
325325
final Map<int, String> routes = const {1: '/master', 4: 'test'};
326326

327327
@override
328-
final Map<String, Map<String, String>> translations = const {};
328+
final Map<String, Map<String, dynamic>> translations = const {};
329329
}
330330

331331
// ********************************

configurator/test/assets/test_1_array.config.dart

+1-1
Original file line numberDiff line numberDiff line change
@@ -226,7 +226,7 @@ class GeneratedImageArray extends ConfigScope {
226226
final Map<int, String> routes = const {1: '/master', 4: 'test'};
227227

228228
@override
229-
final Map<String, Map<String, String>> translations = const {};
229+
final Map<String, Map<String, dynamic>> translations = const {};
230230
}
231231

232232
// ********************************

configurator_flutter/.flutter-plugins

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# This is a generated file; do not edit or check into version control.
2-
path_provider=/Users/cgiuliani/.pub-cache/hosted/pub.dev/path_provider-2.1.2/
3-
path_provider_android=/Users/cgiuliani/.pub-cache/hosted/pub.dev/path_provider_android-2.2.2/
4-
path_provider_foundation=/Users/cgiuliani/.pub-cache/hosted/pub.dev/path_provider_foundation-2.3.2/
2+
path_provider=/Users/cgiuliani/.pub-cache/hosted/pub.dev/path_provider-2.1.3/
3+
path_provider_android=/Users/cgiuliani/.pub-cache/hosted/pub.dev/path_provider_android-2.2.4/
4+
path_provider_foundation=/Users/cgiuliani/.pub-cache/hosted/pub.dev/path_provider_foundation-2.4.0/
55
path_provider_linux=/Users/cgiuliani/.pub-cache/hosted/pub.dev/path_provider_linux-2.2.1/
66
path_provider_windows=/Users/cgiuliani/.pub-cache/hosted/pub.dev/path_provider_windows-2.2.1/
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
{"info":"This is a generated file; do not edit or check into version control.","plugins":{"ios":[{"name":"path_provider_foundation","path":"/Users/cgiuliani/.pub-cache/hosted/pub.dev/path_provider_foundation-2.3.2/","shared_darwin_source":true,"native_build":true,"dependencies":[]}],"android":[{"name":"path_provider_android","path":"/Users/cgiuliani/.pub-cache/hosted/pub.dev/path_provider_android-2.2.2/","native_build":true,"dependencies":[]}],"macos":[{"name":"path_provider_foundation","path":"/Users/cgiuliani/.pub-cache/hosted/pub.dev/path_provider_foundation-2.3.2/","shared_darwin_source":true,"native_build":true,"dependencies":[]}],"linux":[{"name":"path_provider_linux","path":"/Users/cgiuliani/.pub-cache/hosted/pub.dev/path_provider_linux-2.2.1/","native_build":false,"dependencies":[]}],"windows":[{"name":"path_provider_windows","path":"/Users/cgiuliani/.pub-cache/hosted/pub.dev/path_provider_windows-2.2.1/","native_build":false,"dependencies":[]}],"web":[]},"dependencyGraph":[{"name":"path_provider","dependencies":["path_provider_android","path_provider_foundation","path_provider_linux","path_provider_windows"]},{"name":"path_provider_android","dependencies":[]},{"name":"path_provider_foundation","dependencies":[]},{"name":"path_provider_linux","dependencies":[]},{"name":"path_provider_windows","dependencies":[]}],"date_created":"2024-02-19 15:19:46.328290","version":"3.19.0"}
1+
{"info":"This is a generated file; do not edit or check into version control.","plugins":{"ios":[{"name":"path_provider_foundation","path":"/Users/cgiuliani/.pub-cache/hosted/pub.dev/path_provider_foundation-2.4.0/","shared_darwin_source":true,"native_build":true,"dependencies":[]}],"android":[{"name":"path_provider_android","path":"/Users/cgiuliani/.pub-cache/hosted/pub.dev/path_provider_android-2.2.4/","native_build":true,"dependencies":[]}],"macos":[{"name":"path_provider_foundation","path":"/Users/cgiuliani/.pub-cache/hosted/pub.dev/path_provider_foundation-2.4.0/","shared_darwin_source":true,"native_build":true,"dependencies":[]}],"linux":[{"name":"path_provider_linux","path":"/Users/cgiuliani/.pub-cache/hosted/pub.dev/path_provider_linux-2.2.1/","native_build":false,"dependencies":[]}],"windows":[{"name":"path_provider_windows","path":"/Users/cgiuliani/.pub-cache/hosted/pub.dev/path_provider_windows-2.2.1/","native_build":false,"dependencies":[]}],"web":[]},"dependencyGraph":[{"name":"path_provider","dependencies":["path_provider_android","path_provider_foundation","path_provider_linux","path_provider_windows"]},{"name":"path_provider_android","dependencies":[]},{"name":"path_provider_foundation","dependencies":[]},{"name":"path_provider_linux","dependencies":[]},{"name":"path_provider_windows","dependencies":[]}],"date_created":"2024-05-22 13:10:35.167200","version":"3.19.0"}

configurator_flutter/pubspec.yaml

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
name: configurator_flutter
22
description: A new Flutter package project.
3-
version: 1.0.5
3+
version: 1.0.6
44
homepage:
55

66
environment:
@@ -31,7 +31,7 @@ dependencies:
3131
git:
3232
url: [email protected]:camrongiuliani/configurator.git
3333
path: configurator
34-
ref: 1.0.5
34+
ref: 1.0.6
3535

3636
dev_dependencies:
3737
flutter_test:

0 commit comments

Comments
 (0)