Package org.omegat.filters2
Interface ITranslateCallback
- All Known Implementing Classes:
TranslateEntry
public interface ITranslateCallback
Callback for translate files.
-
Method Summary
Modifier and TypeMethodDescription@Nullable StringgetTranslation(@Nullable String id, String source) Old call without path, for compatibility@Nullable StringgetTranslation(@Nullable String id, String source, @Nullable String path) Get translation for output to compiled target.voidThis method called from AbstractFilter if filter require second pass.voidsetPass(int pass) Set current pass number.
-
Method Details
-
setPass
void setPass(int pass) Set current pass number.Any filter called in one-pass mode by default. But if it require second pass for support prev/next segments, it can set flag 'needSecondPass'.
- Parameters:
pass- The current path number, i.e., 1 or 2
-
linkPrevNextSegments
void linkPrevNextSegments()This method called from AbstractFilter if filter require second pass. It links prev/next segments for multiple translations. -
getTranslation
Get translation for output to compiled target.- Parameters:
id- ID in source file, or null if ID not supported by formatsource- source entry textpath- path of segment- Returns:
- translation or null if translation not exist
-
getTranslation
Old call without path, for compatibility- Parameters:
id- ID in source file, or null if ID not supported by formatsource- source entry text- Returns:
- translation or null if translation not exist
-