Code escaper is a feature that will let us exclude some words, phrases, codes when performing batch translations.
This feature is useful for escaping codes, path to resources or any string that should not be translated from being translated by machine when doing batch translation.
This feature is only available on the “Hex Placeholder” escape algorithm.
How to access the tool
Options window → Translator & Language → Custom Escaper → Patterns
How to write the patterns
- Strings are enclosed with double quotes, single quotes or a backticks (template literals).
- You must escape special characters with a backslash (for example type backslash with double backslash)
This functionality is useful for escaping miscellaneous words, for example to exclude the first line of each message, etc.
- Function is unnamed function
- Any type of functions are acceptable (async function, arrow functions)
- First parameters are the current string of the text, that can be the entire text key of each row (on row-by-row mode) or each line of each row (on line-by-line mode)
- The function should returns array of string to be escaped
Regular expressions also can be used to filter out text from translation.
- Any form of Ecmascript regular expressions are accepted
- Write regular expressions along with its modifier