Difference between revisions of "LRM Fixing Issues"

From Lingoport Wiki
Jump to: navigation, search
(How do I fix "Error 204 - invalid default locale pattern" when updating or creating my project?)
Line 16: Line 16:
 
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>''.
 
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 204 - invalid default locale pattern" when updating or creating my project?===
+
===How do I fix "Error 215 - incorrect pattern for extension" when updating or creating my project?===
 
   
 
===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?===

Revision as of 18:48, 26 November 2012

How can I tell if my project is setup correctly?

Once you've created your project run the project inspect report; java -jar lrm-cli.jar -r -pi -pn YourProjectName. This command generates a report, in your reports folder, listing all the base resource files that were found using the search criteria set up in the project definition. Of interest are the files that are listed in the ConfigTestSearch<base_locale>.xml file.

What extensions are supported by LRM?

LRM supports the following extensions:

  • properties - used by Java applications
  • resx - used by .NET applications
  • rc - used by Windows C++ and Delphi applications
  • msg - used by GNU C/C++ applications
  • po - used by PHP applications
  • rjs - custom JavaScript resource file where strings are of the form: var STR_HELLO_1 = "Hello";
  • rxml - custom XML resource file where strings are of the form: <entry xml:space="preserve" key="STR_HELLO_1">Hello</entry>

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?

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

You will need to alter your project definition 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 SetupProjectConfig.xml.
  • Add an <exclude-dir> tag to the SetupProjectConfig.xml file that contains either the file or folder name using the proper Ant formatting directive.
  • xml structure for the exclude dir is:
    <exclude>
    <exclude-dir>...</exclude-dir>
    <exclude>
  • Run the project inspect report to verify that the file or folder was excluded from the search.

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

It sounds as if your project is not setup correctly. You can view and edit your project definition by running the project inspect report. Configuration settings to check are:

  • <top-level-dir> - this is the path to the source code for this LRM Project. Note that this path must be relative to the base-src-dir setting stored in the lrmUserConfig.xml file. In other words: base-src-dir + top-level-dir = full path to the source code tree for your LRM Project.
  • 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.
    • <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>
    <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 kit, do I get a report called "OutstandingPrepFiles<target locale>.xml"?

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

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