FromXmlCommand constructor
FromXmlCommand()
Implementation
FromXmlCommand() : super('from_xml', 'Import translations from xml.') {
argParser
..addOption(
_argTo,
abbr: 't',
help: 'Target to import translations from xml.',
valueHelp: 'TARGET',
allowed: [
_targetArb,
_targetAndroid,
_targetIos,
_targetJson,
// TODO: uncomment when implement
// _targetGoogleDocs,
],
allowedHelp: {
_targetArb: 'Import to project arb files.',
_targetAndroid: 'Import to Android localization.',
_targetIos: 'Import to iOS localization.',
_targetJson: 'Import to JSON localization (for backend).',
// TODO: uncomment when implement
// _targetGoogleDocs:
// 'Import to google docs. It\'s for assets translations.',
},
defaultsTo: _targetArb,
)
..addOption(
_argDir,
abbr: 'd',
help: 'Directory to save localization files. '
'Supported by targets: $_targetJson.',
valueHelp: 'DIR_PATH',
)
..addOption(
_argLocale,
abbr: 'l',
help: 'Locale for import from xml. '
'If not specified - all locales will be imported.',
valueHelp: 'LOCALE',
)
..addOption(
_argName,
abbr: 'n',
help: 'File name without extension for import from xml. '
'If not specified - all matching files will be imported. '
'Supported by targets: $_targetJson.',
valueHelp: 'FILENAME',
);
}