Cherry Picker

From Lingoport Wiki
Revision as of 14:58, 20 June 2016 by Olibouban (talk | contribs)
Jump to: navigation, search

The idea behind the cherry picker is that you can 'ignore' file(s) (not keys) for specific locales. Say you have ten files and you want to send 9 files to translate into French and German but not Japanese and the tenth to all locales. You can. This feature sometimes lead to misunderstanding so use it with care and remember to remove/rename the cherry picker file when done cherry picking!

The mechanics:

  • Create a file under the project configuration directory named config_file_cherry_picker.xml.
  • 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 instance, 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.