Skip to content
Permalink
8bed31719c
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Go to file
 
 
Cannot retrieve contributors at this time
18 lines (13 sloc) 625 Bytes
// :name=Example - Modify Segment :description=Example of segment modification
def ste = editor.currentEntry;
if (ste .srcText != "enu" )
{
target = project.getTranslationInfo(ste)?.translation;
//project.setTranslation(currentSegment, "FRA", true);
console.println(editor.currentEntryNumber + "\t" + ste.srcText );
console.println(target); // In-memory target, the edited text is not available.
// See http://groovy.codehaus.org/Regular+Expressions for Groovy RegExp subtelties.
target = target.replaceAll(/(\d+),(\d+)/, '$1 $2');
editor.replaceEditText(target);
editor.nextEntry();
}