Skip to content

Commit

Permalink
Sort
Browse files Browse the repository at this point in the history
  • Loading branch information
mosuem committed Oct 22, 2024
1 parent c45055c commit 00b7677
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 11 deletions.
4 changes: 2 additions & 2 deletions pkgs/messages/example/lib/messages.g.dart

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

19 changes: 10 additions & 9 deletions pkgs/messages_builder/lib/builder.dart
Original file line number Diff line number Diff line change
Expand Up @@ -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();
}

Expand Down

0 comments on commit 00b7677

Please sign in to comment.