Difference between revisions of "Special L10n Vendor Integrations"

From Lingoport Wiki
Jump to: navigation, search
(Lingotek)
(FTP / Recommended)
 
(4 intermediate revisions by 2 users not shown)
Line 11: Line 11:
 
== FTP / Recommended ==
 
== FTP / Recommended ==
 
Return to the [[ L10n Vendors | L10n Vendors ]] page for a detailed description and example using FTP as the vendor.
 
Return to the [[ L10n Vendors | L10n Vendors ]] page for a detailed description and example using FTP as the vendor.
  +
  +
==== Test Connection ====
  +
One minimal way to test the connection is to invoke the --test-connection command for the LRM project:
  +
<pre>
  +
java -jar lingoport-ftp-cli.jar --test-connection --group-name <GROUP> -project-name <PROJECT>
  +
INFO 2019-05-20 10:19:46,554 com.lingoport.ftp.connection.pipeline.TestConnectionPipelineContext.logIsDoneMessage: Test Connection process completed successfully.
  +
Process completed successfully.
  +
</pre>
   
 
==GlobalLink==
 
==GlobalLink==
Line 98: Line 106:
   
 
===Local Vendor Configuration===
 
===Local Vendor Configuration===
To choose a Local vendor for the prep/translated files, uncomment (or add) the <code>l10n.vendor=local</code> in the appropriate config_l10n_vendor.properties file.
+
To choose a Local vendor for the prep/translated files, uncomment (or add) the '''<code>l10n.vendor=local</code>''' in the appropriate '''<code>config_l10n_vendor.properties</code>''' file.
   
 
The information that is required when configuring a local vendor is:
 
The information that is required when configuring a local vendor is:
Line 110: Line 118:
   
 
==WorldServer==
 
==WorldServer==
To choose WorldServer as the vendor, uncomment the <code>l10n.vendor=worldserver</code> in the config_l10n_vendor.properties file.
+
To choose WorldServer as the vendor, uncomment the '''<code>l10n.vendor=worldserver</code>''' in the '''<code>config_l10n_vendor.properties</code>''' file.
   
 
With the WorldServer integration, files to be translated are sent via the WorldServer API to a Workflow/Client; The translated files are returned via FTP.
 
With the WorldServer integration, files to be translated are sent via the WorldServer API to a Workflow/Client; The translated files are returned via FTP.
Line 151: Line 159:
 
* LRM uses the [https://docs.sdl.com/LiveContent/content/en-US/SDL%20WorldServer%20Developer%20Documentation-v1/GUID-0DEE2BEB-B752-478E-ABD9-C9DF7C0D37AB| wssdk-client .jar file to communicate with WorldServer ] when sending files to be translated
 
* LRM uses the [https://docs.sdl.com/LiveContent/content/en-US/SDL%20WorldServer%20Developer%20Documentation-v1/GUID-0DEE2BEB-B752-478E-ABD9-C9DF7C0D37AB| wssdk-client .jar file to communicate with WorldServer ] when sending files to be translated
 
* For instance, the URL could look like <code>https://lingoport.worldserver.com/ws-legacy</code>
 
* For instance, the URL could look like <code>https://lingoport.worldserver.com/ws-legacy</code>
  +
==== Test Connection ====
* One minimal way to test the connection is to invoke a command for an LRM project:
 
  +
One minimal way to test the connection is to invoke the --test-connection command for the LRM project:
 
<pre>
 
<pre>
java -jar lingoport-ws-cli.jar -tc -gn <GROUP> -pn <PROJECT>
+
java -jar lingoport-ws-cli.jar --test-connection --group-name <GROUP> -project-name <PROJECT>
 
INFO 2019-04-25 10:33:58,638 com.lingoport.lrm.persistence.LrmConnectionFactory.buildSqlSessionFactory: Connect to database successful.
 
INFO 2019-04-25 10:33:58,638 com.lingoport.lrm.persistence.LrmConnectionFactory.buildSqlSessionFactory: Connect to database successful.
 
INFO 2019-04-25 10:34:00,489 com.lingoport.ws.pipeline.stage.TestWorldserverConnectionStage.execute: Testing the Worldserver Connection
 
INFO 2019-04-25 10:34:00,489 com.lingoport.ws.pipeline.stage.TestWorldserverConnectionStage.execute: Testing the Worldserver Connection
Line 160: Line 169:
 
Process completed successfully.
 
Process completed successfully.
 
</pre>
 
</pre>
 
   
 
=== WorldServer Project Type Mapping===
 
=== WorldServer Project Type Mapping===

Latest revision as of 16:20, 20 May 2019

Overview

LRM supports 5 localization paths for sending files to be translated. They are:

  • Local - Files are kept on the system LRM resides on. This is good for debugging.
  • FTP - FTP/SFTP. The typical method of sending resource files to/from translation.
  • API Based:
    • GlobalLink
    • Lingotek
    • Worldserver

FTP / Recommended

Return to the L10n Vendors page for a detailed description and example using FTP as the vendor.

Test Connection

One minimal way to test the connection is to invoke the --test-connection command for the LRM project:

 java -jar lingoport-ftp-cli.jar --test-connection --group-name <GROUP> -project-name <PROJECT>
 INFO 2019-05-20 10:19:46,554 com.lingoport.ftp.connection.pipeline.TestConnectionPipelineContext.logIsDoneMessage: Test Connection process completed successfully.
Process completed successfully.

GlobalLink

GlobalLink Configuration

To choose GlobalLink as the vendor, uncomment the l10n.vendor=globallink in the config_l10n_vendor.properties file.

The information that is needed to upload the files to be translated as well as retrieve translated files is:

#GLOBALLINK
#globallink.url=

#globallink.password.for.upload=
#globallink.username.for.upload=

#globallink.password.for.download=
#globallink.username.for.download=

#globallink.project.name=A dedicated LRM project is required
#globallink.project.shortcode=

#Owner is not required
#globallink.owner=

#When to download files - 1 is on completed status (default), 2 is for preliminary targets based on workflow steps
#globallink.download.option=1

GlobalLink Locale Mapping

GlobalLink does not allow language only locales. For example, 'fr' instead of 'fr_FR'. If there are LRM target locales that are language-only, then a mapping between the LRM locale and the GlobalLink locale should be entered into config_gl_locale_mapping.properties file if it doesn't already exist.

Though the default location for the configuration file is at the global level (<HOME>/Lingoport_Data/L10nStreamlining/config), the file may also reside at the group or project level. The configuration file also exists in the LRM install directory's <HOME>/lingoport/lrm-server-x.y/deploy/templates/dir_structure/global/config folder.

#Mapping between the lrm target locale and their corresponding GlobalLink target locale
#lrm locale = globallink locale
es = es_es

GlobalLink File Format Mapping

The config_gl_file_format.properties file contains the mapping between LRM supported extensions and their corresponding GlobalLink file formats

Though the default location for the configuration file is at the global level (<HOME>/Lingoport_Data/L10nStreamlining/config), the file may also reside at the group or project level. The configuration file also exists in the LRM install directory's <HOME>/lingoport/lrm-server-x.y/deploy/templates/dir_structure/global/config folder.

Lingotek

To choose Lingotek as the vendor, uncomment the l10n.vendor=lingotek in the config_l10n_vendor.properties file.

The information that is needed to upload the files to be translated as well as retrieve translated files is:

#Lingotek Attributes
#Contains the host URL and api request formats
lingotek.api.hosturl=https://cms.lingotek.com

#Contains the ids for community, workflow and access token
lingotek.api.id.access.token=
lingotek.api.id.community=
lingotek.api.id.workflow=

#Example callbackURL - replace job name (lingotek) with actual Jenkins job name
lingotek.api.callbackurl=http://jenkins.company.com:8080/buildByToken/buildWithParameters?job=LingotekCallback&token=LINGOSQUARE&

#{0} is the access.token
lingotek.api.bearer=Bearer {0}

Lingotek Locale Mapping

Lingotek does not allow language only locales. If there are LRM target locales that are language-only, then a mapping between the LRM locale and the Lingotek locale should be entered into config_lingotek_locale_mapping.properties file if it doesn't already exist.

The default location for the configuration file is at the group level (<HOME>/Lingoport_Data/L10nStreamlining/<group name>/config). The configuration file also exists in the LRM install directory's <HOME>/lingoport/lrm-server-x.y/deploy/templates/dir_structure/group/config folder.

#
#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
...

Local Vendor

The Local vendor is used for storing the prep/translated files on the local machine (the same machine where LRM is running). This type of vendor is useful when testing out LRM.

Local Vendor Configuration

To choose a Local vendor for the prep/translated files, uncomment (or add) the l10n.vendor=local in the appropriate config_l10n_vendor.properties file.

The information that is required when configuring a local vendor is:

##LOCAL VENDOR
##Absolute path for zip files to translation (outgoing)
local.out.absolute.path=
##Absolute path for zip files from translation (incoming)
local.in.absolute.path=

WorldServer

To choose WorldServer as the vendor, uncomment the l10n.vendor=worldserver in the config_l10n_vendor.properties file.

With the WorldServer integration, files to be translated are sent via the WorldServer API to a Workflow/Client; The translated files are returned via FTP.

The information that is needed to upload the files to be translated as well as retrieve translated files is:

#WORLDSERVER Attributes
## Worldserver attributes for import kit files
worldserver.in.host=
worldserver.in.location.path=
worldserver.in.password=
worldserver.in.port=22
#SSH, SSL or blank (for FTP)
worldserver.in.ftp.protocol=SSH
worldserver.in.username=
## ssl implicit flag. Set to 0 for explicit, set to 1 for implicit
worldserver.in.ssl.implicit=0

##Zip file name that contains the translated files needs to beone of the following options.
## Option #1 for zip file prefix - Default
worldserver.in.file.name.prefix=${groupname}.${projectname}.${kitversion}.${lrmlocale}
## Option #2 for zip file prefix
#worldserver.in.file.name.prefix=${groupname}.${projectname}.${kitversion}.${wslocale}
## Option #3 for zip file prefix
#worldserver.in.file.name.prefix=${groupname}.${projectname}.${kitversion}.${lrmlocale}.${wslocale}

## WorldServer attributes for send kit files
worldserver.out.url=
worldserver.out.user=
worldserver.out.password=
worldserver.client=
## Available tokens ${groupname},${projectname},${kitversion},${lrmlocale}, ${wslocale}
worldserver.out.project.name=${groupname}.${projectname}.${kitversion}.${lrmlocale}

WorldServer URL Endpoint

The worldserver.out.url needs to be configured with the proper URL endpoint for your WorldServer instance.

Test Connection

One minimal way to test the connection is to invoke the --test-connection command for the LRM project:

 java -jar lingoport-ws-cli.jar --test-connection --group-name <GROUP> -project-name <PROJECT>
 INFO 2019-04-25 10:33:58,638 com.lingoport.lrm.persistence.LrmConnectionFactory.buildSqlSessionFactory: Connect to database successful.
 INFO 2019-04-25 10:34:00,489 com.lingoport.ws.pipeline.stage.TestWorldserverConnectionStage.execute: Testing the Worldserver Connection
 [...]
 INFO 2019-04-25 10:34:03,953 com.lingoport.ws.pipeline.connection.TestConnectionPipelineContext.logIsDoneMessage: Connection to Worldserver was successful
Process completed successfully.

WorldServer Project Type Mapping

The config_ws_locale_projecttype_mapping.properties configuration file contains the mapping between a LRM target locale and the WorldServer project type. All LRM target locales must be represented in this configuration file.

WorldServer Locale Mapping

The config_ws_locale_mapping.properties configuration file contains the mapping between the LRM target locales and the unique WorldServer locale. The mappings must be unique!

All target locales must be represented in this configuration file.

The configuration file can exist at the project level and group levels. The configuration file also exists in the LRM install directory's <HOME>/lingoport/lrm-server-x.y/deploy/templates/dir_structure/group/config folder.

The configuration file can exist at the project level and group levels. The configuration file also exists in the LRM install directory's <HOME>/lingoport/lrm-server-x.y/deploy/templates/dir_structure/group/config folder. the files are mostly named with a two letters locale, like for instance messages_en.json, messages_fr.json, as opposed to a 'four letters' locale, like messages_en_EN.json or messages_fr_FR.json. See Chinese for a bit more on the subject.

To set up the mapping, determine for a group or a project how the locale is defined (2 letters, 4 letters, other) and put on the left side the locale indication on the files or the directories and on the right side the WS locales, to be checked against your WS instance.

In the following mapping example, the repository files are in the form message_fr.json. Example of config_ws_locale_mapping.properties :

en=000_English
es=002_Spanish
da=110_Danish
bg=112_Bulgarian
hr=119_Croatian
nl=120_Dutch
cs=121_Czech
et=124_Estonian
fi=130_Finnish
ka=131_Georgian
el=133_Greek
hu=135_Hungarian
fr=140_French
de=150_German
lv=153_Latvian
lt=156_Lithuanian
mk=158_Macedonian
mt=159_Maltese
it=160_Italian
pl=166_Polish
ro=171_Romanian
ru=173_Russian
sk=176_Slovak
sl=177_Slovenian
sv=180_Swedish
tr=186_Turkish
is=190_Icelandic
uk=192_Ukrainian
hy=201_Armenian
pt=059_Portuguese
km=258_Cambodian
zh=265_Chinese
zh_hans=266_Chinese (Simplified)
hi=294_Hindi
id=299_Indonesian
ja=300_Japanese
ko=320_Korean
lo=331_Laotian
mn=363_Mongolian
th=425_Thai
vi=435_Vietnamese
fj=858_Fijian
sm=890_Samoan
to=900_Tongan
ht=036_Haitian
ms=348_Malay
no=170_Norwegian
sq=101_Albanian
sr=202_Serbian (Cyrillic)
mg=654_Malagasy
sw=743_Swahili