Difference between revisions of "LRM Unique File Names"

From Lingoport Wiki
Jump to: navigation, search
(LRM Unique File Names)
(LRM Unique File Names)
 
Line 1: Line 1:
 
= LRM Unique File Names =
 
= LRM Unique File Names =
In order to minimize the number of prep kits send for translation, LRM can rename files so the filenames are unique. The files are sent to translation with a unique name, returned with that unique name, and renamed back to the proper original name convention for the repository.
+
In order to minimize the number of prep kits sent for translation, LRM can rename files so the filenames are unique. The files are sent to translation with a unique name, returned with that unique name, and renamed back to the proper original name convention for the repository.
   
 
== Example of a project that has base resource files with the same name ==
 
== Example of a project that has base resource files with the same name ==

Latest revision as of 17:57, 5 June 2019

LRM Unique File Names

In order to minimize the number of prep kits sent for translation, LRM can rename files so the filenames are unique. The files are sent to translation with a unique name, returned with that unique name, and renamed back to the proper original name convention for the repository.

Example of a project that has base resource files with the same name

Example file structure:
   resources
      folder1
           en.json
           fr.json
      folder2
           en.json
           fr.json
      folder3
           en.json
           fr.json

If changes were made to all of the base resource files (the en.json files) and a prep kit was called, then 3 prep kits would be sent to the project's L10n Vendor. This is because each prep kit folder is required to have unique file names.

To allow for all 3 of these changed resource files in 1 prep kit, unique file names must be created.

Setup Unique File Names for Project

In order to send unique file names to the L10n Vendor, the project's send-unique-file-names flag must be set to 1 (true). This flag can to be turned on/off at any time through the Run LRM build plugin in the project's Automation job.

Unique File Name Structure

The unique file name has the following parts:

  • LID
  • Hash of the file's absolute path
  • _
  • file name
Base Resource File: /var/lib/jenkins/jobs/project1/workspace/resources/en.json
Unique File name: LID45656543_en.json where 456456543 is the hash of the absolute path of the base resource file.

Prep and Import Unique File Names

Once the send unique file names flag is set to true, unique file names will be sent to the L10n Vendor.

On import, the unique file name will be checked for any type of import errors. If there are no import errors, then the translated text will be incorporated into the translated file in the source repository. The unique file names are not in the source repository. They are only used during the prep/import process.