Cherry Picker
Contents
Cherry Picker
The idea behind the cherry picker is that you can ignore file(s) (not keys) for specific locales or include files for specific locales.
This feature sometimes lead to misunderstanding so use it with care and remember to edit/remove/rename the cherry picker file when done cherry picking!
The mechanics:
- Create a file under the project configuration directory (
<HOME>/Lingoport_Data/L10nStreamlining/GroupName/projects/ProjectName/config
) namedconfig_file_cherry_picker.xml
. There is a template in<HOME>/Lingoport_Data/L10nStreamlining/config
- Edit that file to say what file to include for what locale in the next prep kit. If you have a 'fake' file, no files will be sent for that locale.
- The locale code must match one of your target locales
- The cherry picking is done per locale
Example 1-sending subset of all files for a locale
For instance, let's say that you want to send 9 files out of 10 to translate into French and German and all ten for the remaining locales. You could write a Cherry Picker like:
<?xml version="1.0" encoding="UTF-8" standalone="no"?> <file-cherry-picker> <locales> <!-- Send 9 files out of 10 for German & French --> <locale code="de"> <files-include> <include file="/locales/file1_de.json"/> <include file="/locales/file2_de.json"/> <include file="/locales/file3_de.json"/> <include file="/locales/file4_de.json"/> <include file="/locales/file5_de.json"/> <include file="/locales/file6_de.json"/> <include file="/locales/file7_de.json"/> <include file="/locales/file8_de.json"/> <include file="/locales/file9_de.json"/> </files-include> </locale> <locale code="fr"> <files-include> <include file="/locales/file1_de.json"/> <include file="/locales/file2_de.json"/> <include file="/locales/file3_de.json"/> <include file="/locales/file4_de.json"/> <include file="/locales/file5_de.json"/> <include file="/locales/file6_de.json"/> <include file="/locales/file7_de.json"/> <include file="/locales/file8_de.json"/> <include file="/locales/file9_de.json"/> </files-include> </locale> </locales> </file-cherry-picker>
In this example, if the locales
directory has 10 files, only 9 are sent for French and German; The other locales in this LRM project are not affected.
Example 2-preventing files from being prepped for a locale
Now let's say that for Chinese you do not want to send any files. You could write a Cherry Picker like:
<?xml version="1.0" encoding="UTF-8" standalone="no"?> <file-cherry-picker> <locales> <!-- Put Simplified Chinese on hold --> <locale code="zh-Hans"> <files-include> <include file="/locales/fake_zh-Hans.json"/> </files-include> </locale> </locales> </file-cherry-picker>
In this example, the cherry picker is set for the zh-Hans
locale. It states that for that locale, the file to be included is a fake file, fake_zh_Hans.json
. Since that file does not exist, no files will be sent for translation. Sending resource bundles for the other locales in the LRM project are not affected.
You can have as many locales as you want and include as many files as you want. When the files are ready to be prepped (for whatever reason), you can rename/delete that file and all the files for all locales will be back on the prep kit train.
Don't forget to remove or rename this file once you are done with cherry picking.