Localyzer Projects

From Lingoport Wiki
Revision as of 21:58, 18 June 2019 by Rdaly (talk | contribs)
Jump to: navigation, search

Creating a project in Jenkins

New project

LRM creates projects using a Project Definition XML file that contains information about the resources and types for translation and then calling the Create Project Command.

This is automated in Jenkins with the Lingoport plugin.

JenkinsNewProject.jpg

To create a new project:

  1. Select New Item from the menu on the left
  2. In the dialog box, enter the name of the new project. The name must be of the form <group>.<project>, where the group is the name associated with the LRM license. If you are unsure about the group name, a Jenkins job called <group>.LicenseExpiration should have been created at installation. Use that <group> name.
  3. In the Copy from box, enter Lingoport.SampleLRM or LingoportSampleLiteLRM.

Note-a project can be created using either the project definition file directly on the command line or through the Jenkins LRM Plugin.

Configure the project

Set the git directory

GithubProject.jpg

Set the Project url to the URL for the GitHub repository with the code.

Set the repository info and the branch name for the code.

Set up the Git Repository and the branch

JenkinsGitRepo.jpg

Make sure that the Repository URL and the Branch Specifier are correct.

Set the General Settings and Locales JenkinsLRMSettings.jpg

The Top Level Directory is defaulted to $WORKSPACE. That means that LRM looks at the whole repository to find the resource files. This can be changed to look at only specific directories if you know where the resource files are kept.

The Send Unique Filenames checkbox is unchecked. Check this if the resource files are in the form:

folder1:
  en_US.properties
folder2:
  en_US.properties

There are two resource files called en_US.properties. These will be given unique filenames in the prep kit when sent to the translation system and then imported back to the correct location.

Any number of locales in various formats including LCID can be entered.

Set up the Resource File Extensions

JenkinsLRMResourceFileExtensions.jpg

  • In this example, the resource file type extension and parser type is 'properties' and 'rc'.
  • We are using the default Parameter Regex Pattern.
  • The Filename pattern is *_l_c_v which means that it expects filenames to be in the form 'something_xx_yy.properties'.
  • Since Use Pattern on Default Locale is checked, LRM will look for the Filename pattern on the resource file for the default locale.
  • File Location Pattern is empty, so all the resource files will be located in the same directory.
  • Use Location Pattern on Default Locale is unchecked. It can't be checked if File Location Pattern is empty, but it tells what the directories will look like for the base and translated resources.
  • Using these variables, the Jenkins job gives and example of the Base Resource File. It should be of the form file1_en_us.properties and the target resources will be of the form file1_zh_hans_tw.properties. If the resource files do not conform to these settings, errors and missed files might occur.