feat(i18n): add arb, json and yaml parsers
This commit is contained in:
@@ -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"
|
||||
@@ -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';
|
||||
}),
|
||||
|
||||
Reference in New Issue
Block a user