Difference between revisions of "LRM po Support"

From Lingoport Wiki
Jump to: navigation, search
(Example .po files)
(Example Project Definition File)
Line 91: Line 91:
 
<!-- <file-location-pattern>resources_LCID</file-location-pattern>-->
 
<!-- <file-location-pattern>resources_LCID</file-location-pattern>-->
 
<resource-extension>
 
<resource-extension>
<extension>po</extension>
+
'''<extension>po</extension>'''
<file-name-pattern>*-l_c_v</file-name-pattern>
+
'''<file-name-pattern>*-l_c_v</file-name-pattern>'''
 
<!--If the base resource files use the file-name-pattern in their name -->
 
<!--If the base resource files use the file-name-pattern in their name -->
 
<!--then set use-pattern-on-dflt-locale to 1, if not then set to 0-->
 
<!--then set use-pattern-on-dflt-locale to 1, if not then set to 0-->
<use-pattern-on-dflt-locale>0</use-pattern-on-dflt-locale>
+
'''<use-pattern-on-dflt-locale>0</use-pattern-on-dflt-locale>'''
<file-location-pattern/>
+
'''<file-location-pattern/>'''
 
<!--If the base resource files use the file-location-pattern in their name -->
 
<!--If the base resource files use the file-location-pattern in their name -->
 
<!--then set use-location-pattern-on-dflt-locale to 1, if not then set to 0-->
 
<!--then set use-location-pattern-on-dflt-locale to 1, if not then set to 0-->
<use-location-pattern-on-dflt-locale>0</use-location-pattern-on-dflt-locale>
+
'''<use-location-pattern-on-dflt-locale>0</use-location-pattern-on-dflt-locale>'''
<base-file-encoding>UTF-8</base-file-encoding>
+
'''<base-file-encoding>UTF-8</base-file-encoding>'''
<localized-file-encoding>UTF-8</localized-file-encoding>
+
'''<localized-file-encoding>UTF-8</localized-file-encoding>'''
 
<!--Default pattern for po is '![CDATA[%\d*[ds]|%\d+]'-->
 
<!--Default pattern for po is '![CDATA[%\d*[ds]|%\d+]'-->
<parameter-regex-pattern><![CDATA[%\d*[ds]|%\d+]]></parameter-regex-pattern>
+
'''<parameter-regex-pattern><![CDATA[%\d*[ds]|%\d+]]></parameter-regex-pattern>'''
  +
</resource-extension>
  +
<resource-extension>
  +
'''<extension>''myext''</extension>'''
  +
'''<parser-type>po</parser-type>'''
  +
'''<file-name-pattern>*-l_c_v</file-name-pattern>'''
  +
<!--If the base resource files use the file-name-pattern in their name -->
  +
<!--then set use-pattern-on-dflt-locale to 1, if not then set to 0-->
  +
'''<use-pattern-on-dflt-locale>0</use-pattern-on-dflt-locale>'''
  +
'''<file-location-pattern/>'''
  +
<!--If the base resource files use the file-location-pattern in their name -->
  +
<!--then set use-location-pattern-on-dflt-locale to 1, if not then set to 0-->
  +
'''<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>'''
  +
<!--Default pattern for po is '![CDATA[%\d*[ds]|%\d+]'-->
  +
'''<parameter-regex-pattern><![CDATA[%\d*[ds]|%\d+]]></parameter-regex-pattern>'''
 
</resource-extension>
 
</resource-extension>
 
</resource-extensions>
 
</resource-extensions>

Revision as of 19:53, 31 August 2017

Example .po files as well as file extensions using the po parser type

# SOME DESCRIPTIVE TITLE.
# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
# This file is distributed under the same license as the PACKAGE package.
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
#
msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2017-02-01 16:55-0700\n"
"PO-Revision-Date: 2017-02-01 16:55-0700\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"

# SOURCE_FILE C:/Path/to/my/source/files/Matrix.js
msgid "ascending"
msgstr "ascending"

msgid "descending"
msgstr "descending"

msgid "Viewing rows {0} to {1} of {2}"
msgstr "Viewing rows {0} to {1} of {2}"

# SOURCE_FILE C:/Path/to/my/source/files/cache.js

msgid "You have made unsaved changes to the following cache document(s): <b>"
msgstr "You have made unsaved changes to the following cache document(s): <b>"

msgid "</b>. Procede with delete?"
msgstr "</b>. Procede with delete?"

msgid "//record[record]"
msgstr "//record[record]"

Example Project Definition File

<?xml version="1.0" encoding="UTF-8"?>
<lrmconf>
  <model-version>1.0.0</model-version>
  <project-name>DemoPo</project-name>
       <project-desc>This is a sample LRM Project definition file, configured to support po 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>po</extension>
     <file-name-pattern>*-l_c_v</file-name-pattern>
     <use-pattern-on-dflt-locale>0</use-pattern-on-dflt-locale>
     <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]|%\d+]]></parameter-regex-pattern>
   </resource-extension>
   <resource-extension>
     <extension>myext</extension>
     <parser-type>po</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/>
     <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]|%\d+]]></parameter-regex-pattern>
   </resource-extension>
 </resource-extensions>
 <dirset>
   <includes>
     <include-dir>**/**</include-dir>
   </includes>
   <excludes>
   </excludes>
 </dirset>
</lrmconf>