You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm using wagtail_localize. I have it connected to google for a machine translation backend.
My use case requires that translations are created on publish rather than on create, so I turned off syncing, and moved some code into a django trigger on the publish signal. So far, so good.
However.
When I update the English version of a page and republish it, the English version is updated, but the translations are not. I believe I have traced the issue to here:
When the translate_object is called, it seems that there is no provision to update an existing translation. TranslationSource has an update_or_create_from_instance method, which I think will do what I want, but a quick search does not show that this method is called from anywhere.
Am I missing something on how to use this library? Is the update_or_create_from_instance method vestigial, or aspirational?
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
I'm using wagtail_localize. I have it connected to google for a machine translation backend.
My use case requires that translations are created on
publish
rather than oncreate
, so I turned off syncing, and moved some code into a django trigger on thepublish
signal. So far, so good.However.
When I update the English version of a page and republish it, the English version is updated, but the translations are not. I believe I have traced the issue to here:
wagtail-localize/wagtail_localize/operations.py
Line 38 in f5690d0
When the translate_object is called, it seems that there is no provision to update an existing translation. TranslationSource has an
update_or_create_from_instance
method, which I think will do what I want, but a quick search does not show that this method is called from anywhere.Am I missing something on how to use this library? Is the
update_or_create_from_instance
method vestigial, or aspirational?Beta Was this translation helpful? Give feedback.
All reactions