pragmatrix / tnt

Command line tool for organizing translation strings extracted from .NET assemblies. Supports Excel, XLIFF roundtrips and machine translations.
MIT License
30 stars 2 forks source link

Extend tnt export and import's command line options. #52

Closed pragmatrix closed 6 years ago

pragmatrix commented 6 years ago

I think that a default of tnt import or tnt export should do nothing.

tnt export

And the free parameters are the language tags of the languages that should be exported. The default directory stays the . directory.

examples:

tnt export --all --to /tmp tnt export de fr --to /tmp

Languages can optionally be specified by using -l or --language, here the language name can be specified.

tnt import

--from the directory to import from. Default ..

Free arguments are the filenames or language tags of the xlf files to import.

If a language tag is specified as a free argument, it's converted to a filename [ProjectName].[code].xlf is assumed. Only tags can be specified as free arguments, not language names.

Languages can optionally be specified by using -l or --language. Here language names are supported.

pragmatrix commented 6 years ago

For now it's best to support language names in all places where tags can be used, so -l and --language are not needed.

pragmatrix commented 6 years ago

For tnt import, files, language names, and tags can be specified as free arguments. If the string ends on .xlf or .xliff, it is assumed to be a file for now.