diff --git a/pkgs/messages/example/lib/messages.g.dart b/pkgs/messages/example/lib/messages.g.dart index b7352bf8..bdb1d9da 100644 --- a/pkgs/messages/example/lib/messages.g.dart +++ b/pkgs/messages/example/lib/messages.g.dart @@ -36,8 +36,8 @@ class AboutPageMessages { final Map _messages = {}; static const _dataFiles = { - 'fr': ('package:example/assets/testarbctx2_fr.arb.json', '390XWry3'), - 'en': ('package:example/assets/testarbctx2.arb.json', 'QrwRSsOy') + 'en': ('package:example/assets/testarbctx2.arb.json', 'QrwRSsOy'), + 'fr': ('package:example/assets/testarbctx2_fr.arb.json', '390XWry3') }; String get currentLocale => _currentLocale; diff --git a/pkgs/messages_builder/lib/builder.dart b/pkgs/messages_builder/lib/builder.dart index 9e368914..da01f37a 100644 --- a/pkgs/messages_builder/lib/builder.dart +++ b/pkgs/messages_builder/lib/builder.dart @@ -77,20 +77,21 @@ class MessageCallingCodeGenerator { final resourcesInContext = assetList .where((resource) => resource.message.context == messageList.context); - final localeToResourceInfo = resourcesInContext.map((resource) => ( - locale: resource.message.locale ?? 'en_US', - id: 'package:${options.packageName}/${resource.path}', - hasch: resource.message.hash, - )) - ..sortedBy((entry) => entry.locale); - - printIncludeFilesNotification(messageList.context, localeToResourceInfo); + final localeToResource = resourcesInContext + .map((resource) => ( + locale: resource.message.locale ?? 'en_US', + id: 'package:${options.packageName}/${resource.path}', + hasch: resource.message.hash, + )) + .sortedBy((resource) => resource.locale); + print(localeToResource); + printIncludeFilesNotification(messageList.context, localeToResource); return LibraryGeneration( options, messageList.context, messageList.locale!, messageList.messages, - localeToResourceInfo, + localeToResource, ).generate(); }