serge-import - Import translations from already existing resource files
serge import [configuration-files] [options]
[configuration-files] is a path to a specific .serge file, or a directory to scan .serge files in. You can specify multiple paths as separate command-line parameters. If no paths provided, Serge will look up for .serge files in the current directory.
serge-import does the opposite of serge-localize: it scans previously generated localized resource files according to the rules in configuration files, and tries to import translations back into the database.
This is useful to initially import pre-existing translations before setting up an automated localization flow.
Note that for import to work, you don't need to create a separate Serge configuration file or a job: you need to setup Serge jobs for the primary workflow (localization), in each job specifying the path to output localized files using
output_file_path parameter. Then make sure that the pre-existing localized files are located and named in accordance with that parameter, and serge-import will know where to find these files for importing.
Just show a report, but do no actual import.
- --lang=xx[,yy][,zz], --language=xx[,yy][,zz] --languages=xx[,yy][,zz]
An optional comma-separated list of target languages
If duplicate keys are found, don't exit but disambiguate them in the order of their presence. Use with care only when you are sure that the ordering and the number of ambiguous keys in all files (both original and localized) is the same, otherwise you might end up importing wrong translations for wrong keys.
By default, translations that are identical to source strings are not imported. This more conservative approach allows one to review such strings later and apply translations only where needed. This flag changes this behavior, allowing one to import all such identical translations.
By default, serge-import generates HTML reports, one per language, in the current directory with 'serge-import-report-xx.html' file names, where 'xx' is the language. It is strongly recommended to always review these reports, but one may skip generating report files by providing this option.
Print debug output
Part of serge suite.