feat(i18n): add arb, json and yaml parsers

This commit is contained in:
2023-02-27 16:32:22 +01:00
parent 0a55df8638
commit 8a37aec127
17 changed files with 397 additions and 48 deletions
@@ -0,0 +1,13 @@
{
"@@locale": "en",
"youHavePushed": "You have pushed {count} times the bouton !",
"@youHavePushed": {
"placeholders": {
"count": {
"type": "int"
}
}
},
"btnAddFile": "Add file",
"btnAddFileCaption": "Max size: 20MB"
}
@@ -0,0 +1,8 @@
"@@locale": en
youHavePushed: You have pushed {count} times the bouton !
"@youHavePushed":
placeholders:
count:
type: int
btnAddFile: Add file
btnAddFileCaption: "Max size: 20MB"
+5 -1
View File
@@ -45,8 +45,12 @@ class App extends StatelessWidget {
const I18nRepository repository =
I18RepositoryImpl(dataSource: dataSource);
final test = (await repository.load('en')).ok;
print((await repository.load('fr')).err);
print(test?.locale);
print(test?.data);
print(test?.data['btnAddFile']);
return 'test';
}),