Translation composer missing image upload support

Manual translation composer does not support image upload or paste (console: this.drop is not a function)

Description:
When editing a post’s manual localization via “Translate → Edit localization manually”, the translation composer does not allow image uploads or pasting images.

Steps to reproduce:

  1. Open any post with the Discourse Translation feature enabled.

  2. Click the “Translate” button → choose “Edit localization manually.”

  3. Try to:

    • drag an image into the translation composer, or

    • paste an image from clipboard.

  4. Nothing happens — uploads are ignored, and the browser console shows errors.

Observed behavior:

  • Image upload and paste do not work.

  • Console errors:

    Uncaught TypeError: this.drop is not a function at Object.handleEvent (content.js:1) 

    and

    PresenceChannel '/discourse-presence/undefined/...' not found 
  • Indicates missing drop handler and topic_id context in post-translation-editor.gjs.

Expected behavior:

  • Allow uploads/pasting like the normal composer for translated image.

Notes:
Seems the translation composer runs in a simplified editor context without composer-upload integration. A fix could be adding upload handling.


2 Likes

Thanks for the request, are you uploading a lot of images with text? curious what the use case for translated images is

1 Like

I think he means that the original post has images, and the translated version (manually via the composer) also needs them so he is trying to also upload the same images there.

It’s a fundamental problem, as only the original posts can hold upload references.

1 Like

For example, some user has uploaded an image with English text.

But my site is mainly Japanese.

So, I translated the image into Japanese and want to replace it in the translated post.

2 Likes

Hey @lhkjacky, thanks for the suggestion. We have added support for uploads in translated posts.

This feature is now complete and live on Meta :tada:

Let me know how it goes and if you come across any issues!

3 Likes