omegat-org / azure-translate-plugin

Microsoft Azure Translate V3 plugin
GNU General Public License v3.0
4 stars 0 forks source link

[BUG] Ignores "Automatically Fetch Translations" #7

Closed kosivantsov closed 10 months ago

kosivantsov commented 1 year ago

Describe the bug When "Automatically Fetch Translation" is disabled, it still get translations from the service and populates the MT pane. It makes it impossible to fetch translation from other enabled MT services, because Ctrl+M inserts Azure translation instead of fetching other translations.

To Reproduce Steps to reproduce the behavior:

  1. Install the Azure translate plugin
  2. Deactivate Options -> Automatically Fetch Translations
  3. Enable "Microsoft Translator V2/V3" and at least one other MT connector
  4. Activate any segment (even if it's translated)
  5. Get results from Microsoft even without pressing Ctrl+M to fetch translations
  6. Press Ctrl+M to fetch translations from other enabled connectors, but instead of getting them, see the MS translation inserted into the segment's target.

Expected behavior No results from MS Translator when "Automatically Fetch Translations" is disabled, unless Ctrl+M is pressed.

Desktop (please complete the following information):

ivandaniel15 commented 1 year ago

The same happens to me, upon entering any translated segment, the the Azure plugin fetches the translation again, even though the option "Automatically Fetch Translations" is disabled.

OS: macOS 13.4 (Apple Silicon) Java: OpenJDK 11 OmegaT version: 6.0.0

miurahr commented 10 months ago

10 does not solve #7 but #6

miurahr commented 10 months ago

I think this is a bug in OmegaT which introduced in OmegaT 3.5.2 junction with the bug in Azure plugin. The fix is proposed; https://github.com/omegat-org/omegat/pull/842

miurahr commented 10 months ago

I've implemented getCachedTranslation method that check cached entry and when there is not a cached entry, I tried to get translation from the engine. OmegaT always call getCachedTranslation when disabled the automatic fetch and translated segments.

miurahr commented 10 months ago

fixed by #9 and will be released as v0.4.0.