toARB function
Convert the MainMessage to a trivial JSON format.
Implementation
Map toARB(
MainMessage message, {
bool supressMetadata = false,
bool includeSourceText = false,
}) {
if (message.messagePieces.isEmpty) return {};
var out = {};
out[message.name] = icuForm(message);
if (!supressMetadata) {
out["@${message.name}"] = arbMetadata(message);
if (includeSourceText) {
out["@${message.name}"]["source_text"] = out[message.name];
}
}
return out;
}