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

Some translations don't get picked up in editor modals #3120

Closed
djowett-ftw opened this issue Jun 16, 2020 · 13 comments
Closed

Some translations don't get picked up in editor modals #3120

djowett-ftw opened this issue Jun 16, 2020 · 13 comments

Comments

@djowett-ftw
Copy link

BUG/PROBLEM REPORT (OR OTHER COMMON ISSUE)

What I did:

Use demo.plone.org in German
Try to add a link or an image

What I expect to happen:

Modals are fully translated in the selected language (German)

What actually happened:

Some translations don't get picked up
Screenshot 2020-06-16 at 09 29 15

Screenshot 2020-06-16 at 09 34 40

What version of Plone/ Addons I am using:

5.2.1 on demo.plone.org (also the case in 5.1.6 where we are using it)

@vincentfretin
Copy link
Member

vincentfretin commented Jun 19, 2020

I'm looking with current 5.2 branch (future 5.2.2)

For insert a link:

  • for "External" tab, this seems fixed in branch 5.2
  • in all tabs, "Target" field not translated (waiting new PR from @djowett-ftw)
  • in Anchor tab, "Select an anchor" not translated (waiting new PR from @djowett-ftw)
  • In the richtext toolbar, the tooltip "Remove link(s)" is no translated. (waiting new PR from @djowett-ftw)

For insert an image:

@vincentfretin
Copy link
Member

vincentfretin commented Jun 19, 2020

Currently on branch 5.2 in German, see the second tab object Object:
tab_object_Object

@vincentfretin
Copy link
Member

Is there an issue with "Format" menu in the toolbar too? In French it's the same "Format". In German shouldn't it be "Formate"?

@vincentfretin
Copy link
Member

@djowett-ftw You added the messages "Select an anchor" and "Target" in
collective/plone.app.locales@c860a23#commitcomment-40030331
How did you add them? Manually?
This is properly translated for example in French in widgets.po but it doesn't translate in the interface.
I can see those two messages in
https://github.com/plone/mockup/blob/db7843e7f1cb418198e098d66e5bddcd42bca036/mockup/patterns/tinymce/templates/link.xml#L61
and
https://github.com/plone/mockup/blob/db7843e7f1cb418198e098d66e5bddcd42bca036/mockup/patterns/tinymce/templates/link.xml#L74
but I don't know if it's properly internationalized there. What template language is this?

@vincentfretin
Copy link
Member

Yeah I don't think this is correctly internationalized, I think it should be variables there and you need to have the variable in the object https://github.com/plone/mockup/blob/3e64876363286d9f1dd8d7a97a18ed013479bbe3/mockup/patterns/tinymce/js/links.js#L463 returned by generateModalHtml
I see an example with captionFromDescription
plone/mockup@3e64876#diff-ff3812f0a02826b2ef1ffcd5ccc5d579R154

@vincentfretin
Copy link
Member

I resynced widgets.pot and kept manually your two messages for now. This added two messages related to image caption, so if you translate them, this should fixes the translation in the UI for those.

#: ./patterns/tinymce/pattern.js
msgid "Show Image Caption from Image Description"
msgstr ""

#: ./patterns/tinymce/pattern.js
msgid "Image Caption"
msgstr ""

@djowett-ftw
Copy link
Author

@vincentfretin I did the internationalization work in https://github.com/plone/mockup/pull/930/files#diff-ae0bd47fbe86e225ca9bc31a278348eeL66. It was a backport to begin with at least, but maybe it ended up with fixes that aren't in Plone 5.2 (e.g. making "Target" translatable and reverting "Remove Link(s)" to "Remove Link" - as there are no translations for the former.

@vincentfretin
Copy link
Member

Ah! For Plone 5.1.x, we use mockup branch 2.7.x and for Plone 5.2.x we use mockup master.
So there is some of your changes that are only on branch 2.7.x apparently. Can you create a new PR against master to have your changes there? Maybe its as simple as cherry-picking your commit, maybe not.

@vincentfretin
Copy link
Member

vincentfretin commented Jun 20, 2020

For the "object Object:" tab, it should be "Upload". This is working properly on buildout.coredev 5.1 / mockup 2.7.x. The regression is in mockup master.

@vincentfretin
Copy link
Member

I did a fix for the Upload tab in TinyMCE Image showing [object Object]
plone/mockup#986

@vincentfretin
Copy link
Member

I updated my comment #3120 (comment) to create a todo list of the remaining points.

@djowett-ftw
Copy link
Author

Hi @vincentfretin, sorry I've not been granted time to work on this - I think I burned too much time on the original 5.1 patch (with the confusions you encountered) to get favour for any more :-(

@vincentfretin
Copy link
Member

I fixed the remaining issues in plone/mockup@ad2773a
it was just a matter of cherry-picking your commit and fix conflicts.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants