LRM msg Support

From Lingoport Wiki
Revision as of 19:51, 31 August 2017 by Llawson (talk | contribs) (Example Project Definition File)
Jump to: navigation, search

Example of .msg files as well as file extensions using the msg parser type

$ A Globalyzer generated message file

$set MainSet

$  SOURCE_FILE C:/Path/to/my/source/StringBug.hpp
STRI_BADLINE_6 "Bad line"
STRI_INVALID_7 "Invalid Rectangle"
STRI_INVALID_8 "Invalid Color"
STRI_INVALID_9 "Invalid Point"
STRI_INVALID_10 "Invalid DWORD"
STRI_UNRECOG_11 "Unrecognized type"
STRI_SLINEDS_12 "%s (line #%d) : %s"
STRI_RUNTIME_13 "Runtime Variable Error"
STRI_KEYNOTF_14 "Key not found"

$  SOURCE_FILE C:/Path/to/my/source/keypressEvents.cxx
KEYP_PRESSED_1 "Pressed "
KEYP_UP_2 "Up"
KEYP_THEUPAR_3 "The up arrow was pressed."
KEYP_SHOULDD_4 "Should detect because ignore second issue"
KEYP_THEAKEY_5 "The a key was pressed."

Example Project Definition File

<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<lrmconf>
 <model-version>2.0.11</model-version>
 <project-name>DemoMsg</project-name>
 <project-desc>This is a sample LRM Project definition file, configured for Msg resource files</project-desc>
 <group-name>acme</group-name>
 <top-level-dir>C:\acme\source</top-level-dir>
 <detect-errors>
   <missed-trans-error>1</missed-trans-error>
   <parameter-mismatch-error>1</parameter-mismatch-error>
 </detect-errors>
 <track-back-locale>br</track-back-locale>
 <pseudo-locale>eo</pseudo-locale>
 <target-locales>
   <locale>es_MX</locale>
   <locale>fr_CA</locale>
   <locale>fr_FR</locale>
 </target-locales>
 <default-locale>en_US</default-locale>
 <resource-extensions>
   <resource-extension>
     <extension>msg</extension>
     <file-name-pattern>*_l_c_v</file-name-pattern>
     <use-pattern-on-dflt-locale>0</use-pattern-on-dflt-locale>
     <file-location-pattern></file-location-pattern>
     <use-location-pattern-on-dflt-locale>0</use-location-pattern-on-dflt-locale>
     <base-file-encoding>UTF-8</base-file-encoding>
     <localized-file-encoding>UTF-8</localized-file-encoding>
     <parameter-regex-pattern><![CDATA[%\\d+%|%[ds]]]></parameter-regex-pattern>
   </resource-extension>
   <resource-extension>
     <extension>myext</extension>
     <parser-type>msg</parser-type>
     <file-name-pattern>*_l_c_v</file-name-pattern>
     <use-pattern-on-dflt-locale>0</use-pattern-on-dflt-locale>
     <file-location-pattern></file-location-pattern>
     <use-location-pattern-on-dflt-locale>0</use-location-pattern-on-dflt-locale>
     <base-file-encoding>UTF-8</base-file-encoding>
     <localized-file-encoding>UTF-8</localized-file-encoding>
     <parameter-regex-pattern><![CDATA[%\\d+%|%[ds]]]></parameter-regex-pattern>
   </resource-extension>
 </resource-extensions>
 <dirset>
   <includes>
     <include-dir>**/**</include-dir>
   </includes>
   <excludes>
   </excludes>
 </dirset>
</lrmconf>