Tikal - Conversion Commands

From Okapi Framework
Jump to: navigation, search

Convert to PO Format

Creates a PO file for the give input file. If the input file is multilingual (like a TMX or a TS file), the source and target will be in the PO file.

The syntax of this command is:

-2po [options] inputFile [inputFile2...]

Where the options are:

-fc configId The identifier of the filter configuration to use for the input files
-ie encoding The encoding name of the input files. this is used only if the filter cannot detect the encoding from the input file itself.
-sl srcLang The code of the source language of the input files. See more details...
-tl trgLang The code of the target language. See more details...
-generic Indicates to use generic notation for inline codes in the generated PO file, for example <1/> vs. <br/>. If this option is not specified the inline codes are output in their original form.
-trgsource|
-trgempty
Forces the content of the output target field to be either a copy of the source or empty. If neither option is set the content of the target field is the target text or empty.
-all Allows entries that have no text to be converted. If this option is not set, the entries that are empty, or contains only codes or whitespaces are not included in the output file. If this option is set all entries are included in the output.
-approved If this option is set only approved entries are included.
-rd rootDirectory The root directory (by default the user's home directory).

For example:

tikal -2po data.tmx -sl EN -tl ZU

Creates a PO file from the TMX document data.tmx. The source language is English and the target Zulu.

Convert to TMX Format

Creates a TMX document for the give input file. If the input file is multilingual (like a PO or a TS file), the source and target will be in the TMX document.

The syntax of this command is:

-2tmx [options] inputFile [inputFile2...]

Where the options are:

-fc configId The identifier of the filter configuration to use for the input files.
-ie encoding The encoding name of the input files. this is used only if the filter cannot detect the encoding from the input file itself.
-sl srcLang The code of the source language of the input files. See more details...
-tl trgLang The code of the target language. See more details...
-trgsource|
-trgempty
Forces the content of the output target field to be either a copy of the source or empty. If neither option is set the content of the target field is the target text or empty.
-all Allows entries that have no text to be converted. If this option is not set (the default), the entries that are empty, or contains only codes or whitespaces are not included in the output file. If this option is set all entries are included in the output.
-approved If this option is set only approved entries are included.
-rd rootDirectory The root directory (by default the user's home directory).

For example:

tikal -2tmx data.po -sl EN -tl ZU

Creates a TMX document from the PO file data.po. The source language is English and the target Zulu.

tikal -2tmx data.tmx -sl EN -tl DE -trgempty

Creates a TMX document from another TMX document named data.tmx. The source language is English and the target German. The content of the <tuv> elements for the German will be empty.

Convert to Table Format

Creates a table-like output for the give input file. If the input file is multilingual (like a PO or a TS file), the source and target will be in the output table.

The syntax of this command is:

-2tbl [options] inputFile [inputFile2...]

Where the options are:

-fc configId The identifier of the filter configuration to use for the input files.
-ie encoding The encoding name of the input files. this is used only if the filter cannot detect the encoding from the input file itself.
-sl srcLang The code of the source language of the input files. See more details...
-tl trgLang The code of the target language. See more details...
-trgsource|
-trgempty
Forces the content of the output target field to be either a copy of the source or empty. If neither option is set the content of the target field is the target text or empty.
-csv|
-tab
Output format: -csv for comma-separated values, or -tab for tab-delimited values.
-xliff|
-xliffgx|
-tmx|
-generic
Inline codes format: -xliff for XLIFF, -xliffgx for XLIFF with g/x notation, -tmx for TMX, or -generic for generic placeholders.
-all Allows entries that have no text to be converted. If this option is not set, the entries that are empty, or contains only codes or whitespaces are not included in the output file. If this option is set all entries are included in the output.
-approved If this option is set only approved entries are included.
-rd rootDirectory The root directory (by default the user's home directory).

For example:

tikal -2tbl data.tmx -sl EN -tl ZU

Creates a tab-delimited file from the TMX document data.tmx. Any inline codes is output in its original form. The source language is English and the target Zulu. Any tab character within the text is escaped with a backslash prefix.

tikal -2tbl data.po -sl EN -tl ES -csv -xliffgx -trgsource

Creates a comma-separated values output file from the PO file data.po. The inline codes are represented as XLIFF elements using the <g> and <x> notation. The text is between double quotes, and any double-quote and backslash characters within the text is escaped with a backslash prefix. The source language is English and the target Spanish. the content of the target column is a copy of the source.

Import into Pensieve TM

Imports the specified input documents into a Pensieve TM database. If the specified TM does not exists, it is created. If it does exist, the entries of the input files are added to it.

The syntax of this command is:

-imp myTMdirectory [options] inputFile [inputFile2...]

Where the options are:

-fc configId The identifier of the filter configuration to use for the input files.
-ie encoding The encoding name of the input files. this is used only if the filter cannot detect the encoding from the input file itself.
-sl srcLang The code of the source language of the input files. See more details...
-tl trgLang The code of the target language. See more details...
-trgsource|
-trgempty
Forces the content of the output target field to be either a copy of the source or empty. If neither option is set the content of the target field is the target text or empty.
-all Allows entries that have no text to be converted. If this option is not set (the default), the entries that are empty, or contains only codes or whitespaces are not included in the output file. If this option is set all entries are included in the output (if they respect the other options).
-over If this option is set and an entry to import has the same source text as one or more entries in the existing TM, all the existing entries will be replaced by the new one. Do not set this option if you want to allow different translations for the same source.
-approved If this option is set only approved entries are included.
-rd rootDirectory The root directory (by default the user's home directory).

For example:

tikal -imp myTMdir data.po -sl JA -tl FR

Imports the PO file data.po into the TM database located in myTMDir. If the directory does not exists it will be created. If a TM exists, the entries of the input file(s) will be added to it. The source language of the PO file is Japanese and the target French.

Export TMX from Pensieve TM

Creates a TMX output file for the the given Pensieve TMs.

The syntax of this command is:

-exp tmDirectory [tmDirectory2...] [options]

Where the options are:

-sl srcLang The code of the source language of the input files. See more details...
-tl trgLang The code of the target language. See more details...
-trgsource|
-trgempty
Forces the content of the output target field to be either a copy of the source or empty. If neither option is set the content of the target field is the target text or empty.
-all Allows entries that have no text to be converted. If this option is not set (the default), the entries that are empty, or contains only codes or whitespaces are not included in the output file. If this option is set all entries are included in the output.

For example:

tikal -exp myProjectTM -sl en -tl IT

Creates a TMX document from the Pensieve TM stored in myProjectTM. The source language is English and the target Italian.

Note that the command -exp is a shortcut for the -2tmx command (Convert to TMX Format). You can export Pensieve TM entries in table, TMX or PO format using the filter configuration okf_pensieve. For instance, the example above can be also execute using the following command:

tikal -2tmx myProjectTM -fc okf_pensieve -sl en -tl IT