Difference between revisions of "LRM Android Support"

From Lingoport Wiki
Jump to: navigation, search
(Example of Project Definition File)
Line 28: Line 28:
 
<model-version>3.0.18</model-version>
 
<model-version>3.0.18</model-version>
 
<project-name>mobile-android</project-name>
 
<project-name>mobile-android</project-name>
<project-desc>Family Search mobile-android project</project-desc>
+
<project-desc>Lingoport mobile-android project</project-desc>
<group-name>fseng</group-name>
+
<group-name>Lingoport</group-name>
<top-level-dir>/var/lib/jenkins/jobs/fseng.mobile-android/workspace</top-level-dir>
+
<top-level-dir>/var/lib/jenkins/jobs/Lingoport.mobile-android/workspace</top-level-dir>
 
<detect-errors>
 
<detect-errors>
 
<missed-trans-error>0</missed-trans-error>
 
<missed-trans-error>0</missed-trans-error>
Line 41: Line 41:
 
<locale>es</locale>
 
<locale>es</locale>
 
<locale>fr</locale>
 
<locale>fr</locale>
<locale>it</locale>
 
 
<locale>ja</locale>
 
<locale>ja</locale>
<locale>ko</locale>
 
<locale>pt</locale>
 
<locale>ru</locale>
 
 
<locale>zh</locale>
 
<locale>zh</locale>
 
</target-locales>
 
</target-locales>
 
<default-locale>en</default-locale>
 
<default-locale>en</default-locale>
 
<resource-extensions>
 
<resource-extensions>
<resource-extension>
+
'''<resource-extension>'''
<extension>xml</extension>
+
'''<extension>xml</extension>'''
 
<file-name-pattern/>
 
<file-name-pattern/>
<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>*-l-c-v</file-location-pattern>
+
'''<file-location-pattern>*-l-c-v</file-location-pattern>'''
<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>'''
<parameter-regex-pattern><![CDATA[%d|%s|%d+$s|%d+$d|%\{w+\}]]></parameter-regex-pattern>
+
'''<parameter-regex-pattern><![CDATA[%d|%s|%d+$s|%d+$d|%\{w+\}]]></parameter-regex-pattern>'''
</resource-extension>
+
'''</resource-extension>'''
 
</resource-extensions>
 
</resource-extensions>
 
<dirset>
 
<dirset>

Revision as of 22:56, 16 September 2016

Naming Conventions

Android resources bundles are named strings.xml. Typically, an Android application will have one strings.xml base file located under a directory named values. The corresponding translated resource bundle will be also named strings.xml and located under a directory named values-fr (for French) at the same level as values.

Example strings.xml File For Android

 <?xml version="1.0" encoding="utf-8"?>
 <resources xmlns:tools="http://schemas.android.com/tools">
  <string name="menu_find">Find</string>
  <string name="menu_historical_search">Search Historical Records</string>
  <string name="person_activity_title">Person</string>
  <string name="label_person_tree_button">View This Tree</string>
  <string name="label_person_other">Other</string>
  <string name="label_person_name">Name</string>
  <string name="label_person_details">Details</string>
  <string name="fact_detail_sub_header_reason">Reason This Information Is Correct</string>
  <string name="fact_detail_footer_modified">Modified</string>
  <string name="fact_detail_send_email_chooser">Choose an Email Client</string>
  <string name="fact_detail_send_email_error_no_client">Email app not found</string>
  <string name="fact_name_label">Name</string>
 </resources>

Example of Project Definition File

<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<lrmconf>
 <model-version>3.0.18</model-version>
 <project-name>mobile-android</project-name>
 <project-desc>Lingoport mobile-android project</project-desc>
 <group-name>Lingoport</group-name>
 <top-level-dir>/var/lib/jenkins/jobs/Lingoport.mobile-android/workspace</top-level-dir>
 <detect-errors>
   <missed-trans-error>0</missed-trans-error>
   <parameter-mismatch-error>1</parameter-mismatch-error>
 </detect-errors>
 <track-back-locale/>
 <pseudo-locale/>
 <target-locales>
   <locale>de</locale>
   <locale>es</locale>
   <locale>fr</locale>
   <locale>ja</locale>
   <locale>zh</locale>
 </target-locales>
 <default-locale>en</default-locale>
 <resource-extensions>
   <resource-extension>
     <extension>xml</extension>
     <file-name-pattern/>
     <use-pattern-on-dflt-locale>0</use-pattern-on-dflt-locale>
     <file-location-pattern>*-l-c-v</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|%s|%d+$s|%d+$d|%\{w+\}]]></parameter-regex-pattern>
   </resource-extension>
 </resource-extensions>
  <dirset>
   <includes>
     <include-dir>**/**</include-dir>
   </includes>
   <excludes>
     <exclude-dir-file>**/.sonar-ide.properties</exclude-dir-file>
     <exclude-dir-file>**/acceptance-test.properties</exclude-dir-file>
     <exclude-dir-file>**/application.properties</exclude-dir-file>
     <exclude-dir-file>**/catalina.properties</exclude-dir-file>
     <exclude-dir-file>**/config.properties</exclude-dir-file>
     <exclude-dir-file>**/grinder.properties</exclude-dir-file>
     <exclude-dir-file>**/integration.properties</exclude-dir-file>
     <exclude-dir-file>**/logging.properties</exclude-dir-file>
     <exclude-dir-file>**/values-eo/**</exclude-dir-file>
     <exclude-dir-file>**/values-xx/**</exclude-dir-file>
     <exclude-dir-file>**/LRMScans/**</exclude-dir-file>
     <exclude-dir-file>**/GlobalyzerScans/**</exclude-dir-file>
   </excludes>
 </dirset>
</lrmconf>