Gsicheck

From Apache OpenOffice Wiki
Jump to: navigation, search

gsicheck

gsicheck is a tool to check sdf and gsi files as used in L10N. It must be executed after translation and before integration into sources. It can prevent unnecessary turnarounds for e.g.: broken UTF8 encoding. And it can save Release Engineering a lot of time in not breaking the build in helpcontent.


get it (Download)

Download the newest version at http://ooo.services.openoffice.org/gsicheck/

There are versions for Solaris Sparc, Solaris Intel, Linux, Windows and Mac Intel available

To use them unpack them in a separate directory and call gsicheck.

call it

The simplest way to call it is

gsicheck MyFile.sdf


split files

You can use gsicheck to generate a file containing the errors and a file containing the correct entries. Simply use the -wc (-wcf) and -we (-wef) switches. (see help for details)

gsicheck -we -wc MyFile.sdf

will generate the files MyFile_err.sdf and MyFile_ok.sdf


automatically fix errors

gsicheck can fix some easy errors in tags and remove KeyIDs.

Fixing errors is limited to copying certain attributes of tags from the source language to the translation. currently the following attributes can be fixed automatically:

Tag Attribute
ahelp hid
link href
alt id
variable id
image src
image id


apart from that it can remove KeyIDs from the strings.

Use the switches -f and -wf (wff)

calling

gsicheck -f -wf MyFile.sdf

will generate the file MyFile_fix.sdf containing the fixes.


NOTE: a translated string can be in the fixed strings and the error files if there are issues which can be fixed automatically and issues which can't in one line. A line in the fixed strings file can still contain erros which are not fixable automatically.


what it checks for

In particular it performs the following checks on the file, maybe more:

  • file format
    • - lines are correct (correct amount of fields, Languagecode looks OK)
    • - no duplicate lines
    • - Source line for every translation
  • UTF8 correctness
  • unprintable chars
  • consistency of Tags in helpcontent
    • - valid open / close tags
    • - check if tags present in the source language are also present in the translation (Mandatory tags only)
    • - check if attributes are copied correctly to the translation
  • Existence of KeyIDs (see option -k)


help

For program help just call the program without any parameters. Currently this will print out the following:

gsicheck Version 1.9.0 (c)1999 - 2006 by SUN Microsystems
=========================================================

gsicheck checks the syntax of tags in GSI-Files and SDF-Files
         checks for inconsistencies and malicious UTF8 encoding
         checks tags in Online Help

Syntax: gsicheck [ -c ] [-f] [ -we ] [ -wef ErrorFilename ] [ -wc ]
                 [ -wcf CorrectFilename ] [ -s | -t ] [ -l LanguageID ]
                 [ -r ReferenceFile ] filename

-c    Add context to error message (Print the line containing the error)
-f    try to fix errors. See also -wf -wff
-wf   Write File containing all fixed parts
-wff  Same as above but give own filename
-we   Write File containing all errors
-wef  Same as above but give own filename
-wc   Write File containing all correct parts
-wcf  Same as above but give own filename
-s    Check only source language. Should be used before handing out to vendor.
-t    Check only Translation language(s). Should be used before merging.
-k    Allow KeyIDs to be present in strings
-e    disable encoding checks. E.g.: double questionmark '??' which may be the
      result of false conversions
-l    ISO Languagecode or numerical 2 digits Identifier of the source language.
      Default is en-US. Use "" (empty string) or 'none'
      to disable source language dependent checks
-r    Reference filename to check that source language entries
      have not been changed
Personal tools