Skip to content

Comments

feat(Authoring): Translate with AI#2272

Open
Aaron-Detre wants to merge 9 commits intodevelopfrom
translate-with-ai
Open

feat(Authoring): Translate with AI#2272
Aaron-Detre wants to merge 9 commits intodevelopfrom
translate-with-ai

Conversation

@Aaron-Detre
Copy link
Contributor

@Aaron-Detre Aaron-Detre commented Feb 22, 2026

Changes

  • Added a button below translatable fields that automatically translates the default language text into the current language.
  • If there is already a translation, clicking the button opens a dialog where you can choose to replace the current translation with the AI translation.

Test

  • Test with feat(Authoring): Translate with AI WISE-API#314
  • The "translate with AI" button should only appear below fields containing some default language text.
  • Clicking the translate button should automatically fill the field if there is no translation in the current language.
  • Clicking the translate button should open the translation suggestion dialog if there is a translation in the current language.
  • Clicking replace in the dialog should overwrite the field. Clicking cancel should leave the field as is.
  • Translating one field should not affect any other field.

Bug

  • When switching languages, all translatable fields that haven't been edited will be automatically filled with the most recent translationText in that language it seems.
  • When clicking the translate button on a component with multiple translatable fields, clicking to translate one field will automatically fill in all translatable fields that haven't been edited yet in that language.
  • If I then delete whatever was filled in the random field and click translate on the original field again, it doesn't fill in the random field.
  • I think this happens because all these fields' values are bound to translationText in the AbstractTranslatableFieldComponent., but I wasn't able to figure out why they're all sharing the same translationText when these are all different components which should each have their own translationText field. I'm also not sure why editing a field would stop this from happening.

@Aaron-Detre Aaron-Detre self-assigned this Feb 22, 2026
@Aaron-Detre Aaron-Detre added the enhancement New feature of any size or improvement (UI, performance, security) label Feb 22, 2026
@qltysh
Copy link

qltysh bot commented Feb 22, 2026

All good ✅

@qltysh
Copy link

qltysh bot commented Feb 23, 2026

Qlty

Coverage Impact

Unable to calculate total coverage change because base branch coverage was not found.

Modified Files with Diff Coverage (4)

RatingFile% DiffUncovered Line #s
New file Coverage rating: B
src/assets/wise5/services/teacherProjectTranslationService.ts75.0%56
New file Coverage rating: F
...ct-translatable-field/abstract-translatable-field.component.ts66.7%81-86
New file Coverage rating: A
...suggestions-dialog/translation-suggestions-dialog.component.ts94.1%34
New file Coverage rating: D
...slatable-asset-chooser/translatable-asset-chooser.component.ts100.0%
Total86.2%
🤖 Increase coverage with AI coding...

In the `translate-with-ai` branch, add test coverage for this new code:

- `src/assets/wise5/authoringTool/components/abstract-translatable-field/abstract-translatable-field.component.ts` -- Line 81-86
- `src/assets/wise5/authoringTool/components/translation-suggestions-dialog/translation-suggestions-dialog.component.ts` -- Line 34
- `src/assets/wise5/services/teacherProjectTranslationService.ts` -- Line 56

🚦 See full report on Qlty Cloud »

🛟 Help
  • Diff Coverage: Coverage for added or modified lines of code (excludes deleted files). Learn more.

  • Total Coverage: Coverage for the whole repository, calculated as the sum of all File Coverage. Learn more.

  • File Coverage: Covered Lines divided by Covered Lines plus Missed Lines. (Excludes non-executable lines including blank lines and comments.)

    • Indirect Changes: Changes to File Coverage for files that were not modified in this PR. Learn more.

@Aaron-Detre Aaron-Detre marked this pull request as ready for review February 23, 2026 04:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature of any size or improvement (UI, performance, security)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant