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

Pass article through translate endpoint on create article #4654

Open
wants to merge 2 commits into
base: develop
Choose a base branch
from

Conversation

thecalcc
Copy link
Contributor

@thecalcc thecalcc commented Oct 4, 2024

SDBELGA-889

@tomaskikutis
Copy link
Member

What was the issue here? I though there was already an integration with translation service?

Could you double check if your fix runs well on authoring-react?

@thecalcc
Copy link
Contributor Author

thecalcc commented Oct 4, 2024

What was the issue here? I though there was already an integration with translation service?

Could you double check if your fix runs well on authoring-react?

The issue is that we're not running the article through the /archive/translate endpoint, which processes the article and adds some data to it, which is then rendered on the UI. That was missing because I was simply creating a new article

@thecalcc
Copy link
Contributor Author

thecalcc commented Oct 4, 2024

What was the issue here? I though there was already an integration with translation service?

Could you double check if your fix runs well on authoring-react?

For authoring-react, currently there are problems with applying the patch after the translation. Either when the dangerous options are enabled etags don't match, and in the case when this is not enabled, the patch doesn't get applied.

Do you think this is an ok way to do it? If yes, this means that the changes would not be saved and the save button should be in active state, thus would require the user to click to persist the translated content.

this.props.onFieldsDataChange?.(
  this.props.fieldsData?.set(
  'body_html',
  superdesk.helpers.editor3ToOperationalFormat(
  {rawContentState: rawState},
  this.props.article.language,
  ),
));

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.

2 participants