Skip to content

feat(Authoring): Translate with AI#314

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

feat(Authoring): Translate with AI#314
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 an API endpoint to handle AWS Translate requests.
  • Changed Controller -> RestController since saveTranslations already had ResponseBody.

Testing

  • Test with feat(Authoring): Translate with AI WISE-Client#2272.
  • Add the properties below to application-dockerdev.properties.
    • If you don't set values for these, the translate with AI button should not appear.
    • If the values you set don't work, clicking the translate with AI button should give you an alert with a warning.
aws.accessKeyId=
aws.secretAccessKey=
aws.region=

@Aaron-Detre Aaron-Detre self-assigned this Feb 22, 2026
@Aaron-Detre Aaron-Detre added the enhancement New feature or request label Feb 22, 2026
@Aaron-Detre Aaron-Detre changed the title feat(Authoring Tool): Translate with AI feat(Authoring): Translate with AI Feb 22, 2026
@Aaron-Detre Aaron-Detre marked this pull request as ready for review February 23, 2026 04:28
Copy link
Member

@hirokiterashima hirokiterashima left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  • We need to handle case when aws settings are not specified in application.properties. Right now, the API throws an exception and won't start.
  • Add the new aws settings to application_sample.properties and application-dockerdev-sample.properties, with explanation on what they're used for.

}
}

@PostMapping("translationSuggestions")
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Rename endpoint to /api/author/project/translate/suggest

Suggested change
@PostMapping("translationSuggestions")
@PostMapping("suggest")

}

@PostMapping("translationSuggestions")
protected String getSuggestedTranslation(Authentication auth, @RequestBody ObjectNode objectNode) throws IOException, IllegalArgumentException {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Instead of ObjectNode, create a class TranslatableText(?)

See how we did CRaterPingRequest here: https://github.com/WISE-Community/WISE-API/blob/translate-with-ai/src/main/java/org/wise/vle/web/CRaterController.java#L60

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants