feat(i18n): add ICU parser
This commit is contained in:
@@ -43,14 +43,30 @@ class App extends StatelessWidget {
|
||||
// test
|
||||
const I18nDataSource dataSource = AssetsFileDataSourceImpl();
|
||||
|
||||
const I18nRepository repository =
|
||||
I18RepositoryImpl(dataSource: dataSource);
|
||||
|
||||
final test = (await repository.load('en')).ok;
|
||||
final I18nRepository repository =
|
||||
I18nRepositoryImpl(dataSource: dataSource);
|
||||
|
||||
print(test?.locale);
|
||||
print(test?.data);
|
||||
print(test?.data['btnAddFile']);
|
||||
final test1 = (await repository.load(locale: 'en')).ok;
|
||||
// final test2 = (await repository.loadFrom(
|
||||
// Uri.parse('assets/i18n.en.yaml'),
|
||||
// parser: const YamlParser(),
|
||||
// ))
|
||||
// .ok;
|
||||
|
||||
// print(test1?.locale);
|
||||
// print(test1?.data);
|
||||
// print(test1?.data['btnAddFile']);
|
||||
|
||||
final text = repository.get('youHavePushed', {
|
||||
'count': 8,
|
||||
});
|
||||
|
||||
print(text.ok);
|
||||
|
||||
|
||||
// print(test2?.locale);
|
||||
// print(test2?.data);
|
||||
// print(test2?.data['btnAddFile']);
|
||||
|
||||
return 'test';
|
||||
}),
|
||||
|
||||
Reference in New Issue
Block a user