mbi / django-rosetta

Rosetta is a Django application that eases the translation process of your Django projects
MIT License
1.07k stars 195 forks source link

Plurals with context are rendered incorrectly #260

Closed jieter closed 3 years ago

jieter commented 3 years ago

With following .po excerpt, the context marker is rendered on top of the message id, as shown in the screenshot.

msgctxt "BADGE_PROGRESS_OBSERVATIONS"
msgid "1 observation"
msgid_plural "%{count} observations"
msgstr[0] "1 waarneming"
msgstr[1] "%{count} waarnemingen"
Screenshot 2021-07-20 at 08 47 42
jieter commented 3 years ago

I had a look into this: vertical alignment of the msgid's with the textarea's is done using JavaScript here:

https://github.com/mbi/django-rosetta/blob/e095402daa9eca36db2a68c7be9ea24f826cf9be/rosetta/templates/rosetta/js/rosetta.js#L116-L122

mbi commented 3 years ago

Thanks. That JavaScript code is just ugly, I've moved the the context and comments into the last column, where they make more sense, and where we don't need any silly trickery to position them.

jieter commented 3 years ago

Great, thanks!

jieter commented 3 years ago

@mbi Can you indicate when this fix will be available in a release?

mbi commented 3 years ago

I don't really plan my releases, ... so here you go: 0.9.7, just released, contains this fix.

jieter commented 3 years ago

Thanks!