-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Refactor: Ensure plugin's glossary search logic aligns with OmegaT's …
…native implementation - Refactored `OpenAITranslate` to use OmegaT's `GlossarySearcher`, ensuring consistency with OmegaT's native glossary search logic. - Added minimal stub implementations for `SourceTextEntry` and `GlossarySearcher` to support the refactoring. - Removed custom tokenization and glossary search methods, opting for OmegaT's built-in functionality to maintain consistency and reliability.
- Loading branch information
Showing
4 changed files
with
51 additions
and
41 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
package org.omegat.core.data; | ||
|
||
public class SourceTextEntry { | ||
|
||
public String getSrcText() { | ||
// TODO Auto-generated method stub | ||
return null; | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
package org.omegat.gui.glossary; | ||
|
||
import java.util.List; | ||
|
||
import org.omegat.core.data.SourceTextEntry; | ||
import org.omegat.tokenizer.ITokenizer; | ||
import org.omegat.util.Language; | ||
|
||
public class GlossarySearcher { | ||
|
||
public GlossarySearcher(ITokenizer tok, Language lang, boolean mergeAltDefinitions) { | ||
// TODO Auto-generated constructor stub | ||
} | ||
|
||
public List<GlossaryEntry> searchSourceMatches(SourceTextEntry ste, List<GlossaryEntry> entries) { | ||
// TODO Auto-generated method stub | ||
return null; | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters