We can't use a hyphen in a Dart library name, so convert the locale separator to an underscore.
String libraryName(String x) => 'messages_${x.replaceAll('-', '_').toLowerCase()}';