parseExtractConfig method

ExtractConfig parseExtractConfig(
  1. ArgParser parser
)

Implementation

ExtractConfig parseExtractConfig(ArgParser parser) {
  ExtractConfig _extractConfig = ExtractConfig();
  parser.addFlag("suppress-last-modified",
      defaultsTo: false,
      callback: (x) => _extractConfig.suppressLastModified = x,
      help: 'Suppress @@last_modified entry.');
  parser.addFlag("suppress-warnings",
      defaultsTo: false,
      callback: (x) => _extractConfig.suppressWarnings = x,
      help: 'Suppress printing of warnings.');
  parser.addFlag("suppress-meta-data",
      defaultsTo: false,
      callback: (x) => _extractConfig.suppressMetaData = x,
      help: 'Suppress writing meta information');
  parser.addFlag("warnings-are-errors",
      defaultsTo: false,
      callback: (x) => _extractConfig.warningsAreErrors = x,
      help: 'Treat all warnings as errors, stop processing ');
  parser.addFlag("embedded-plurals",
      defaultsTo: true,
      callback: (x) => _extractConfig.allowEmbeddedPluralsAndGenders = x,
      help: 'Allow plurals and genders to be embedded as part of a larger '
          'string, otherwise they must be at the top level.');
  parser.addFlag("require-descriptions",
      defaultsTo: false,
      help: "Fail for messages that don't have a description.",
      callback: (val) => _extractConfig.descriptionRequired = val);
  parser.addFlag("with-source-text",
      defaultsTo: false,
      callback: (x) => _extractConfig.includeSourceText = x,
      help: 'Include source_text in meta information.');
  return extractConfig;
}