Difference between revisions of "LRM text Support"
(→unique file extension needs to define text parser type) |
(→File can be pseudo-localized and number of words counted) |
||
(One intermediate revision by the same user not shown) | |||
Line 12: | Line 12: | ||
===Number of keys in file is 1 === |
===Number of keys in file is 1 === |
||
− | All files that are parsed using the ''text'' parser have only 1 key called '''key1'''. The value that corresponds to this key is the entire |
+ | All files that are parsed using the ''text'' parser have only 1 key called '''key1'''. The value that corresponds to this key is the entire html type file. Because there are no key/values pairs, ''text'' parsed files cannot be instrumented (used in our InContext Reviewer/Translation product). |
=== Prep kit files are always full file === |
=== Prep kit files are always full file === |
||
If the checksum of the base file has changed then the file will be sent out in the next prep kit for all target locales. Since the file contains only 1 key, the entire file will be sent out for translation. |
If the checksum of the base file has changed then the file will be sent out in the next prep kit for all target locales. Since the file contains only 1 key, the entire file will be sent out for translation. |
||
+ | === File can be pseudo-localized and number of words counted === |
||
+ | The entire file is treated as text and as such, the entire file is pseudo-localized. If this is not appropriate for the file, then perhaps the [[LRM_Binary_Support|''binary'']] parser type would be a better fit. |
||
== Example of Project Definition for Resources == |
== Example of Project Definition for Resources == |
Latest revision as of 18:51, 18 November 2019
Contents
Example of a file extension that uses the text parser type
This is just a file that contains some text --- and some more text
txt file extension use the text parser type
When defining a project containing LRM Standard .txt resource files, there is no need to define a <parser-type> as the text parser will always be used.
unique file extension needs to define text parser type
If a unique file extension is a valid text file, then the <parser-type> should be text in the project definition file.
LRM interaction with text parser type files
Number of keys in file is 1
All files that are parsed using the text parser have only 1 key called key1. The value that corresponds to this key is the entire html type file. Because there are no key/values pairs, text parsed files cannot be instrumented (used in our InContext Reviewer/Translation product).
Prep kit files are always full file
If the checksum of the base file has changed then the file will be sent out in the next prep kit for all target locales. Since the file contains only 1 key, the entire file will be sent out for translation.
File can be pseudo-localized and number of words counted
The entire file is treated as text and as such, the entire file is pseudo-localized. If this is not appropriate for the file, then perhaps the binary parser type would be a better fit.
Example of Project Definition for Resources
The following is an example of text resource file definitions. See resource extensions for more information.
<resource-extensions> <resource-extension> <!-- parser-type not needed since .text is a standard LRM extension that maps to the text parser type --> <extension>txt</extension> <file-name-pattern>*-l_c_v</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>1</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></parameter-regex-pattern> </resource-extension> <resource-extension> <!-- parser-type is required because .myext is not a standard LRM extension --> <extension>myext</extension> <parser-type>text</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>l_c_v</file-location-pattern> <use-location-pattern-on-dflt-locale>1</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></parameter-regex-pattern> </resource-extension> </resource-extensions>