Difference between revisions of "Group Configuration Files"

From Lingoport Wiki
Jump to: navigation, search
(config_due_dates.xml)
(config_lrm_info.properties)
 
(36 intermediate revisions by 3 users not shown)
Line 1: Line 1:
  +
=Location=
  +
Group Configuration Files are copied over to the ''L10nStreamlining/<group name>/config'' folder during the create group process. The original configuration files are located in the ''../lingoport/lrm-server-xx/deploy/templates/dir_structure/group'' folder. These files can be moved to the project level if more granularity is needed. The files can also be moved to the global level if less granularity is needed.
  +
  +
Configuration files can be at the global, group or project level.
  +
  +
'''Global''': <HOME>/Lingoport_Data/L10nStreamlining/config
  +
  +
'''Group''': <HOME>/Lingoport_Data/L10nStreamlining/<group name>/config
  +
  +
'''Project''': <HOME>/Lingoport_Data/L10nStreamlining/<group name>/projects/<project name>/config
  +
  +
If there are duplicate files, the project level takes precedence, followed by the group level, and finally the global level.
  +
 
=Group Name=
 
=Group Name=
 
A group name <b>must conform</b> to the following specification:
 
A group name <b>must conform</b> to the following specification:
Line 14: Line 27:
 
* (space)
 
* (space)
 
* % (percentage)
 
* % (percentage)
  +
* -- (more than 1 consecutive dash)
   
 
= Group File Structure =
 
= Group File Structure =
   
Under the L10n Streamlining directory (typically ~jenkins/Lingoport_Data/L10nStreamlining), each group file structure follows this pattern:
+
Under the L10n Streamlining directory (typically '''<HOME>/Lingoport_Data/L10nStreamlining'''), each group file structure follows this pattern:
   
 
<pre>
 
<pre>
Line 23: Line 37:
 
├── config
 
├── config
 
│   ├── config_due_dates.xml
 
│   ├── config_due_dates.xml
│   ├── config_file_cherry_picker.xml
 
 
│   ├── config_l10n_vendor.properties
 
│   ├── config_l10n_vendor.properties
 
│   ├── config_lingotek_locale_mapping.properties
 
│   ├── config_lingotek_locale_mapping.properties
 
│   ├── config_lrm_info.properties
 
│   ├── config_lrm_info.properties
│   └── config_pseudo_loc.xml
+
│   ├── config_pseudo_loc.xml
  +
│   ├── config_ws_locale_mapping.properties
  +
│   └── config_ws_locale_projecttype_mapping.properties
 
└── projects
 
└── projects
 
└── <project 1>
 
└── <project 1>
Line 35: Line 50:
 
...
 
...
 
</pre>
 
</pre>
Each of the group configuration files can be copied to the project 'config' directory if a project has a configuration different from other projects in that group.
+
Each of the group configuration files can be copied to the project 'config' directory if a project has a configuration different from other projects in that group.
  +
  +
For more information on the global configuration files, visit the [[Global Configuration Files]] page.
  +
  +
For more information on the project configuration files, visit the [[Project Configuration Files]] page.
   
 
This section describes the configuration at the group level
 
This section describes the configuration at the group level
Line 53: Line 72:
 
</due-date-config>
 
</due-date-config>
 
</pre>
 
</pre>
For example: if you are translating 500 words, you expect it to complete in 5 days. You can add, modify or remove thresholds.
+
For example: if you are translating 453 words, you expect it to complete in 5 days. You can add, modify or remove thresholds.
 
== config_file_cherry_picker.xml ==
 
This is a template file to be copied under the project config directory if needed.
 
 
It helps special situations where files to be sent for translation are far and few and possibly locale dependent. This should be used with care.
 
   
 
== config_l10n_vendor.xml ==
 
== config_l10n_vendor.xml ==
Line 65: Line 79:
 
This file is configured at installation time by Lingoport and should not be modified thereafter.
 
This file is configured at installation time by Lingoport and should not be modified thereafter.
   
  +
For more information see [[L10n_Vendors]]
A typical file looks like this:
 
<pre>
 
#Default to lingotek but don't have any attributes. Send kit will fail and force
 
the user to set up file
 
l10n.vendor=lingotek
 
#l10n.vendor=worldserver
 
#l10n.vendor=ftp
 
 
#Lingotek Attributes
 
#Contains the ids for community, workflow and access token
 
lingotek.api.id.access.token=d34866f82-cd29-3535-8a8c-48449109d0ac
 
lingotek.api.id.community=b43ece7c-b7fc-400d-890f-bfd4b009dcb1
 
lingotek.api.id.workflow=2b5498e0-f3c7-48889-9afa-cca4b38885af7
 
</pre>
 
   
 
== config_lingotek_locale_mapping.properties ==
 
== config_lingotek_locale_mapping.properties ==
Line 94: Line 95:
   
 
== config_lrm_info.properties ==
 
== config_lrm_info.properties ==
  +
Though the default location is the group config folder, it can be moved to the project's config folder if unique configurations are needed for a project.
This file should not be modified. It helps with certain handling of data.
 
  +
  +
This file contains information about:
  +
* ''type of prep kits to create''; full-file or changes-only.
  +
:: Defaults to changes-only. This means that only the deltas will be sent to translation. Of course, if the target file doesn't exist then the entire base resource file will be sent to translation.
  +
* ''starting characters of a json comment''
  +
:: Defaults to an underscore, ''_''. LRM reads/writes comments to the translated file.
  +
* ''type of prep kit packaging''
  +
:: Default to one prep kit package per locale rather than one prep kit package for all locales (1-true, 0-false)
  +
* ''indicator for including source locale text file in prep kit packaging''
  +
:: Default to source locale text file is not included in the prep kit package (1-true, 0-false)
  +
* ''Language tag pattern''
  +
:: Language Style Tag pattern for those files that support a language tag (i.e. [[JSON_Resource_Bundles#Language_Tags|JSON]], Yaml). Should be lower case. Default is language-only.
  +
  +
:: The language tag pattern must match the pattern that are in your resource files. However, your resource files must contain consistent patterns or 'MISSING_KEY' errors may occur.
  +
:: Examples:
  +
:: {| class="wikitable" style="border: none; background: none;"
  +
| rowspan="4" style="border: none; background: none;"|
  +
|+ Resource File Language Tags
  +
! scope="col" | language.tag.pattern
  +
! scope="col" | en_us (base)
  +
! scope="col" | fr_FR
  +
! scope="col" | es
  +
! scope="col" | zh_hans_cn
  +
|-
  +
| Language-only (default) || en || fr || es || zh
  +
|-
  +
| l-c || en-us || fr-FR || es || zh-hans
  +
|-
  +
| l_c_v || en_us || fr_FR || es || zh_hans_cn
  +
|-
  +
|}
  +
  +
* ''Global tags''
  +
:: Global style tags for those files that support tags such as JSON and YAML. Tags should be separated by a comma
  +
* ''Replace text in files for post edits''
  +
:: Indicates whether non-MT post edit should replace the text in the file directly rather than adding a resend tag. Default is false. If true, when processing a post edit, the text in the corresponding target file will be changed as indicated by the post edit request. An email will be sent out indicating the changes that were made as well as the changes that failed.
  +
 
A typical file looks like this:
 
A typical file looks like this:
 
<pre>
 
<pre>
  +
### JSON Comment Pattern recognized by your L10n vendor ###
json.comment.starts.with=_comment
 
  +
json.comment.starts.with=_
#Default to changes only prep kits
 
  +
  +
### Prep Kit Type Setting ###
  +
#Default to changes only prep kits; (1-true, 0-false)
 
prep.kit.changes.only=1
 
prep.kit.changes.only=1
  +
  +
#Default to one prep kit package per locale rather than one prep kit package for all locales (1-true, 0-false).
  +
prep.kit.locales.in.one.project=0
  +
  +
#Default to source locale text file is not included in the prep kit package (1-true, 0-false)
  +
prep.kit.source.locale.file=0
  +
  +
#Language Style Tag pattern for those files that support a language tag (i.e. JSON, Yaml). Should be lower case.
  +
#Example: en-US pattern would be l-c. The full locale would be l-c-v. Defaults to language only
  +
#Valid patterns: l, l-c, l-c-v, l_c, l_c_v
  +
language.tag.pattern=l
  +
  +
#Global style tags for those files that support tags such as JSON and YAML. Tags should be separated by a comma
  +
global.tags=
  +
  +
#Indicates whether non-MT post edit should replace the text in the file directly rather than adding a resend tag. Default is false.
  +
replace.text.for.post.edit.request=0
 
</pre>
 
</pre>
   
 
== config_pseudo_loc.xml ==
 
== config_pseudo_loc.xml ==
This file determines how the base file (typically U.S. English) will be pseudo localized.
+
This file determines how the base file (typically U.S. English) will be pseudo localized. See [[Pseudo_Localization|''Pseudo Localization]] for information on changing the default values.
 
<pre>
 
<pre>
 
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
 
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
Line 128: Line 186:
 
<!-- Value for accented characters is '1' if the text should be accented -->
 
<!-- Value for accented characters is '1' if the text should be accented -->
 
<accent-chars>1</accent-chars>
 
<accent-chars>1</accent-chars>
  +
<!-- Flag indicating whether to add instrumented (non-printable unicode characters) to the start and end of the string
  +
The instrumented characters will be before any start character and after any end character
  +
0 - do not add instrumented characters
  +
1 - add instrumented characters -->
  +
<add-invisible-chars>0</add-invisible-chars>
 
<parameter-check>
 
<parameter-check>
 
<resource-extensions>
 
<resource-extensions>
Line 150: Line 213:
 
</pre>
 
</pre>
   
  +
== config_ws_locale_mapping.properties ==
Lingoport configures this file at group creation and configuration and it should not be modified.
 
  +
This file maps the LRM supported locales with the unique Worldserver Locale where the LRM locale is the key and the Worldserver Locale is the value.
  +
If a target locale is missing from this file then prep kit files will not be uploaded to Worldserver.
  +
This file can exist at the project and group levels.
  +
  +
A typical file is formatted this way where fr_fr is one of the target locales:
  +
<pre>
  +
fr_fr=002_French_France
  +
...
  +
</pre>
  +
  +
Lingoport copies this file over at group creation.
  +
  +
== config_ws_locale_projecttype_mapping.properties ==
  +
This file maps a LRM supported locale with its corresponding Worldserver project type where the LRM locale is the key and the Worldserver project type is the value.
  +
If a target locale is missing from this file then prep kit files will not be uploaded to Worldserver.
  +
This file can exist at the project level and group levels
  +
  +
A typical file is formatted this way where fr_fr is one of the target locales:
  +
<pre>
  +
fr_fr=1222
  +
...
  +
</pre>
  +
  +
Lingoport copies this file over at group creation.

Latest revision as of 23:10, 17 January 2023

Location

Group Configuration Files are copied over to the L10nStreamlining/<group name>/config folder during the create group process. The original configuration files are located in the ../lingoport/lrm-server-xx/deploy/templates/dir_structure/group folder. These files can be moved to the project level if more granularity is needed. The files can also be moved to the global level if less granularity is needed.

Configuration files can be at the global, group or project level.

Global: <HOME>/Lingoport_Data/L10nStreamlining/config

Group: <HOME>/Lingoport_Data/L10nStreamlining/<group name>/config

Project: <HOME>/Lingoport_Data/L10nStreamlining/<group name>/projects/<project name>/config

If there are duplicate files, the project level takes precedence, followed by the group level, and finally the global level.

Group Name

A group name must conform to the following specification: A set of alphanumeric characters without the following special characters:

  • < (less than)
  • > (greater than)
  •  : (colon)
  • " (double quote)
  • / (forward slash)
  • \ (backslash)
  • | (vertical bar or pipe)
  •  ? (question mark)
  • * (asterisk)
  • (space)
  •  % (percentage)
  • -- (more than 1 consecutive dash)

Group File Structure

Under the L10n Streamlining directory (typically <HOME>/Lingoport_Data/L10nStreamlining), each group file structure follows this pattern:

<group_name>
├── config
│   ├── config_due_dates.xml
│   ├── config_l10n_vendor.properties
│   ├── config_lingotek_locale_mapping.properties
│   ├── config_lrm_info.properties
│   ├── config_pseudo_loc.xml
│   ├── config_ws_locale_mapping.properties
│   └── config_ws_locale_projecttype_mapping.properties
└── projects
    └── <project 1>
        ├── config
        │   ├── config_email_recipients.xml
        │   └── config_vcs.properties
        ...

Each of the group configuration files can be copied to the project 'config' directory if a project has a configuration different from other projects in that group.

For more information on the global configuration files, visit the Global Configuration Files page.

For more information on the project configuration files, visit the Project Configuration Files page.

This section describes the configuration at the group level

config_due_dates.xml

This file specifies how many working days a prep kit is expected to be translated based on the number of words. A typical file looks like this:

<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<due-date-config>
        <thresholds>
                <threshold max="50"   nb-work-days="2" />
                <threshold max="200"  nb-work-days="3" />
                <threshold max="500"  nb-work-days="5" />
                <threshold max="1000" nb-work-days="10" />
                <threshold max="5000" nb-work-days="15" />
                <threshold max=""     nb-work-days="20" />
        </thresholds>
</due-date-config>

For example: if you are translating 453 words, you expect it to complete in 5 days. You can add, modify or remove thresholds.

config_l10n_vendor.xml

This file specifies for all the group's project how files will be sent to translation. The details of this configuration must be worked out with the translation group, for instance, what ID's Lingotek will provide this company or this group within the company.

This file is configured at installation time by Lingoport and should not be modified thereafter.

For more information see L10n_Vendors

config_lingotek_locale_mapping.properties

This file maps the locales used in the application to the locales used by Lingotek. For instance, if 'fr' is a locale in the application, it may map to fr_fr or fr_ca depending on the situation.

A typical file is formatted this way:

de=de_de
en=en_us
es=es_mx
fr=fr_fr
...

config_lrm_info.properties

Though the default location is the group config folder, it can be moved to the project's config folder if unique configurations are needed for a project.

This file contains information about:

  • type of prep kits to create; full-file or changes-only.
Defaults to changes-only. This means that only the deltas will be sent to translation. Of course, if the target file doesn't exist then the entire base resource file will be sent to translation.
  • starting characters of a json comment
Defaults to an underscore, _. LRM reads/writes comments to the translated file.
  • type of prep kit packaging
Default to one prep kit package per locale rather than one prep kit package for all locales (1-true, 0-false)
  • indicator for including source locale text file in prep kit packaging
Default to source locale text file is not included in the prep kit package (1-true, 0-false)
  • Language tag pattern
Language Style Tag pattern for those files that support a language tag (i.e. JSON, Yaml). Should be lower case. Default is language-only.
The language tag pattern must match the pattern that are in your resource files. However, your resource files must contain consistent patterns or 'MISSING_KEY' errors may occur.
Examples:
Resource File Language Tags
language.tag.pattern en_us (base) fr_FR es zh_hans_cn
Language-only (default) en fr es zh
l-c en-us fr-FR es zh-hans
l_c_v en_us fr_FR es zh_hans_cn
  • Global tags
Global style tags for those files that support tags such as JSON and YAML. Tags should be separated by a comma
  • Replace text in files for post edits
Indicates whether non-MT post edit should replace the text in the file directly rather than adding a resend tag. Default is false. If true, when processing a post edit, the text in the corresponding target file will be changed as indicated by the post edit request. An email will be sent out indicating the changes that were made as well as the changes that failed.

A typical file looks like this:

### JSON Comment Pattern recognized by your L10n vendor ###
json.comment.starts.with=_

### Prep Kit Type Setting ###
#Default to changes only prep kits; (1-true, 0-false)
prep.kit.changes.only=1

#Default to one prep kit package per locale rather than one prep kit package for all locales (1-true, 0-false).
prep.kit.locales.in.one.project=0

#Default to source locale text file is not included in the prep kit package (1-true, 0-false)
prep.kit.source.locale.file=0

#Language Style Tag pattern for those files that support a language tag (i.e. JSON, Yaml). Should be lower case.
#Example: en-US pattern would be l-c. The full locale would be l-c-v. Defaults to language only
#Valid patterns: l, l-c, l-c-v, l_c, l_c_v
language.tag.pattern=l

#Global style tags for those files that support tags such as JSON and YAML. Tags should be separated by a comma
global.tags=

#Indicates whether non-MT post edit should replace the text in the file directly rather than adding a resend tag. Default is false.
replace.text.for.post.edit.request=0

config_pseudo_loc.xml

This file determines how the base file (typically U.S. English) will be pseudo localized. See Pseudo Localization for information on changing the default values.

<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<pseudo-loc-config>
        <expansion>
                <lengths>
                        <length max="10" expand-percentage="200"/>
                        <length max="20" expand-percentage="100"/>
                        <length max="30" expand-percentage="80"/>
                        <length max="50" expand-percentage="60"/>
                        <length max="70" expand-percentage="40"/>
                        <length max=""   expand-percentage="30"/>
                </lengths>
                <expansion-char>-</expansion-char>
                <!-- End characters are ‘ П國カ내’ (with a leading space) -->
                <!-- П: A Cyrillic character - (for Russian or ‘R’) -->
                <!-- 國: A common Chinese character (Hanzi, Kanji or Hanja) defined in Unicode BMP or Plane 0 – (for Chinese or ‘C’) -->
                <!-- カ: A Katakana character (used for Japanese or ‘J’) -->
                <!-- 내: A Hangul character (for Korean or ‘K’) -->
                <expansion-end-chars> П國カ내</expansion-end-chars>
        </expansion>
        <start-char>[</start-char>
        <end-char>]</end-char>
        <!-- Value for accented characters is '1' if the text should be accented -->
        <accent-chars>1</accent-chars>
        <!-- Flag indicating whether to add instrumented (non-printable unicode characters) to the start and end of the string
             The instrumented characters will be before any start character and after any end character 
             0 - do not add instrumented characters 
             1 - add instrumented characters     -->
        <add-invisible-chars>0</add-invisible-chars>
        <parameter-check>
                <resource-extensions>
                        <resource-extension>
                                <extension>properties</extension>
                                <parameter-regex-pattern><![CDATA[\{\w+\}|\\n|\\
t|\\r|%[ds]]]></parameter-regex-pattern>
                        </resource-extension>
                        <resource-extension>
                                <extension>xml</extension>
                                <parameter-regex-pattern><![CDATA[%d|%s|%\d+\$s|
%\d+\$d|\\n|\\t|\\r|%\{\w+\}]]></parameter-regex-pattern>
                        </resource-extension>
                        <resource-extension>
                                <extension>strings</extension>
                                <parameter-regex-pattern><![CDATA[(%([dsf]|(\d\$
[dsf@])|(\.\df)|@))|\\n|\\t|\\r|%\{\w+\}]]></parameter-regex-pattern>
                       </resource-extension>
                </resource-extensions>
        </parameter-check>
</pseudo-loc-config>

config_ws_locale_mapping.properties

This file maps the LRM supported locales with the unique Worldserver Locale where the LRM locale is the key and the Worldserver Locale is the value. If a target locale is missing from this file then prep kit files will not be uploaded to Worldserver. This file can exist at the project and group levels.

A typical file is formatted this way where fr_fr is one of the target locales:

fr_fr=002_French_France
...

Lingoport copies this file over at group creation.

config_ws_locale_projecttype_mapping.properties

This file maps a LRM supported locale with its corresponding Worldserver project type where the LRM locale is the key and the Worldserver project type is the value. If a target locale is missing from this file then prep kit files will not be uploaded to Worldserver. This file can exist at the project level and group levels

A typical file is formatted this way where fr_fr is one of the target locales:

fr_fr=1222
...

Lingoport copies this file over at group creation.