Ticket #13691 (new Bug)

Opened 3 years ago

Translation of actions.xml does not work for customized message ids

Reported by: frisi Owned by:
Priority: minor Milestone: 4.x
Component: Unknown Version: 4.2
Keywords: i18n Cc:

Description

i18n for actions.xml using custom message ids does not work as expected:

i18ndude will extract 2 messageids out of this actions.xml

<object name="document_actions">
    
    <object name="totop" meta_type="CMF Action" i18n:domain="mydomain">
        <property name="title" i18n:translate="totop-label">to top of page</property>
        <property name="description" i18n:translate="totop-text">Go to the top of the page</property>
        <property
        name="url_expr">python:context.restrictedTraverse('@@plone').getCurrentUrl()+'#content'</property>
        <property name="link_target"></property>
        <property name="icon_expr"></property>
        <property name="available_expr"></property>
        <property name="permissions"/>
        <property name="visible">True</property>
    </object>

</object>



#. Default: "to top of page"
msgid "totop-label"
msgstr ""

#. Default: "Go to the top of the page"
msgid "totop-text"
msgstr ""

however, they won't be translated.

however, title and description of this action will be translated fine:

    <object name="totop2" meta_type="CMF Action" i18n:domain="mydomain">
        <property name="title" i18n:translate="">totop-label</property>
        <property name="description" i18n:translate="">totop-text</property>
        <property
        name="url_expr">python:context.restrictedTraverse('@@plone').getCurrentUrl()+'#content'</property>
    </object>

this is ok for a workaround but requires to update fuzzy or removed messages for each language in case the english text needs to be changed

Note: See TracTickets for help on using tickets.