Interface ITextUnitMerger

    • Method Detail

      • mergeTargets

        ITextUnit mergeTargets​(ITextUnit tuFromSkeleton,
                               ITextUnit tuFromTranslation)
        Merges the translated text unit to the one from the skeleton. Merges the text unit's target (under certain conditions).
        Parameters:
        tuFromSkeleton - text unit from the skeleton (normally the original file)
        tuFromTranslation - text unit from the translation (default merger uses xliff 1.2)
        Returns:
        the merged text unit
      • copyCodeMetadata

        default void copyCodeMetadata​(TextFragment from,
                                      TextFragment to)
        Update the meta fields in 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 TagType are the same.
        Parameters:
        from - TextFragment codes are used to match codes in "to"
        to - TextFragment that has its code id's updated to match "from"
      • copyTextPartMetadata

        default void copyTextPartMetadata​(List<TextPart> from,
                                          List<TextPart> to,
                                          String id)
        Update the meta fields from 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

        Parameters:
        from - list of TextPart codes are used to match codes in "to"
        to - list of TextPart that has its code id's updated to match "from"
        id - parent TextUnit id
      • setTargetLocale

        void setTargetLocale​(LocaleId trgLoc)
      • setParameters

        void setParameters​(Parameters params)