Categories
How To... SLMake

Using of SLMake tool – import task

This article is part of article set related to SLMake using. In this article you can find information about import task. This task imports a file to the project. Equals to “File”-> “Import” menu of Sisulizer. Click here, if you would like go to our article with tasks index.

Syntax

SlMake import file <options> project

  • file – A file (.slp, .txt, or .tmx) to be imported. File name can contain wild cards (* and ?).
  • project – Sisulizer project file (.slp).

Possible options are

-type:X – Source type:

  • net – .NET assembly file (.exe, .dll)
  • nettxt – .NET text resource file (.txt)
  • cb – C++Builder binary file (.exe, .dll, .ocx)
  • delphi – Delphi binary file (.exe, .dll, .ocx)
  • java – Java resource file (.java, .properties
  • source – Source code file (.cpp, .pas, .bas, .java, .pl, etc)
  • txt – Text file (.txt)
  • vb – Visual Basic binary file (.exe, .dll)
  • win – Windows C/C++ binary file (.exe, .dll, .ocx)

If no type is specified SlMake detects the type of the source.

-lang:X – List of language codes to be imported. Separate multiple codes with semicolon. Format is ll[-CC][.src]:

  • ll – Two-character ISO-639 language code (e.g. “en”)
  • CC – An optional two-character ISO-3166 country code (e.g. “US”)
  • src – An optional three-character Sisulizer script code

-separator:X – ASCII hex value of the column separator character of text file. Default value is 9 (0x9 = tab).

-empty – Import the translation even if it is empty.

-noequal – Do not import the translation if it is same as original value.

-nomatch – Import even if the context and original value do not match. -ignorecase  Ignore character case of imported values.

-ignorewhite – Ignore white spaces of imported values.

-ignorespe – Ignore special characters such as period and hot key (&).

-usepartial – Use partial context.

-overwrite:X – Specifies if current values are overwritten:

  • 0 – Never
  • 1 – If the status is equal or greater than the current one (Default)
  • 2 – If the status is greater than the current one
  • 3 – Always

-status:X – Specifies if the status values are imported:

  • 0 – No
  • 1 – Yes (Default)
  • 2 – Set to the default value

-method:X – Specifies how strings are imported:

  • 0 – By context
  • 1 – By original value
  • 2 – First by context then by original value (Default)

-comment:X – Specifies how comments are imported:

  • 0 – No comments are imported
  • 1 – Comment is imported if the current comment is empty (Default)
  • 2 – Imported comment overwrites the current one

-columns:X – List of text columns. Use this if the imported file is an Excel file. Separate multiple columns with semicolon. Language columns use the same ISO codes as the lang option.The first language column is the original language. Following special columns can be used:

  • co – Context
  • cm – Comment
  • ig – Ignore

-textdef:X – Specifies the name of the text definition that is used. Use this if the imported file is a text file.

-sheet:X – Specifies name of Excel sheet where data is imported from. This is optional and if not given the first sheet is used.

-range:LT:RB – Specifies range of Excel sheet where data is imported from. This is optional and if not given the import range is detected.

  • LT – Specifies the left-top cell (e.g. A1)
  • RB – Specifies the right-bottom cell (e.g. D20)

-escape:X – String escape method:

  • 0 – No escape characters (Default)
  • 1 – C/C++ escape characters: \n\r…
  • 2 – Sisulizer escape characters: #l#c…

-q – Quiet mode. Only errors are shown.

-w – Result code is 2 if errors, 1 if warnings, and 0 if successful. Otherwise result code is 1 if errors and 0 in other cases.

-e – Show detailed error information.

-h – Show detailed help about a task.

Examples

  • SlMake import Translated.slp Sample.slp – Import Translated.slp to Sample.slp
  • SlMake import Translated.slp -lang:de -overwri:3 Sample.slp – Import only the German column. Overwrite the current values
  • SlMake import Sample.txt -textdef:MyFile Sample.slp – Import a text file using MyFile text file definition
  • SlMake import Sample.xls -columns:en;de;ja -sheet:Sheet1 -range:A1:D20 Sample.slp – Import an Excel file containing original (English), German and Japanese columns
  • SlMake import *.xls -columns:co;en;de;ja -lang:ja -method:0 Sample.slp – Import Japanese translations from Excel files containing several columns. Importing is done in a context sensitive way

Janusz

Leave a Reply