Difference between revisions of "LRM Fixing Issues"

From Lingoport Wiki
Jump to: navigation, search
(Why, when I create a project, do I get an error stating that no resource files were found (Error 500)?)
(Modified text does not seem to be recognized as a change in my base resource file. What is wrong?)
(42 intermediate revisions by 3 users not shown)
Line 1: Line 1:
  +
== Create/Update LRM Project ==
 
 
===How can I tell if my [[Terms_and_Definitions|LRM project]] is setup correctly?===
 
===How can I tell if my [[Terms_and_Definitions|LRM project]] is setup correctly?===
Once you've created your [[Terms_and_Definitions|LRM project]] run the project inspect report;
+
Once you've created your [[Terms_and_Definitions#LRMProject|LRM project]], run the '''project inspect''' report;
 
<pre>
 
<pre>
> java -jar lrm-cli.jar -r -pi -pn YourProjectName -gn GroupName
+
> java -jar lrm-cli.jar -r -pi -pn <ProjectName> -gn <GroupName>
  +
> java -jar lrm-cli.jar --report --project-inspect --project-name <ProjectName> --group-name <GroupName>
 
The following reports were generated:
 
The following reports were generated:
/var/lib/jenkins/Lingoport_Data/LRM/GroupName/reports/YourProjectName/ProjectInspect_en_us.xml
+
/var/lib/jenkins/Lingoport_Data/LRM/<GroupName>/reports/<ProjectName>/ProjectInspect_en_us.xml
/var/lib/jenkins/Lingoport_Data/LRM/GroupName/reports/YourProjectName/ProjectInspect_de_de.xml
+
/var/lib/jenkins/Lingoport_Data/LRM/<GroupName>/reports/<ProjectName>/ProjectInspect_de_de.xml
/var/lib/jenkins/Lingoport_Data/LRM/GroupName/reports/YourProjectName/ProjectInspect_fr_fr.xml
+
/var/lib/jenkins/Lingoport_Data/LRM/<GroupName>/reports/<ProjectName>e/ProjectInspect_fr_fr.xml
  +
/var/lib/jenkins/Lingoport_Data/L10nStreamlining/<GroupName>/projects/<ProjectName>/reports/project_inspect_files.txt
 
Process completed successfully.
 
Process completed successfully.
 
</pre>
 
</pre>
   
This command generates reports in your reports folder for each locale specified in the [[Terms_and_Definitions|project definition file]]. Each report shows the location of the [[Terms_and_Definitions|resource files]], the number of files to be translated, and the file names.
+
This command generates reports in your reports folder for ''each locale'' specified in the [[Terms_and_Definitions#projectdefn|project definition file]]. Each report shows the location of the [[Terms_and_Definitions#resourcefile|resource files]], the number of files to be translated, and the file names.
   
 
<pre>
 
<pre>
Line 28: Line 30:
 
</pre>
 
</pre>
   
  +
In addition, file ''project_inspect_files.txt'' is created listing all of the absolute paths of the corresponding target files for each base resource file. The following is an example where:
===What extensions are supported by LRM?===
 
  +
* The group name is ''GroupName''
Lingoport Resource Manager supports the following file extensions:
 
  +
* The project name is ''YourProjectName''
  +
* The top level source directory defined in the project definition is ''location/of/files/resources''
  +
* In the project definition, extension ''json'' has a name of pattern of ''*.l_c_v''. The default locale files for this extension does not use the name pattern. There is no location pattern.
  +
* In the project definition, extension ''properties'' has a name of pattern of ''*_l_c_v''. The default locale files for this extension does not use the name pattern. There is no location pattern.
  +
* In the project definition, extension ''rjs'' has a name of pattern of ''*-l-c-v''. The default locale files for this extension does not use the name pattern. There is no location pattern.
   
  +
<pre>
* '''.json''' (with some restrictions for L10n purposes - See [[JSON Resource Bundles]] - Mostly JavaScript, and other programming languages)
 
  +
/var/lib/jenkins/jobs/GroupName.YourProjectName/workspace/location/of/files/resources/file1.fr_fr.json
* '''.msg''' (C, C++, ...)
 
  +
/var/lib/jenkins/jobs/GroupName.YourProjectName/workspace/location/of/files/resources/file1.es_mx.json
* '''.po''' files
 
  +
/var/lib/jenkins/jobs/GroupName.YourProjectName/workspace/location/of/files/resources/file2_fr_fr.properties
* '''.properties''' files (for instance, Java-type resources)
 
  +
/var/lib/jenkins/jobs/GroupName.YourProjectName/workspace/location/of/files/resources/file2_es_mx.properties
* '''.resx''' files (used in the .Net world)
 
  +
/var/lib/jenkins/jobs/GroupName.YourProjectName/workspace/location/of/files/resources/file3-fr-fr.rjs
* '''.rc''' (Delphi, ...)
 
  +
/var/lib/jenkins/jobs/GroupName.YourProjectName/workspace/location/of/files/resources/file3-es-mx.rjs
* '''.rjs''' (for JavaScript)
 
  +
</pre>
* '''.rxml''' (for xml)
 
  +
* '''.strings''' (Mobile iOS)
 
  +
You may need to edit your project definition. See [[Supported_Resource_Bundles#Lingoport_Resource_Manager_Configuration|Project Definition]] for information about configuring a LRM project.
* '''strings.xml''' (Android)
 
  +
  +
===What extensions are supported by LRM?===
  +
See [[Supported_Resource_Bundles|Supported Resource Bundles]] for an up to date list of supported resource file types.
   
 
===How do I fix "Error 202 - extension not supported" when updating or creating my project?===
 
===How do I fix "Error 202 - extension not supported" when updating or creating my project?===
Verify that the [[Terms_and_Definitions|project definition xml]] contains a supported extension. A valid extension does not include a period. For example, if the extension is for ".properties" files then the xml value should be:
+
* Verify that the [[Terms_and_Definitions|project definition xml]] contains a supported extension. A valid extension does not include a period. For example, if the extension is for ".properties" files then the xml value should be:
 
<pre>
 
<pre>
 
<extension>properties</extension>
 
<extension>properties</extension>
Line 51: Line 61:
 
<extension>.properties</extension>
 
<extension>.properties</extension>
 
</pre>
 
</pre>
  +
* Verify that it is a supported extension. See [[Supported_Resource_Bundles|Supported Resource Bundles]].
   
 
===How do I fix "Error 215 - incorrect pattern for extension" when updating or creating my project?===
 
===How do I fix "Error 215 - incorrect pattern for extension" when updating or creating my project?===
 
There are two supported patterns, '''LCID''' or '''language/country/variant'''.
 
There are two supported patterns, '''LCID''' or '''language/country/variant'''.
* For '''LCID''' - no other alpha characters are allowed except for ''LCID''. For example, you could have a file name pattern "*_LCID" which, in the case of an fr_FR target locale, would result in "myResources_1036.po" as the filename of the translated [[Terms_and_Definitions|resource file]].
+
* For '''LCID''' - no other alpha characters are allowed except for ''LCID''. For example, you could have a file name pattern "*_LCID" which, in the case of an fr_FR target locale, would result in "myResources_1036.po" as the filename of the translated [[Terms_and_Definitions#resourcefile|resource file]].
 
<pre>
 
<pre>
 
<file-name-pattern>*_LCID</file-name-pattern>
 
<file-name-pattern>*_LCID</file-name-pattern>
Line 64: Line 75:
   
 
===How do I fix "Error 218 - invalid base file encoding" and "Error 219 - invalid localized file encoding" when updating or creating my project?===
 
===How do I fix "Error 218 - invalid base file encoding" and "Error 219 - invalid localized file encoding" when updating or creating my project?===
  +
LRM is written in Java and the encodings available to the system are Java based, even if your environment is not Java.
The supported encodings vary between different implementations of the java platform. For example, the list of supported encodings supported by Java SE 8 is found here ''http://docs.oracle.com/javase/8/docs/technotes/guides/intl/encoding.doc.html''. The encoding that should be copied into the project definition xml is located under column "''Canonical Name for java.nio API''". Every implementation of Java is required to support the following encodings.
 
  +
  +
The supported encodings vary between different implementations of the Java platform. For example, the list of supported encodings supported by Java SE 8 is found here ''http://docs.oracle.com/javase/8/docs/technotes/guides/intl/encoding.doc.html''. The encoding that should be copied into the project definition xml is located under column '''"''Canonical Name for java.nio API''"'''. Every implementation of Java is required to support the following encodings.
 
* US-ASCII
 
* US-ASCII
 
* ISO-8859-1
 
* ISO-8859-1
Line 72: Line 85:
 
* UTF-16
 
* UTF-16
   
  +
===Why, when I create a project, do I get an error stating that no resource files were found (Error 500)?===
  +
It sounds as if your project is not setup correctly. Check the project definition file used to create the project. Configuration settings to check are:
  +
* ''<top-level-dir>'' - this is the path to the source code (resource files) for the LRM Project.
  +
<pre>
  +
<top-level-dir>/var/lib/jenkins/path/to/my/resource_files</top-level-dir>
  +
</pre>
  +
* Patterns for your resource file names:
  +
** ''<file-name-pattern>...</file-name-pattern>'' - verify that the separator characters are correct for your localized resource file names. For example, if your French Canadian localized resource file names are of the form "myResources_fr_CA.properties" then set the following: <pre><file-name-pattern>*_l_c_v</file-name-pattern></pre>
  +
** ''<use-pattern-on-dflt-locale>.</use-pattern-on-dflt-locale>'' - Set to "1", it indicates you will use base resource files that include the default locale in their filenames. For example, if the default locale is set to "en_US" and the file-name-pattern for "properties" resource files is set to "*_l_c_v", then LRM will look for "myResources_en_US.properties" when creating a kit of files to be sent out for translation. If set to "0", then LRM will look for base resource files that do not have the default locale as part of their filenames. Using our "properties" file example, LRM will look for "myResources.properties" when creating files for translation.<pre><use-location-pattern-on-dflt-locale>0</use-location-pattern-on-dflt-locale></pre>
  +
** ''<file-location-pattern>...</file-location-pattern>'' - verify that the separator characters are correct.
  +
* ''<include-dir>...</include-dir>'' - verify that the value is a valid Ant formatting directive. If there is no value then only those files directly under the ''base-src-dir'' + ''top-level-dir'' will be searched; no recursive search will occur. To include all folders under the full path, enter a value of ''**/**''. You can then exclude other folders by adding additional exclude Ant directives. Format for ''<include-dir>'' is: <pre><include-dir>**/**</include-dir></pre>
  +
* ''<exclude-dir-file>...</exclude-dir-file>'' - verify that the value is a valid Ant formatting directive and that you're not excluding valid files/folders. Format for ''<exclude-dir>'' is: <pre><exclude-dir-file>...</exclude-dir-file></pre>
  +
  +
== L10n Vendors ==
  +
=== FTP ===
  +
==== I configured a vanilla FTP (not SSH or SSL) and I get an SSH error====
  +
  +
If you configure an FTP end point and you get a message from SSH, it means you are reaching an SSH FTP endpoint and that endpoint does not understand the request which follows a different protocol (FTP).
  +
  +
For instance, you may get this error:
  +
  +
<code>org.apache.commons.net.MalformedServerReplyException: Could not parse response code.</code>
  +
<code>Server Reply: SSH-2.0-OpenSSH_4.3</code>
  +
  +
A possible issue may be the port number: port 22 is typically used for FTP/SSH; port 21 is typically used for vanilla FTP. Change the port number in '''config_l10n_vendor.properties''' and test again.
  +
  +
== Prep Kit ==
 
===When we generate the first prep kit with LRM, will all the base locale resource files be extracted, or only those base locale resource files that have corresponding localized files that have not been translated?===
 
===When we generate the first prep kit with LRM, will all the base locale resource files be extracted, or only those base locale resource files that have corresponding localized files that have not been translated?===
   
Since none of the base resource files are in the LRM system, all the base locale resource files will be extracted and placed in the appropriate localized prep kit folders. You will then rely on the localization vendor’s translation memory to translate resource files that may have already been translated.
+
For the '''first prep kit''', only those base locale resource files that have corresponding localized files that have not been translated are sent out for translation. This includes missing keys or missing files.
   
  +
'''After the first prep kit''', LRM is able to detect modified text as well as missing keys and missing files. It's always a good idea that the prep kit command is executed after creating a project in order for the files to get into the system in order to monitor text changes.
Create an LRM project that has no translations, only base resource files with 2 locales: fr_FR and de_DE
 
  +
<pre>
 
  +
For example let's say you have a project with:
> java -jar lrm-cli.jar -cp -f project_definition.xml -gn GroupName
 
  +
* 3 locales: en_US (base locale), fr_FR and de_DE.
The following reports were generated:
 
  +
* 2 base files
/var/lib/jenkins/Lingoport_Data/LRM/GroupName/reports/ProjectName/ProjectInspect_en_us.xml
 
  +
** file1_en_US.properties (100 keys)
/var/lib/jenkins/Lingoport_Data/LRM/GroupName/reports/ProjectName/ProjectInspect_de_de.xml
 
  +
** file2_en_US.properties
/var/lib/jenkins/Lingoport_Data/LRM/GroupName/reports/ProjectName/ProjectInspect_fr_fr.xml
 
  +
* 1 fr_FR file with a missing key
Process completed successfully.
 
  +
** file1_fr_FR.properties (99 keys)
</pre>
 
  +
* 1 de_DE with 2 missing keys
Create a prep kit for the new LRM project
 
  +
** file1_de_DE.properties (98 keys)
  +
  +
  +
'''Create a prep kit''' for the new LRM project
 
<pre>
 
<pre>
 
> java -jar lrm-cli.jar -pk -pn ProjectName -gn GroupName
 
> java -jar lrm-cli.jar -pk -pn ProjectName -gn GroupName
Line 96: Line 140:
 
Process completed successfully.
 
Process completed successfully.
 
</pre>
 
</pre>
The base locale resource files are extracted and place in the appropriate localized prep kit folders. See the de_de and fr_fr folders.
+
The base locale resource files are extracted and place in the appropriate localized prep kit folders. See the '''de_de''' and '''fr_fr''' folders.
 
<pre>
 
<pre>
 
> ls /var/lib/jenkins/Lingoport_Data/LRM/GroupName/prep_kit/ProjectName/PREP_KIT_1/
 
> ls /var/lib/jenkins/Lingoport_Data/LRM/GroupName/prep_kit/ProjectName/PREP_KIT_1/
Line 104: Line 148:
 
</pre>
 
</pre>
   
In the fr_fr folder, are all the files to be translated:
+
In the '''fr_fr''' folder, are all the files to be translated:
 
<pre>
 
<pre>
 
> ls /var/lib/jenkins/Lingoport_Data/LRM/GroupName/prep_kit/ProjectName/PREP_KIT_1/fr_fr/
 
> ls /var/lib/jenkins/Lingoport_Data/LRM/GroupName/prep_kit/ProjectName/PREP_KIT_1/fr_fr/
file1_en_US.po
+
file1_en_US.properties
  +
file2_en_US.properties
file4_en_US.rxml
 
file2_en_US.rjs
 
file5_en_US.properties
 
file3_en_US.rc
 
file6_en_US.json
 
file7_en_US.resx
 
file8_en_US.msg
 
 
</pre>
 
</pre>
   
  +
For missing files, the entire file will be sent.
Since this is the first translation, all files will be fully translated. This is indicated in the files to be translated with the following as the first line of the files:
 
  +
For missing keys (or modified text) only the changed keys will be sent.
<pre>#file5_1_3 - FULL-FILE</pre>
 
 
===I know that most of my localized files have been translated before using LRM. How can I get my resource files into the LRM system without relying on the localization vendor's translation memory===
 
If you are confident that the localized files have been translated and do not want to send them to the localization vendor then there is a workaround to by-pass the localization vendor and import the files directly into LRM. The prerequisite is that the first prep kit is successful and the base resource files have been copied into the locale-specific folders. For each supported locale:
 
* Create an ''import'' folder on your hard drive. This folder will contain all your localized files for a particular locale.
 
* Copy all the localized files from the source repository for a particular locale into this new ''import'' folder.
 
* In order to import these localized files into LRM, each file must contain a valid LRM prep kit tag. During kit preparation (--prep-kit), LRM places a comment tag at the top of each resource file that indicates the LRM Project, Kit version and target locale. An example LRM tag is: MyProjectName_1_5.
 
** Locate the prep kit folder for this particular locale.
 
** The location of a prep kit tag is dependent on the resource extension.
 
*** properties, po - comment is on the first line. Example: ''#MyProjectName_1_5''
 
*** resx, rxml - comment is after xml tag. Example: ''&lt;!--MyProjectName_1_5--&gt;''
 
*** rc, rjs - comment is on the first line. Example: ''//MyProjectName_1_5''
 
*** msg - comment is on the first line. Example: ''$MyProjectName_1_5''
 
** Open up a resource file and copy the LRM tag. You only need to copy one tag per resource extension.
 
** Paste this LRM tag into each localized file in your ''import'' folder that has the same extension.
 
* Run the --import-kit command where the file location is your ''import'' folder.
 
* If there are localized files that have not been translated then the import will fail. This is an indication that a file needs to be sent to your translation vendor.
 
** Create a new folder in your prep kit folder that will contain these files.
 
** Copy the non-translated file from your prep kit folder to this new folder. It's important to copy the base resource file that is in the appropriate prep kit folder as it contains the valid prep kit tag.
 
** Send these files off for translation
 
** Once these files are returned, copy them over to your ''import'' folder and run the --import-kit command again. In order for an import to be successful, all localized files must be translated.
 
* After a successful --import-kit run the project status report. (--report --project-status). This particular locale should be at 100% complete if there have been no base resource file changes since it was last prepped.
 
   
 
===How can I prevent a file or folder from being included in the prep kit?===
 
===How can I prevent a file or folder from being included in the prep kit?===
Line 167: Line 184:
 
> java -jar lrm-cli.jar -r --project-inspect -pn YourProjectName -gn GroupName
 
> java -jar lrm-cli.jar -r --project-inspect -pn YourProjectName -gn GroupName
 
</pre>
 
</pre>
 
===Why, when I create a project, do I get an error stating that no resource files were found (Error 500)?===
 
It sounds as if your project is not setup correctly. Check the project definition file used to create the project. Configuration settings to check are:
 
* ''<top-level-dir>'' - this is the path to the source code (resource files) for the LRM Project.
 
<pre>
 
<top-level-dir>/var/lib/jenkins/path/to/my/resource_files</top-level-dir>
 
</pre>
 
* Patterns for your resource file names:
 
** ''<file-name-pattern>...</file-name-pattern>'' - verify that the separator characters are correct for your localized resource file names. For example, if your French Canadian localized resource file names are of the form "myResources_fr_CA.properties" then set the following: <pre><file-name-pattern>*_l_c_v</file-name-pattern></pre>
 
** ''<use-pattern-on-dflt-locale>.</use-pattern-on-dflt-locale>'' - Set to "1", it indicates you will use base resource files that include the default locale in their filenames. For example, if the default locale is set to "en_US" and the file-name-pattern for "properties" resource files is set to "*_l_c_v", then LRM will look for "myResources_en_US.properties" when creating a kit of files to be sent out for translation. If set to "0", then LRM will look for base resource files that do not have the default locale as part of their filenames. Using our "properties" file example, LRM will look for "myResources.properties" when creating files for translation.<pre><use-location-pattern-on-dflt-locale>0</use-location-pattern-on-dflt-locale></pre>
 
** ''<file-location-pattern>...</file-location-pattern>'' - verify that the separator characters are correct.
 
* ''<include-dir>...</include-dir>'' - verify that the value is a valid Ant formatting directive. If there is no value then only those files directly under the ''base-src-dir'' + ''top-level-dir'' will be searched; no recursive search will occur. To include all folders under the full path, enter a value of ''**/**''. You can then exclude other folders by adding additional exclude Ant directives. Format for ''<include-dir>'' is: <pre><includes>
 
<include-dir>**/**</include-dir>
 
</includes>
 
</pre>
 
*:''<include>''
 
*:: '' <include-dir>...</include-dir>''
 
*:''<include>''
 
* ''<exclude-dir>...</exclude-dir>'' - verify that the value is a valid Ant formatting directive and that you're not excluding valid files/folders. Format for ''<exclude-dir>'' is:
 
*:''<exclude>''
 
*:: '' <exclude-dir>...</exclude-dir>''
 
*:''<exclude>''
 
   
 
===Why, when I prep a kit, do I get a report called "OutstandingPrepFiles<target locale>.xml"?===
 
===Why, when I prep a kit, do I get a report called "OutstandingPrepFiles<target locale>.xml"?===
The base files that are listed in this report are files that have been prepped in an earlier kit and have not been imported. These base files have not changed since they were last prepped.
+
The base files that are listed in this report are files that have been prepped in an earlier kit and have not been imported. LRM keeps track of the changes for each prep kit. In this way, the same base file can be outstanding for multiple prep kits.
   
 
===Why, when I prep a kit, do I get a report called "DuplicatePrepFiles<target locale>.xml"?===
 
===Why, when I prep a kit, do I get a report called "DuplicatePrepFiles<target locale>.xml"?===
Line 197: Line 192:
   
 
===Why, when I prep a kit, do I get a report called "BaseFileSearchErrors<default locale>.xml"?===
 
===Why, when I prep a kit, do I get a report called "BaseFileSearchErrors<default locale>.xml"?===
This report lists all the errors in the base resource files that were found during the preparation of the kit. All errors must be resolved before a kit can be prepared. The possible ''errors'' are:
+
This report lists all the critical errors in the base resource files that were found during the preparation of the kit. All errors must be resolved before a kit can be prepared. The possible ''errors'' are:
* '''ENCODING''' - the base-file-encoding you set in your LRM Project's definitions xml file does not match. You should fix the encoding of the base resource file and run --prep-kit --dry-run again.
+
* '''ENCODING''' - the base-file-encoding you set in your LRM Project definition xml file does not match. You should fix the encoding of the base resource file and run --prep-kit again.
* '''DUPLICATE_KEY''' - there is a duplicate string key in the base resource file. Remove the duplicate and run --prep-kit --dry-run again.
+
* '''DUPLICATE_KEY''' - there is a duplicate string key in the base resource file. Remove the duplicate and run --prep-kit again.
 
* '''EMPTY_KEY''' - the value has no corresponding key. Either remove the value from the file or add the appropriate key.
 
* '''EMPTY_KEY''' - the value has no corresponding key. Either remove the value from the file or add the appropriate key.
* '''FILE_TOO_BIG''' - a base resource file cannot be larger than 16 megabytes. You will need to break up your resource file into multiple files and then run --prep-kit --dry-run again.
+
* '''FILE_TOO_BIG''' - a base resource file cannot be larger than 16 megabytes. You will need to break up your resource file into multiple files and then run --prep-kit again.
  +
* '''UNKNOWN_FILE_FORMAT''' - the base resource file could not be parser. You will need to fix the format and the run --prep-kit again.
  +
  +
=== Modified text does not seem to be recognized as a change in my base resource file. What is wrong? ===
  +
Modified text can only be detected if there has been a baseline created for the project. In this way, LRM can detect any modifications to file text. The Jenkins nightly Notification job for a project automatically calls the create baseline command. This command can also be called on the command line. See [[LRM_Commands_Reference#Create_a_project_baseline| Create Project Baseline]] for more information.
  +
  +
== Misc ==
   
  +
=== Why are there files in my repository that end in ''_LRMLQA''? ===
This report may also contain ''warnings''. Unlike errors, a kit can be successfully prepared if the base resource files contains ''warnings''. The possible warnings are:
 
  +
These are the LRM instrumented files that were created during the ''instrument resource files'' command.
* '''EMPTY_VALUE''' - the string key in the base resource file is set to an empty string. This is just a warning and will not prevent you from creating and sending out a Kit
 
  +
See [[LRM_Instrumentation#LRM_Instrumentation|LRM Instrumented Files]] for more information.

Revision as of 21:12, 23 April 2019

Create/Update LRM Project

How can I tell if my LRM project is setup correctly?

Once you've created your LRM project, run the project inspect report;

> java -jar lrm-cli.jar -r -pi -pn <ProjectName> -gn <GroupName>
> java -jar lrm-cli.jar --report --project-inspect --project-name <ProjectName> --group-name <GroupName>
The following reports were generated:
/var/lib/jenkins/Lingoport_Data/LRM/<GroupName>/reports/<ProjectName>/ProjectInspect_en_us.xml
/var/lib/jenkins/Lingoport_Data/LRM/<GroupName>/reports/<ProjectName>/ProjectInspect_de_de.xml
/var/lib/jenkins/Lingoport_Data/LRM/<GroupName>/reports/<ProjectName>e/ProjectInspect_fr_fr.xml
/var/lib/jenkins/Lingoport_Data/L10nStreamlining/<GroupName>/projects/<ProjectName>/reports/project_inspect_files.txt
Process completed successfully.

This command generates reports in your reports folder for each locale specified in the project definition file. Each report shows the location of the resource files, the number of files to be translated, and the file names.

<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<LRMProjectInspectResults projectID="217" projectName="YourProjectName" topLevelDirector
y="/location/of/files/resources">
  <locale>en_US</locale>
  <isBaseLocale>true</isBaseLocale>
  <nbFiles>3</nbFiles>
  <results>
    <result file="/file1.json"/>
    <result file="/file2.properties"/>
    <result file="/file3.rjs"/>
  </results>
</LRMProjectInspectResults>

In addition, file project_inspect_files.txt is created listing all of the absolute paths of the corresponding target files for each base resource file. The following is an example where:

  • The group name is GroupName
  • The project name is YourProjectName
  • The top level source directory defined in the project definition is location/of/files/resources
  • In the project definition, extension json has a name of pattern of *.l_c_v. The default locale files for this extension does not use the name pattern. There is no location pattern.
  • In the project definition, extension properties has a name of pattern of *_l_c_v. The default locale files for this extension does not use the name pattern. There is no location pattern.
  • In the project definition, extension rjs has a name of pattern of *-l-c-v. The default locale files for this extension does not use the name pattern. There is no location pattern.
/var/lib/jenkins/jobs/GroupName.YourProjectName/workspace/location/of/files/resources/file1.fr_fr.json
/var/lib/jenkins/jobs/GroupName.YourProjectName/workspace/location/of/files/resources/file1.es_mx.json
/var/lib/jenkins/jobs/GroupName.YourProjectName/workspace/location/of/files/resources/file2_fr_fr.properties
/var/lib/jenkins/jobs/GroupName.YourProjectName/workspace/location/of/files/resources/file2_es_mx.properties
/var/lib/jenkins/jobs/GroupName.YourProjectName/workspace/location/of/files/resources/file3-fr-fr.rjs
/var/lib/jenkins/jobs/GroupName.YourProjectName/workspace/location/of/files/resources/file3-es-mx.rjs

You may need to edit your project definition. See Project Definition for information about configuring a LRM project.

What extensions are supported by LRM?

See Supported Resource Bundles for an up to date list of supported resource file types.

How do I fix "Error 202 - extension not supported" when updating or creating my project?

  • Verify that the project definition xml contains a supported extension. A valid extension does not include a period. For example, if the extension is for ".properties" files then the xml value should be:
<extension>properties</extension>

not

 
<extension>.properties</extension>

How do I fix "Error 215 - incorrect pattern for extension" when updating or creating my project?

There are two supported patterns, LCID or language/country/variant.

  • For LCID - no other alpha characters are allowed except for LCID. For example, you could have a file name pattern "*_LCID" which, in the case of an fr_FR target locale, would result in "myResources_1036.po" as the filename of the translated resource file.
<file-name-pattern>*_LCID</file-name-pattern>
  • For language/country/variant - no other alpha characters are allowed except for l (language), c (country) and v (variant). The variant must be present even if you are not using variants. The order of the characters must be language, country, variant. For example, the file name pattern "*_l_c_v" applied to a base "po" resource file "myResources.po" would result in LRM naming the French in France translated file "myResources_fr_FR.po" before inserting it into the source code tree.
<file-name-pattern>*_l_c_v</file-name-pattern>

How do I fix "Error 218 - invalid base file encoding" and "Error 219 - invalid localized file encoding" when updating or creating my project?

LRM is written in Java and the encodings available to the system are Java based, even if your environment is not Java.

The supported encodings vary between different implementations of the Java platform. For example, the list of supported encodings supported by Java SE 8 is found here http://docs.oracle.com/javase/8/docs/technotes/guides/intl/encoding.doc.html. The encoding that should be copied into the project definition xml is located under column "Canonical Name for java.nio API". Every implementation of Java is required to support the following encodings.

  • US-ASCII
  • ISO-8859-1
  • UTF-8
  • UTF-16BE
  • UTF-16LE
  • UTF-16

Why, when I create a project, do I get an error stating that no resource files were found (Error 500)?

It sounds as if your project is not setup correctly. Check the project definition file used to create the project. Configuration settings to check are:

  • <top-level-dir> - this is the path to the source code (resource files) for the LRM Project.
<top-level-dir>/var/lib/jenkins/path/to/my/resource_files</top-level-dir>
  • Patterns for your resource file names:
    • <file-name-pattern>...</file-name-pattern> - verify that the separator characters are correct for your localized resource file names. For example, if your French Canadian localized resource file names are of the form "myResources_fr_CA.properties" then set the following:
      <file-name-pattern>*_l_c_v</file-name-pattern>
    • <use-pattern-on-dflt-locale>.</use-pattern-on-dflt-locale> - Set to "1", it indicates you will use base resource files that include the default locale in their filenames. For example, if the default locale is set to "en_US" and the file-name-pattern for "properties" resource files is set to "*_l_c_v", then LRM will look for "myResources_en_US.properties" when creating a kit of files to be sent out for translation. If set to "0", then LRM will look for base resource files that do not have the default locale as part of their filenames. Using our "properties" file example, LRM will look for "myResources.properties" when creating files for translation.
      <use-location-pattern-on-dflt-locale>0</use-location-pattern-on-dflt-locale>
    • <file-location-pattern>...</file-location-pattern> - verify that the separator characters are correct.
  • <include-dir>...</include-dir> - verify that the value is a valid Ant formatting directive. If there is no value then only those files directly under the base-src-dir + top-level-dir will be searched; no recursive search will occur. To include all folders under the full path, enter a value of **/**. You can then exclude other folders by adding additional exclude Ant directives. Format for <include-dir> is:
    <include-dir>**/**</include-dir>
  • <exclude-dir-file>...</exclude-dir-file> - verify that the value is a valid Ant formatting directive and that you're not excluding valid files/folders. Format for <exclude-dir> is:
    <exclude-dir-file>...</exclude-dir-file>

L10n Vendors

FTP

I configured a vanilla FTP (not SSH or SSL) and I get an SSH error

If you configure an FTP end point and you get a message from SSH, it means you are reaching an SSH FTP endpoint and that endpoint does not understand the request which follows a different protocol (FTP).

For instance, you may get this error:

   org.apache.commons.net.MalformedServerReplyException: Could not parse response code.
   Server Reply: SSH-2.0-OpenSSH_4.3

A possible issue may be the port number: port 22 is typically used for FTP/SSH; port 21 is typically used for vanilla FTP. Change the port number in config_l10n_vendor.properties and test again.

Prep Kit

When we generate the first prep kit with LRM, will all the base locale resource files be extracted, or only those base locale resource files that have corresponding localized files that have not been translated?

For the first prep kit, only those base locale resource files that have corresponding localized files that have not been translated are sent out for translation. This includes missing keys or missing files.

After the first prep kit, LRM is able to detect modified text as well as missing keys and missing files. It's always a good idea that the prep kit command is executed after creating a project in order for the files to get into the system in order to monitor text changes.

For example let's say you have a project with:

  • 3 locales: en_US (base locale), fr_FR and de_DE.
  • 2 base files
    • file1_en_US.properties (100 keys)
    • file2_en_US.properties
  • 1 fr_FR file with a missing key
    • file1_fr_FR.properties (99 keys)
  • 1 de_DE with 2 missing keys
    • file1_de_DE.properties (98 keys)


Create a prep kit for the new LRM project

> java -jar lrm-cli.jar -pk -pn ProjectName -gn GroupName
The following reports were generated:
/var/lib/jenkins/Lingoport_Data/LRM/GroupName/prep_kit/ProjectName/PREP_KIT_1/BaseFileSearch_de_de.xml
/var/lib/jenkins/Lingoport_Data/LRM/GroupName/prep_kit/ProjectName/PREP_KIT_1/BaseFileSearch_fr_fr.xml
/var/lib/jenkins/Lingoport_Data/LRM/GroupName/prep_kit/ProjectName/PREP_KIT_1/FilesToPrep.xml
/var/lib/jenkins/Lingoport_Data/LRM/GroupName/prep_kit/ProjectName/PREP_KIT_1/ProjectName_1_de_de.xml
/var/lib/jenkins/Lingoport_Data/LRM/GroupName/prep_kit/ProjectName/PREP_KIT_1/ProjectName_1_fr_fr.xml
Process completed successfully.

The base locale resource files are extracted and place in the appropriate localized prep kit folders. See the de_de and fr_fr folders.

> ls /var/lib/jenkins/Lingoport_Data/LRM/GroupName/prep_kit/ProjectName/PREP_KIT_1/
BaseFileSearch_de_de.xml  FilesToPrep.xml      ProjectName_1_fr_fr.xml
BaseFileSearch_fr_fr.xml  fr_fr/
de_de/                     ProjectName_1_de_de.xml

In the fr_fr folder, are all the files to be translated:

> ls /var/lib/jenkins/Lingoport_Data/LRM/GroupName/prep_kit/ProjectName/PREP_KIT_1/fr_fr/
file1_en_US.properties           
file2_en_US.properties

For missing files, the entire file will be sent. For missing keys (or modified text) only the changed keys will be sent.

How can I prevent a file or folder from being included in the prep kit?

You will need to alter your project definition file and exclude the file/folder from the project.

  • Export your project (--export-project -pn YourProjectName). This command exports your LRM project configuration to a file named ProjectDefinition.xml in your reports folder.
> java -jar lrm-cli.jar --export-project -pn YourProjectName -gn GroupName
The following report was generated:
/var/lib/jenkins/Lingoport_Data/LRM/GroupName/reports/YourProjectName/ProjectDefinition.xml
Process completed successfully.
  • Add an <exclude-dir-file> tag to the ProjectDefinition.xml file that contains either the file or folder name using the proper Ant formatting directive.
   <excludes>
      <exclude-dir-file>**/This_directory/**</exclude-dir-file>
      <exclude-dir-file>**/Another_directory/**</exclude-dir-file>
      <exclude-dir-file>**/a_file</exclude-dir-file>
    </excludes>
  • Update the project with the changes you made to the ProjectDefinition file
> java -jar lrm-cli.jar --update-project -f /var/lib/jenkins/Lingoport_Data/LRM/GroupName/reports/YourProjectName/ProjectDefinition.xml
  • Run the project inspect report to verify that the file or folder was excluded from the search.
> java -jar lrm-cli.jar -r --project-inspect -pn YourProjectName -gn GroupName

Why, when I prep a kit, do I get a report called "OutstandingPrepFiles<target locale>.xml"?

The base files that are listed in this report are files that have been prepped in an earlier kit and have not been imported. LRM keeps track of the changes for each prep kit. In this way, the same base file can be outstanding for multiple prep kits.

Why, when I prep a kit, do I get a report called "DuplicatePrepFiles<target locale>.xml"?

This is the list of duplicate base file names. A LRM prep kit must contain unique file names as all the files are located in the same folder. The existence of a "DuplicatePrepFiles<target locale>.xml report indicates that at least one more kit will need to be prepared after the current kit has successfully been prepped.

Why, when I prep a kit, do I get a report called "BaseFileSearchErrors<default locale>.xml"?

This report lists all the critical errors in the base resource files that were found during the preparation of the kit. All errors must be resolved before a kit can be prepared. The possible errors are:

  • ENCODING - the base-file-encoding you set in your LRM Project definition xml file does not match. You should fix the encoding of the base resource file and run --prep-kit again.
  • DUPLICATE_KEY - there is a duplicate string key in the base resource file. Remove the duplicate and run --prep-kit again.
  • EMPTY_KEY - the value has no corresponding key. Either remove the value from the file or add the appropriate key.
  • FILE_TOO_BIG - a base resource file cannot be larger than 16 megabytes. You will need to break up your resource file into multiple files and then run --prep-kit again.
  • UNKNOWN_FILE_FORMAT - the base resource file could not be parser. You will need to fix the format and the run --prep-kit again.

Modified text does not seem to be recognized as a change in my base resource file. What is wrong?

Modified text can only be detected if there has been a baseline created for the project. In this way, LRM can detect any modifications to file text. The Jenkins nightly Notification job for a project automatically calls the create baseline command. This command can also be called on the command line. See Create Project Baseline for more information.

Misc

Why are there files in my repository that end in _LRMLQA?

These are the LRM instrumented files that were created during the instrument resource files command. See LRM Instrumented Files for more information.