CheckTranslationsCommand constructor

CheckTranslationsCommand()

Implementation

CheckTranslationsCommand()
    : super(
        'check_translations',
        'Check if translations exist for all strings and prints detailed report about problems.\n'
            'Checks:\n'
            '- if all strings from the localization file (alex.l10n.source_file) have translation in ARB for the language; \n'
            '- if all strings from the localization file (alex.l10n.source_file) was sent for translation (contained in base XML); \n'
            '- if all strings from the base XML file have translation in XML for the language; \n'
            '- if there are not duplicated keys in XML for the language; \n'
            '- if all strings from the XML for the language are imported to ARB for this language; \n'
            '- if the XML for the language has not redundant strings that are not in the localization file (alex.l10n.source_file); \n'
            '- if all code is generated for the language.\n\n'
            'By default it checks for all locales, but you can specify locale with --$_argLocale option. \n\n'
            'Exit code is 0 if all checks passed, $_kExitCodeCheckFailed if some checks failed.\n'
            'Other exit codes are used for errors.',
        const [
          'check',
          // for compatibility with old command
          'check_translate',
        ],
      ) {
  argParser
    ..addOption(
      _argLocale,
      abbr: 'l',
      help: 'Locale to check if translations exist for all strings. '
          'If not specified then it will check all locales.',
      valueHelp: 'LOCALE',
    )
    ..addVerboseFlutterCmdFlag();
}