Import translated entities

Note: To run the import script (kImportAttributes.sh), you must have the Sys Admin: Manage Translations access grant.

The import script kImportAttributes.sh can operate on any combination of:

  • Individual .properties files

  • .zip files that include only .properties files

Before you import a .properties file, make sure it is ASCII encoded. You can use the built-in Java utility native2ascii included in PPM to perform this encoding. (Most commercially available translation management tools perform the encoding automatically.)

The following example converts a file that is UTF-8 encoded to ASCII

    native2ascii -encoding UTF-8 <input file> <output file>

When you import translations, their languages must be supported (previously installed) on PPM.

Note: You cannot import scoring criteria definitions using referenceCode or primaryKey. You can export definitions only for a full list of scoring criteria.

The .properties filename(s) and .zip filename(s) to be imported must be appended with “_” followed by a two-character language code from the subset of languages in ISO standard 639-1 that are supported by Oracle. The filename(s) can be further appended with “_” followed by a two-character country code from the subset of codes in ISO standard 3166-1 that are supported by Oracle.

Examples:

  • ToPPM_en.properties for English

  • ToPPM_de.zip for German

  • ToPPM_pt_BR.properties for Brazilian Portuguese

Data in the .properties files must use the Java standard format: <key>=<value>.

By default, files will be imported from the <PPM_Home>/mlu/translations directory. However, you can save them elsewhere on the PPM Server and specify that path when you run the import script.

Translation Impact Report

Before importing the data, we recommend that you generate and review a Translation Impact report by running the import script with the -mode test option. The report is saved at the location shown on screen when you run the script.

For each file to be imported, for new or updated translations only, the report displays:

  • The key for each attribute

  • The attribute's original value in its definition language

  • The existing translation (if any) of the attribute in the language to be imported

  • The new translation of the attribute in the language to be imported

As reflected in the Translation Impact report, importing unmodified translation files, including translation files previously exported using the export script, has no impact.

Review the quality of the new translations. If there are errors, determine how you want to proceed. You can import some properties files and not others, or you might be able to edit some of the files (in collaboration with any translation service you might use).

After running the import script with the -mode test option and reviewing the report, run the import script without the -mode test option to import the translations to PPM.

Running Import Script

To run the import script:

  1. On the PPM Server, navigate to the directory that contains the kImportAttributes.sh script:

    cd <PPM_Home>/bin

  2. Run the following script:

    sh ./kImportAttributes.sh -username <user name>

    -password <password> [options]

    where the options are as described in the following table.

    Option

    Description

    -file <Filename>

    The name of the file to import.

    If unspecified, all files in the specified -directory are imported.

    -directory <Directory_Path>

    The directory in which the files to be imported are located.

    If unspecified, the default is <PPM_Home>/mlu/translations.

    -mode <Mode>

    Value of <mode> is test or import.

    If unspecified, the default is import.

    For example, after substituting valid values for the username and password, run the script in test mode as follows:

    sh ./kImportAttributes.sh -username admin -password pw  -mode test

    The script runs and generates the Translation Impact report. If the script is run without the -mode test option, it imports the specified files.

    Log files are saved as described on screen.

    Note: In general, the import script does not overwrite attributes in their definition languages. (However, installing a language pack provided by Micro Focus can do so.)