Difference between revisions of "TradosEnterprise"
(→Link LRM and Trados Enterprise) |
|||
(11 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
+ | Trados Enterprise uses FTP in order to pass files back and forth with Localyzer. However, because the structure on the FTP site for Trados Enterprise is organized by locale-named directories, the configuration to move files back and forth requires first a local vendor, which is then used by two Jenkins jobs, TradosEnterpriseUpload and TradosEnterpriseDownload to move files back and forth using FTP. |
||
+ | |||
+ | |||
+ | ===Install lftp=== |
||
+ | lftp is a Linux utility to transfer data and is used by two Jenkins jobs, |
||
+ | * TradosEnterpriseUpload |
||
+ | * TradosEnterpriseDownload |
||
+ | |||
+ | On Centos type system, as a user with 'sudo' priviledges, execute the following command: |
||
+ | |||
+ | sudo yum install lftp |
||
+ | |||
+ | To verify lftp is correctly installed, as the 'jenkins' user, type in this command and check it runs without errors: |
||
+ | |||
+ | lftp --version |
||
+ | |||
+ | |||
+ | ===Link Localyzer and Trados Enterprise=== |
||
+ | Configure a Local Vendor. |
||
− | ===Link LRM and Trados Enterprise=== |
||
To begin working with Trados Enterprise, create or use the following directories on the Linux file system: |
To begin working with Trados Enterprise, create or use the following directories on the Linux file system: |
||
<ol> |
<ol> |
||
<ul> |
<ul> |
||
− | <li><code>/var/lib/jenkins/ |
+ | <li><code>/var/lib/jenkins/translation/TradosEnterprise/to_translation</code></li> |
− | <li><code>/var/lib/jenkins/ |
+ | <li><code>/var/lib/jenkins/translation/TradosEnterprise/from_translation</code></li> |
</ul> |
</ul> |
||
<li> |
<li> |
||
Line 15: | Line 33: | ||
<li>Provide a unique vendor name</li> |
<li>Provide a unique vendor name</li> |
||
<li>Select <b>Group</b> or <b>Project</b>; if group, select group name from drop down list</li> |
<li>Select <b>Group</b> or <b>Project</b>; if group, select group name from drop down list</li> |
||
− | <li>Configure Prep Kit Files Directory |
+ | <li>Configure Prep Kit Files Directory: <code>/var/lib/jenkins/translation/TradosEnterprise/to_translation</code></li> |
− | <li>Configure Imported Files Directory |
+ | <li>Configure Imported Files Directory:<code>/var/lib/jenkins/translation/TradosEnterprise/from_translation</code></li> |
<li>Save</li> |
<li>Save</li> |
||
</ul> |
</ul> |
||
Line 28: | Line 46: | ||
<li>Choose <b>Group</b> or <b>Project</b>; if project, click <b>Local Vendor</b> and then select the <b>Local Vendor Name</b> from the list</li> |
<li>Choose <b>Group</b> or <b>Project</b>; if project, click <b>Local Vendor</b> and then select the <b>Local Vendor Name</b> from the list</li> |
||
<li>Save</li> |
<li>Save</li> |
||
+ | <li>Build (run) the Jenkins job</li> |
||
</ul> |
</ul> |
||
</ol> |
</ol> |
||
− | ===Configure and Enable |
+ | ===Configure and Enable Trados Enterprise Jenkins Jobs=== |
<ol> |
<ol> |
||
− | <li>Enable the <b> |
+ | <li>Enable the <b>TradosEnterpriseUpload</b> Jenkins job.</li> |
− | <li>Enable the <b> |
+ | <li>Enable the <b>TradosEnterpriseDownload</b> Jenkins job.</li> |
+ | <li>Make sure the Jenkins job <b>TradosEnterpriseUpload</b> trigger <code>Build after other projects are built</code> after <b>DashboardPrepkit</b>.</li> |
||
− | <li>Enable the <b>XTMSend</b> Jenkins job.</li> |
||
− | <li>Modify the Jenkins job <b>LocalVendorDownload</b> and check < |
+ | <li>Modify the Jenkins job <b>LocalVendorDownload</b> and check <code>Build after other projects are built</code> and then in <b>Projects to watch</b>, type in <b>TradosEnterpriseDownload</b>.</li> |
</ol> |
</ol> |
||
+ | ===Trados Enterprise Locale Mapping=== |
||
− | ===XTM Configuration=== |
||
+ | Configure '''config_trados_enterprise_locale_mapping.properties''' which must be specified at the project config level.<br> |
||
+ | This file maps locales from LRM to Trados Enterprise. For example, for a repository locale '''fr''', it must be mapped to '''fr-FR''' for Trados Enterprise. The '''fr-FR''' must be the name of the directory in the FTP endpoint TO_RWS and FROM_RWS |
||
− | Configure the XTM settings in the '''config_xtm_vendor.properties''' (which can be specified at the group or project config level). |
||
<pre> |
<pre> |
||
# |
# |
||
+ | #Locale mapping language only repo locales <--> Trados Enterprise Locales |
||
− | # Contains configuration for xtm |
||
+ | aa=aa-DJ |
||
− | # |
||
+ | ab=ab-GE |
||
− | # Note: this file should be placed in ~/Lingoport_Data/L10nStreamlining/<group>/config |
||
+ | af=af-ZA |
||
− | # or ~/Lingoport_Data/L10nStreamlining/<group>/projects/<project>/config |
||
+ | ak=ak-GH |
||
− | # |
||
+ | am=am-ET |
||
− | # Run the following command to get the token: |
||
− | # java -jar lingoport-xtm-cli.jar --get-token -s <server> -c <client> -u <userId> -p <password> |
||
− | # |
||
− | # Run the following command to get the customerId: |
||
− | # java -jar lingoport-xtm-cli.jar --get-customer-id -s <server> -t <token> -cn <customerName> |
||
− | # |
||
− | # Run the following command to get the templateId (if using a template): |
||
− | # java -jar lingoport-xtm-cli.jar --get-template-id -s <server> -t <token> -ci <customerid> -tn <templatename> |
||
− | # |
||
− | # Run the following command to get the workflowId (if using a workflow id): |
||
− | # java -jar lingoport-xtm-cli.jar --get-workflow-id -s <server> -t <token> -wn <workflowname> |
||
− | # |
||
− | # Required to configure either a workflow name, workflow id, or template id |
||
− | # |
||
− | |||
− | # the following are required |
||
− | xtm.api.hostURL=https://api-test.xtm-intl.com |
||
− | xtm.api.token= |
||
− | xtm.api.id.customer= |
||
− | xtm.api.source.locale=en_US |
||
− | |||
− | # optional |
||
− | #xtm.api.proxyHost=example.proxy.com |
||
− | #xtm.api.proxyPort=3128 |
||
− | |||
− | # one of the following must be configured |
||
− | xtm.api.name.workflow= |
||
− | xtm.api.id.workflow= |
||
− | xtm.api.id.template= |
||
− | |||
− | # configure proper URL for your company |
||
− | xtm.api.callbackURL=http://jenkins.company.com/jenkins/buildByToken/buildWithParameters/build?job=XTMCallback&token=<the_token_configured_in_XTMCallback> |
||
− | |||
− | # |
||
− | # You can test your callback configuration using curl on the command line (note the escaped & before token): |
||
− | # curl http://jenkins.company.com/jenkins/buildByToken/buildWithParameters/build?job=XTMCallback\&token=<the_token_configured_in_XTMCallback> |
||
− | # A successful curl command simply returns. |
||
− | # An unsuccessful curl command will display an error. |
||
− | # |
||
− | </pre> |
||
− | |||
− | ===One XTM Project for all Prep Kit Locales or One XTM Project for each Prep Kit Locale === |
||
− | This setting is available for XTM starting with the Japan release (LRM 9.0.20). See [[Zip_Files_For_Prep_and_Import#One_Zip_File_for_all_Locales.2C_per_Prep_Kit_Number| Projects and Locales]] |
||
− | |||
− | When sending files to XTM for a prep kit, projects are created in XTM via the XTM API. A setting allows to have one project for all the locales where the files sent to translation are the same. |
||
− | |||
− | By default, when a Localyzer project is prepped, there will be one TMS project (or one zip file) per locale. If there is a need to send files for '''all''' the locales in one TMS project (or one zip file), then the |
||
− | * <code>prep.kit.locales.in.one.project</code> flag |
||
− | needs to be changed in configuration file |
||
− | * '''<code>config_lrm_info.properties</code>''' |
||
− | |||
− | This configuration file may reside under the group or the project config folder: |
||
− | * <code>/var/lib/jenkins/Lingoport_Data/L10nStreamlining/<group-name>/config</code> |
||
− | * <code>/var/lib/jenkins/Lingoport_Data/L10nStreamlining/<group-name>/config/<project-name></code> |
||
− | |||
− | ===XTM Locale Mapping=== |
||
− | Configure '''config_xtm_locale_mapping.properties''' (which can be specified at the group or project config level).<br> |
||
− | This file maps locales from LRM to XTM. For example, LRM supports the language only locale '''fr''', which must be mapped to '''fr_FR''' for XTM. |
||
− | |||
− | <pre> |
||
− | # |
||
− | #Locale mapping language only locales - Locales should be in the java format (_) |
||
− | # This is the default mapping. For your community, you'll need to edit this file |
||
− | # and place it either at the group level or the project level. |
||
− | # |
||
− | aa=aa_DJ |
||
− | ab=ab_GE |
||
− | af=af_ZA |
||
− | ak=ak_GH |
||
− | am=am_ET |
||
... |
... |
||
</pre> |
</pre> |
||
− | === |
+ | === Configure FTP === |
+ | <ol> |
||
− | XTM supports the following LRM resource types: |
||
+ | <li> |
||
− | * .html, .htm |
||
+ | Set a Jenkins global variable: |
||
− | * .json |
||
+ | </li> |
||
− | * .po |
||
+ | <ul> |
||
− | * .properties |
||
+ | <li>The name of the Jenkins variable must be: <code>TRADOS_ENTERPRISE_FTP</code></li> |
||
− | * .resx |
||
+ | <li>The value of the variable must be in the form: <code>ftp://<user>@<FTP DNS></code></li> |
||
− | * .rc |
||
+ | </ul> |
||
− | * .rxml |
||
+ | <li> |
||
− | * .strings |
||
+ | Set the FTP credentials in ~jenkins/.netrc, which must correspond to the <code>TRADOS_ENTERPRISE_FTP</code> value |
||
− | * strings.xml |
||
+ | </li> |
||
− | * .txt |
||
+ | <ul> |
||
− | * .yaml, .yml |
||
+ | <li>machine <FTP DNS></li> |
||
− | |||
+ | <li>login <user></li> |
||
− | |||
+ | <li>password <pwd></li> |
||
− | XTM does <b>not</b> support the following LRM resource types: |
||
+ | </ul> |
||
− | * .rjs |
||
+ | </ol> |
||
− | * .msg |
||
− | |||
− | ===XTM Special Instructions - parameters (e.g. %d, etc)=== |
||
− | XTM expects parameters in '''.strings''' resource files to be numbered. |
||
− | If not numbered, XTM will provide numbers during translation, which will result in a parameter mismatch error during LRM import. |
||
− | To avoid the error, number of the parameters in the base resource file. |
||
− | <br> |
||
− | For example, if you have the following in a .strings resource file: |
||
− | "Test.Key" = "Test %d and %d"; |
||
− | It should be changed to: |
||
− | "Test.Key" = "Test %1$d and %2$d"; |
||
− | |||
− | Note: a single parameter must be numbered. For example: |
||
− | "Test.Key_Single" = "Test %1$d"; |
Latest revision as of 22:30, 31 May 2022
Trados Enterprise uses FTP in order to pass files back and forth with Localyzer. However, because the structure on the FTP site for Trados Enterprise is organized by locale-named directories, the configuration to move files back and forth requires first a local vendor, which is then used by two Jenkins jobs, TradosEnterpriseUpload and TradosEnterpriseDownload to move files back and forth using FTP.
Contents
Install lftp
lftp is a Linux utility to transfer data and is used by two Jenkins jobs,
- TradosEnterpriseUpload
- TradosEnterpriseDownload
On Centos type system, as a user with 'sudo' priviledges, execute the following command:
sudo yum install lftp
To verify lftp is correctly installed, as the 'jenkins' user, type in this command and check it runs without errors:
lftp --version
Link Localyzer and Trados Enterprise
Configure a Local Vendor.
To begin working with Trados Enterprise, create or use the following directories on the Linux file system:
/var/lib/jenkins/translation/TradosEnterprise/to_translation
/var/lib/jenkins/translation/TradosEnterprise/from_translation
- Create an Trados Enterprise local vendor in Jenkins:
- Select Manage Jenkins->Configure System
- Scroll down to the LRM L10n Vendor Setup section and select Add Local Vendor
- Provide a unique vendor name
- Select Group or Project; if group, select group name from drop down list
- Configure Prep Kit Files Directory:
/var/lib/jenkins/translation/TradosEnterprise/to_translation
- Configure Imported Files Directory:
/var/lib/jenkins/translation/TradosEnterprise/from_translation
- Save
- Configure your Jenkins job to use Trados Enterprise local vendor:
- Select the Jenkins job you want to use Trados Enterprise
- Click Configure
- Scroll down to the L10n Vendor section of your LRM configuration
- Choose Group or Project; if project, click Local Vendor and then select the Local Vendor Name from the list
- Save
- Build (run) the Jenkins job
Configure and Enable Trados Enterprise Jenkins Jobs
- Enable the TradosEnterpriseUpload Jenkins job.
- Enable the TradosEnterpriseDownload Jenkins job.
- Make sure the Jenkins job TradosEnterpriseUpload trigger
Build after other projects are built
after DashboardPrepkit. - Modify the Jenkins job LocalVendorDownload and check
Build after other projects are built
and then in Projects to watch, type in TradosEnterpriseDownload.
Trados Enterprise Locale Mapping
Configure config_trados_enterprise_locale_mapping.properties which must be specified at the project config level.
This file maps locales from LRM to Trados Enterprise. For example, for a repository locale fr, it must be mapped to fr-FR for Trados Enterprise. The fr-FR must be the name of the directory in the FTP endpoint TO_RWS and FROM_RWS
# #Locale mapping language only repo locales <--> Trados Enterprise Locales aa=aa-DJ ab=ab-GE af=af-ZA ak=ak-GH am=am-ET ...
Configure FTP
- Set a Jenkins global variable:
- The name of the Jenkins variable must be:
TRADOS_ENTERPRISE_FTP
- The value of the variable must be in the form:
ftp://<user>@<FTP DNS>
-
Set the FTP credentials in ~jenkins/.netrc, which must correspond to the
TRADOS_ENTERPRISE_FTP
value - machine <FTP DNS>
- login <user>
- password <pwd>