Package org.omegat.filters2
Interface IParseCallback
- All Known Implementing Classes:
ParseEntry
public interface IParseCallback
Callback for parse files.
-
Method Summary
Modifier and TypeMethodDescriptionvoidaddEntry(@Nullable String id, String source, @Nullable String translation, boolean isFuzzy, @Nullable String comment, @Nullable String path, IFilter filter, @Nullable List<ProtectedPart> protectedParts) Read entry from a source file, with single "comment" property.default voidaddEntry(String id, String source, String translation, boolean isFuzzy, String comment, IFilter filter) This method is called by filters to add new entry in OmegaT after read it from a source file.voidaddEntryWithProperties(@Nullable String id, String source, @Nullable String translation, boolean isFuzzy, String[] props, @Nullable String path, IFilter filter, @Nullable List<ProtectedPart> protectedParts) Read entry from a source file, with arbitrary (optional) propertiesvoidThis method can be called from any filter on the end of file processing.
-
Method Details
-
addEntryWithProperties
void addEntryWithProperties(@Nullable String id, String source, @Nullable String translation, boolean isFuzzy, String[] props, @Nullable String path, IFilter filter, @Nullable List<ProtectedPart> protectedParts) Read entry from a source file, with arbitrary (optional) properties- Parameters:
id- ID in a source file, or null if ID not supported by formatsource- source entry texttranslation- exist translation textisFuzzy- true if translation is fuzzyprops- an array of key=value metadata properties for the entrypath- path of segmentfilter- filter which produces entryprotectedParts- protected parts
-
addEntry
void addEntry(@Nullable String id, String source, @Nullable String translation, boolean isFuzzy, @Nullable String comment, @Nullable String path, IFilter filter, @Nullable List<ProtectedPart> protectedParts) Read entry from a source file, with single "comment" property. Convenience method foraddEntryWithProperties(String, String, String, boolean, String[], String, IFilter, List). -
addEntry
default void addEntry(String id, String source, String translation, boolean isFuzzy, String comment, IFilter filter) This method is called by filters to add new entry in OmegaT after read it from a source file.Old call without a path, for compatibility. Comment is converted to a property.
- Parameters:
id- ID of entry, if a format supports itsource- Translatable source stringtranslation- translation of the source string, if a format supports itisFuzzy- flag for fuzzy translation. If a translation is fuzzy, it is not added to the projects TMX, but it is added to the generated 'reference' TMX, a special TMX that is used as extra reference during translation.comment- entry's comment, if format supports itfilter- filter which produces entry
-
linkPrevNextSegments
void linkPrevNextSegments()This method can be called from any filter on the end of file processing. It links prev/next segments for multiple translations.
-