Skip to content
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

Update LLM translation context #3241

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

ayanaar
Copy link
Collaborator

@ayanaar ayanaar commented May 30, 2024

Fully fixes #3204

This PR refactors the LLM translation handling to address the integration of LLM translations with keyboard shortcuts. The following changes have been made:

  1. Refactored Translation Context:

    • Updated the TranslationContext.tsx to provide multiple LLM translations and the selected option.
    • Changed the state to store llmTranslations as a dictionary of translations based on characteristics.
  2. Updated Keyboard Shortcuts:

    • Modified editFieldShortcuts.ts to correctly handle LLM translations when using Ctrl+Shift+Up/Down shortcuts.
    • Ensured that the correct LLM translation is copied into the editor and the source type is set to gpt-transform.
  3. Adjusted Machinery Translation Component:

    • Updated MachineryTranslation.tsx to use the new context structure.
    • Adjusted logic to select the appropriate LLM translation and update sources accordingly.

Please note that this is still a work in progress and is not fully functional yet.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

LLM translations are not correctly attributed
1 participant