saveLocaleJsonAsset function

void saveLocaleJsonAsset(
  1. String localeName,
  2. KeyMap map, {
  3. bool beautify = false,
})

Saves localeName translation map in EnvConfig.outputJsonDir. With the option to beautify the json string output.

Implementation

void saveLocaleJsonAsset(
  String localeName,
  KeyMap map, {
  bool beautify = false,
}) {
  /// not valid anymore.
  // if (!localeName.endsWith('.json')) {
  //   localeName += '.json';
  // }
  // var path = joinDir([config.outputJsonDir, localeName]);
  var path = config.getJsonFilePath(localeName);
  // trace('Saving json "$localeName" in ', path);
  saveJson(path, map, beautify: beautify);
}