Difference between revisions of "LRM msg Support"

From Lingoport Wiki
Jump to: navigation, search
(Example Project Definition File)
(Example Project Definition File)
Line 47: Line 47:
 
<resource-extensions>
 
<resource-extensions>
 
<resource-extension>
 
<resource-extension>
  +
'''&lt;!-- parser-type not needed since .msg is a standard LRM extension that maps to the msg parser type --&gt;'''
 
'''<extension>msg</extension>'''
 
'''<extension>msg</extension>'''
 
'''<file-name-pattern>*_l_c_v</file-name-pattern>'''
 
'''<file-name-pattern>*_l_c_v</file-name-pattern>'''
Line 57: Line 58:
 
</resource-extension>
 
</resource-extension>
 
<resource-extension>
 
<resource-extension>
  +
'''''&lt;!-- parser-type required since .myext is not a standard LRM extension --&gt;'''''
 
'''<extension>''myext''</extension>'''
 
'''<extension>''myext''</extension>'''
 
'''''<parser-type>msg</parser-type>'''''
 
'''''<parser-type>msg</parser-type>'''''

Revision as of 20:58, 31 August 2017

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>
     <!-- parser-type not needed since .msg is a standard LRM extension that maps to the msg parser type -->
     <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>
     <!-- parser-type required since .myext is not a standard LRM 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-file>**/src/**</include-dir-file>
   </includes>
   <excludes>
     <exclude-dir-file>**/src/bin/**</exclude-dir-file>
   </excludes>
 </dirset>
</lrmconf>