Image upload inside topic doesn't work if language is not English

Hi there,

the upload inside a thread does not work if the language is de (german). If you switch back to english the upload works fine.

The Bug:
Instead of the image it only appears a text XYZ.png wird hochgeladen… instead of the image.

The locales seems correct to me:
German: {{filename}} wird hochgeladen…
English: Uploading {{filename}}…

Maybe one have to switch the order from {{filename}} wird hochgeladen… to Wird hochgeladen: {{filename}} because of a possible syntax issue (maybe it’s expecting the variable {{filename}} at the beginning)…?

2 Likes

Looks like it works only with English.

Seems to be a regression since
https://github.com/discourse/discourse/commit/af7f00099ff9541f0b4dba5771d824bcd2d9efd5

2 Likes

Interesting, so other languages also don’t work. Didn’t expected that :open_mouth:

Gosh. Sorry about that. Fixing it…

EDIT: Here’s the fix.

https://github.com/discourse/discourse/commit/a6934a200efcc6d261454e545175e76ef0880ef9

Had to remove the filename since dealing with encodings in JavaScript is such a PITA that it’ll have to wait till after the release :disappointed:

8 Likes