public interface ITextUnitMerger
| Modifier and Type | Method and Description |
|---|---|
void |
copyCodeMeta(TextFragment source,
TextFragment target)
Update the meta fields in
Code's "to" that match those of "from" But only if
the "to" code has empty data. |
void |
copyTextPartMeta(List<TextPart> from,
List<TextPart> to,
String id)
|
Parameters |
getParameters() |
ITextUnit |
mergeTargets(ITextUnit tuFromSkeleton,
ITextUnit tuFromTranslation)
Merges the translated text unit to the one from the skeleton.
|
void |
setParameters(Parameters params) |
void |
setTargetLocale(LocaleId trgLoc) |
ITextUnit mergeTargets(ITextUnit tuFromSkeleton, ITextUnit tuFromTranslation)
tuFromSkeleton - text unit from the skeleton (normally the original file)tuFromTranslation - text unit from the translation (default merger uses xliff 1.2)void copyCodeMeta(TextFragment source, TextFragment target)
Code's "to" that match those of "from" But only if
the "to" code has empty data. Otherwise keep the to code data as-is.
Codes match if both data and TextFragment.TagType are the same.from - TextFragment codes are used to match codes in "to"to - TextFragment that has its code id's updated to match "from"void copyTextPartMeta(List<TextPart> from, List<TextPart> to, String id)
TextPart's in "to" that match those of "from"
WARNING: Not all TextParts have id's to match on. Fallback is to match on data, but this can be ambiguous in rare cases
void setTargetLocale(LocaleId trgLoc)
Parameters getParameters()
void setParameters(Parameters params)
Copyright © 2021. All rights reserved.