Interface IParseCallback

All Known Implementing Classes:
ParseEntry

public interface IParseCallback
Callback for parse files.
  • Method Summary

    Modifier and Type
    Method
    Description
    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.
    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.
    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
    void
    This 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 format
      source - source entry text
      translation - exist translation text
      isFuzzy - true if translation is fuzzy
      props - an array of key=value metadata properties for the entry
      path - path of segment
      filter - filter which produces entry
      protectedParts - 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 for addEntryWithProperties(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 it
      source - Translatable source string
      translation - translation of the source string, if a format supports it
      isFuzzy - 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 it
      filter - 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.