Difference between revisions of "Memsource"
(→Link LRM and Memsource) |
(→Memsource Configuration) |
||
(28 intermediate revisions by 2 users not shown) | |||
Line 1: | Line 1: | ||
===Link LRM and Memsource=== |
===Link LRM and Memsource=== |
||
+ | To begin working with Memsource, create or use an existing Jenkins project configured with LRM. |
||
<ol> |
<ol> |
||
<li> |
<li> |
||
+ | Configure the file <HOME>/Lingoport_Data/L10nStreamlining/config/'''config_memsource_tofrom.properties''': |
||
− | Configure '''config_l10n_vendor.properties''' (which can be specified at the group or project config level): |
||
</li> |
</li> |
||
<ul> |
<ul> |
||
− | <li> |
+ | <li>configure '''<code>memsource.out.to.translation.dir</code>'''</li> |
− | <li>configure '''<code> |
+ | <li>configure '''<code>memsource.in.from.translation.dir</code>'''</li> |
− | <li>configure '''<code>local.in.absolute.path</code>'''</li> |
||
</ul> |
</ul> |
||
<li> |
<li> |
||
+ | Create a Memsource Local Vendor in Jenkins: |
||
− | Configure <HOME>/Lingoport_Data/L10nStreamlining/config/'''config_memsource_tofrom.properties''': |
||
</li> |
</li> |
||
<ul> |
<ul> |
||
− | <li> |
+ | <li>Select '''Manage Jenkins->Configure System'''</li> |
+ | <li>Scroll down to the <b>LRM L10n Vendor Setup</b> section and select <b>Add Local Vendor</b></li> |
||
− | <li>configure '''<code>memsource.from.translation.dir</code>'''</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>Configure Prep Kit Files Directory; this must match <code>memsource.out.to.translation.dir</code> in config_memsource_tofrom.properties</li> |
||
+ | <li>Configure Imported Files Directory; this must match <code>memsource.in.from.translation.dir</code> in config_memsource_tofrom.properties</li> |
||
+ | <li>Save</li> |
||
</ul> |
</ul> |
||
<li> |
<li> |
||
+ | Configure your Jenkins job to use Memsource Local Vendor: |
||
− | Modify the Jenkins job <b>LocalVendorDownload</b> and check <b>Build after other projects are built</b> and then in <b>Projects to watch</b>, type in <b>MemsourceCallback</b>. |
||
</li> |
</li> |
||
+ | <ul> |
||
+ | <li>Select the Jenkins job you want to use Memsource</li> |
||
+ | <li>Click Configure</li> |
||
+ | <li>Scroll down to the <b>L10n Vendor</b> section of your LRM configuration</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> |
||
+ | </ul> |
||
+ | </ol> |
||
+ | |||
+ | ===Configure and Enable Memsource Jenkins Jobs=== |
||
+ | <ol> |
||
+ | <li>Enable the <b>MemsourceCallback</b> Jenkins job and modify the token value or keep the default.</li> |
||
+ | <li>Enable the <b>MemsourceCheckCallback</b> Jenkins job.</li> |
||
+ | <li>Enable the <b>MemsourceSend</b> Jenkins job.</li> |
||
+ | <li>Modify the Jenkins job <b>LocalVendorDownload</b> and check <b>Build after other projects are built</b> and then in <b>Projects to watch</b>, type in <b>MemsourceCallback</b>.</li> |
||
</ol> |
</ol> |
||
Line 41: | Line 61: | ||
memsource.api.project.template.id= |
memsource.api.project.template.id= |
||
memsource.api.source.locale=en |
memsource.api.source.locale=en |
||
− | memsource.api.callbackURL=http://<your_machine> |
+ | memsource.api.callbackURL=http://<your_machine>/jenkins/generic-webhook-trigger/invoke?token=<the_token_configured_in_MemsourceCallback> |
+ | # |
||
+ | # You can test your callback configuration using curl on the command line: |
||
+ | # curl http://<your_machine>/jenkins/generic-webhook-trigger/invoke?token=<the_token_configured_in_MemsourceCallback> |
||
+ | # A successful curl command looks similar to: |
||
+ | # {"jobs":{"MemsourceCallback":{"regexpFilterExpression":"", |
||
+ | # "triggered":true, |
||
+ | # "resolvedVariables: {"memsourceProjectId":""}, |
||
+ | # "regexpFilterText":"", |
||
+ | # "id":2180, |
||
+ | # "url":"queue/item/2180/"}}, |
||
+ | # "message":"Triggered jobs."} |
||
+ | # |
||
</pre> |
</pre> |
||
+ | |||
+ | <b>Note:</b> a Memsource Server will be calling back to a Jenkins job on your machine as files are translated, so your machine will need to grant access to the Memsource Server. Since Memsource has many Servers, you will need to grant access to all of them. Click [https://help.memsource.com/hc/en-us/articles/360010299660-Memsource-servers-IP-addresses here] to see the current list ip addresses of all Memsource Servers. |
||
===Memsource Locale Mapping=== |
===Memsource Locale Mapping=== |
||
Configure '''config_memsource_locale_mapping.properties''' (which can be specified at the group or project config level).<br> |
Configure '''config_memsource_locale_mapping.properties''' (which can be specified at the group or project config level).<br> |
||
This file maps locales from LRM to Memsource. |
This file maps locales from LRM to Memsource. |
||
− | |||
− | The default location for the configuration file is at the group level (<HOME>/Lingoport_Data/L10nStreamlining/<group name>/config). |
||
<pre> |
<pre> |
||
Line 63: | Line 95: | ||
... |
... |
||
</pre> |
</pre> |
||
+ | |||
+ | ===LRM Resource Types Supported by Memsource=== |
||
+ | |||
+ | Memsource supports the following LRM resource types: |
||
+ | * .html, .htm |
||
+ | * .json |
||
+ | * .po |
||
+ | * .properties |
||
+ | * .resx |
||
+ | * .rc |
||
+ | * .strings |
||
+ | * strings.xml |
||
+ | * .txt |
||
+ | * .yaml, .yml |
||
+ | |||
+ | |||
+ | Memsource does <b>not</b> support the following LRM resource types: |
||
+ | * .rjs |
||
+ | * .rxml |
||
+ | * .msg |
Latest revision as of 21:22, 17 June 2020
Contents
Link LRM and Memsource
To begin working with Memsource, create or use an existing Jenkins project configured with LRM.
- Configure the file <HOME>/Lingoport_Data/L10nStreamlining/config/config_memsource_tofrom.properties:
- configure
memsource.out.to.translation.dir
- configure
memsource.in.from.translation.dir
- Create a Memsource 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; this must match
memsource.out.to.translation.dir
in config_memsource_tofrom.properties - Configure Imported Files Directory; this must match
memsource.in.from.translation.dir
in config_memsource_tofrom.properties - Save
- Configure your Jenkins job to use Memsource Local Vendor:
- Select the Jenkins job you want to use Memsource
- 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
Configure and Enable Memsource Jenkins Jobs
- Enable the MemsourceCallback Jenkins job and modify the token value or keep the default.
- Enable the MemsourceCheckCallback Jenkins job.
- Enable the MemsourceSend Jenkins job.
- Modify the Jenkins job LocalVendorDownload and check Build after other projects are built and then in Projects to watch, type in MemsourceCallback.
Memsource Configuration
Configure the Memsource settings in the config_memsource_vendor.properties (which can be specified at the group or project config level).
# # Contains configuration for memsource # # To configure the token, follow these instructions: # https://help.memsource.com/hc/en-us/articles/115003461011-How-to-Setup-OAuth-Authentication-in-Memsource # # Run the following command to list the currently available template ids: # (note that template ids can support any target locale, not just the listed ones) # java -jar lingoport-memsource-cli.jar --list-templates -t <token> # # Make sure to configure the callback for your machine # memsource.api.token= memsource.api.project.template.id= memsource.api.source.locale=en memsource.api.callbackURL=http://<your_machine>/jenkins/generic-webhook-trigger/invoke?token=<the_token_configured_in_MemsourceCallback> # # You can test your callback configuration using curl on the command line: # curl http://<your_machine>/jenkins/generic-webhook-trigger/invoke?token=<the_token_configured_in_MemsourceCallback> # A successful curl command looks similar to: # {"jobs":{"MemsourceCallback":{"regexpFilterExpression":"", # "triggered":true, # "resolvedVariables: {"memsourceProjectId":""}, # "regexpFilterText":"", # "id":2180, # "url":"queue/item/2180/"}}, # "message":"Triggered jobs."} #
Note: a Memsource Server will be calling back to a Jenkins job on your machine as files are translated, so your machine will need to grant access to the Memsource Server. Since Memsource has many Servers, you will need to grant access to all of them. Click here to see the current list ip addresses of all Memsource Servers.
Memsource Locale Mapping
Configure config_memsource_locale_mapping.properties (which can be specified at the group or project config level).
This file maps locales from LRM to Memsource.
# #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 ab=ab ach=ach af=af af_na=af_na ...
LRM Resource Types Supported by Memsource
Memsource supports the following LRM resource types:
- .html, .htm
- .json
- .po
- .properties
- .resx
- .rc
- .strings
- strings.xml
- .txt
- .yaml, .yml
Memsource does not support the following LRM resource types:
- .rjs
- .rxml
- .msg