-
-
Notifications
You must be signed in to change notification settings - Fork 114
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[BUGS#1238] fix: check cache before asking engine when visit translat… #884
[BUGS#1238] fix: check cache before asking engine when visit translat… #884
Conversation
…ed segment Signed-off-by: Hiroshi Miura <[email protected]>
❌ Run Gradle test failed: |
Signed-off-by: Hiroshi Miura <[email protected]>
Signed-off-by: Hiroshi Miura <[email protected]>
I don't use MT from OmegaT so I would not know how to test this. |
|
||
There are two convenience class for plugins. You are recommended to use `org.omegat.core. | ||
machinetranslators.BaseCachedTranslate`. It implements many necessary things, and you can concentrate into a logic to | ||
access your MT engine API. There are only three methods you should override. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should express about how to handle credentials to access API. Also we should describe how to implement a preferences dialog to ask credential information and how to store the credentials in a persistent storage.
- [NICT TexTra](https://codeberg.org/miurahr/omegat-textra-plugin/releases) | ||
- [Tencent translation](https://github.com/yoyicue/omegat-tencent-plugin) | ||
|
||
## Getting started the project |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The review comments tell us a suggestion that developers may want to know a way to write unit tests, to run integration test, and a way to run implemented features without learning things which he should know.
We can explain about WireMock and give a reference URL when developers want to learn it for unit tests.
We can also explain a parser test example which is mandatory for unit test.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The review comments tell us a suggestion that developers may want to know a way to write unit tests, to run integration test, and a way to run implemented features without learning things which he should know.
If you tag me for review and you don't tell me explicitly what I'm supposed to do and what I'm supposed to expect, I'm not sure my review will be very relevant.
Also, there is no such thing that I "should know". There are things that you know, things that I know, and things that I can learn, but I can't guess what I have to learn if it is not explicitly stated, and then it depends on my general availability.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It is challenging for me to express a fact and ideas correctly. I have an idea to provide a way to test a MT feature of OmegaT without knowing actual MT services, and want to write a document about it.
I will update a topic branch with a feature and description how to use it. This will allow developers to see a behavior without learning external services/products other than OmegaT.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
pls. see an update.
return translator.getCachedTranslation(source, target, src); | ||
} | ||
String cached = translator.getCachedTranslation(source, target, src); | ||
if (cached != null || !Preferences.isPreferenceDefault(Preferences.MT_AUTO_FETCH, false) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We can check code coverage whether the all the conditions are covered in unit tests.
You can check a new section of a developer manual. |
I guess you mean "You can check the new section of the developer manual" ? |
Signed-off-by: Hiroshi Miura <[email protected]>
Signed-off-by: Hiroshi Miura <[email protected]>
You can find |
@brandelune any progress? |
No sorry. I think I have checked the manual and reported on that, but I have not tested the branch. |
…ed segment
Pull request type
Which ticket is resolved?
What does this PR change?
transalate
functionOther information