Difference between revisions of "Resource Files"
(→How to work with unsupported File Types) |
(→Analyze the file types) |
||
Line 48: | Line 48: | ||
If the file types fall into a category not supported by Localyzer out of the box, the first thing to do is to see what is the closest file types supported by Localyzer. |
If the file types fall into a category not supported by Localyzer out of the box, the first thing to do is to see what is the closest file types supported by Localyzer. |
||
+ | [[Other_File_Types|Transform Framework]] |
||
− | [Other File Types|Other File Types] |
||
== Why are there files in my repository that end in ''_LRMLQA''? == |
== Why are there files in my repository that end in ''_LRMLQA''? == |
Revision as of 19:26, 22 September 2021
Contents
What resource file types are supported by Localyzer?
Standard Localyzer extensions
- .htm and .html files using the html parser
- .json (Mostly JavaScript, and other programming languages) using the json parser
- .msg (C, C++, ...) using the msg parser
- .po files using the po parser
- .properties files (Java-type resources) using properties parser
- .resx files (used in the .Net world) using xml parser and the ResxParser.xml format definition
- .rc (Delphi, ...) using the rc parser
- .rjs (for JavaScript) using the js parser
- .rxml using the xml parser and the RxmlParser.xml format definition)
- .strings (Mobile iOS) using the strings parser
- strings.xml (Android) using the xml parser and the AndroidParser.xml format definition
- .txt files using the text parser
- .yaml, .yml using the yaml parser
Unique Extensions
Any file extension can be handled by Localyzer as long as the corresponding parser type is defined. The file must be able to be parsed correctly by the defined parser type or an error will occur.
Above is an example configuring a Jenkins Localyzer project. The Extension is 'properties' and the Parser Type is 'properties' so Localyzer will recognize the file myfile_en_US.properties as a resource file. If the filename is myfile_en_US.prop, that would not be recognized as a properties resource file. Changing the Extension to 'prop' would allow myfile_en_US.prop to be recognized as a properties parser type file.
The parser types are:
- html parser
- js parser
- json parser
- msg parser
- po parser
- properties parser
- rc parser
- strings parser
- text parser
- xml parser
- yaml parser
- binary parser
How to work with unsupported File Types
Localyzer supports a number of file types out of the box (See above). However, other file types may represent user facing strings to be translated. In that case, some customization is required to on-board those projects. The bash script transform framework facilitates the customization.
Analyze the file types
If the file types fall into a category not supported by Localyzer out of the box, the first thing to do is to see what is the closest file types supported by Localyzer.
Why are there files in my repository that end in _LRMLQA?
These are the Localyzer instrumented files that were created during the instrument resource files command. See Localyzer Instrumentation for more information.
What is Send Unique Filenames?
When configuring an Localyzer project in Jenkins, under the General Settings, there is a checkbox for Send Unique Filenames.
This is defaulted to be unchecked. Check this box if the files to be translated have the same names, but are in different folders. For example if you have resource files in two directories, but the files themselves are the same names.
../first_en_US/values.json ../second_en_US/values.json
Localyzer sends only the files to be translated. Checking the Send Unique Filename box ensures that the files get unique names that are tracked and then returned to the correct location upon import.
For this example, if the default is left and it is unchecked, then a prep kit will be created for each file. For this example, two prep kits would be created and sent to be translated. If there are many folders that contain the same name, many prep kits will be created.