Uploaded image for project: 'eZ Publish / Platform'
  1. eZ Publish / Platform
  2. EZP-26431

Allow strings with parameters to be translated

    Details

      Description

      EZP-25428 provides the base infrastructure to translate "simple" strings but it's not yet possible to translate strings with parameters. Also, on that topic, it's common to have strings with some HTML code. This specific use case can be tricky so it has to be taken into early in the design of such feature.

      Syntax proposal:

      {{ translate 'string.with.parameter' 'domain' variable1=value variable2='another thing' }}
      

      Most likely, this also involves changing the Translation dumper to be able to detect such code.

        Issue Links

          Activity

          Hide
          Damien Pobel (Inactive) added a comment - - edited

          Templates with such strings:

          • searchlistview.hbt
          • universaldiscovery/search.hbt
          • universaldiscovery/confirmedlist.hbt
          • contentedit.hbt
          • subitem/grid.hbt
          • subitem/listmore.hbt
          • loginform.hbt
          • fields/view/binaryfile.hbt
          • fields/edit/binaryfile.hbt
          • fields/view/media.hbt
          • fields/edit/media.hbt
          • fields/view/image.hbt
          • fields/edit/image.hbt
          Show
          Damien Pobel (Inactive) added a comment - - edited Templates with such strings: searchlistview.hbt universaldiscovery/search.hbt universaldiscovery/confirmedlist.hbt contentedit.hbt subitem/grid.hbt subitem/listmore.hbt loginform.hbt fields/view/binaryfile.hbt fields/edit/binaryfile.hbt fields/view/media.hbt fields/edit/media.hbt fields/view/image.hbt fields/edit/image.hbt
          Show
          Damien Pobel (Inactive) added a comment - PR: https://github.com/ezsystems/PlatformUIBundle/pull/710
          Hide
          Damien Pobel (Inactive) added a comment -
          Show
          Damien Pobel (Inactive) added a comment - @QA same comment as in https://jira.ez.no/browse/EZP-25428?focusedCommentId=200071&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-200071 except that now we can and we do translate strings with parameters.
          Hide
          Rui Silva (Inactive) added a comment -

          PR tested and validated by QA for master.
          Sending back to dev needed so PR can be merged.
          Please close issue afterwards.

          Show
          Rui Silva (Inactive) added a comment - PR tested and validated by QA for master. Sending back to dev needed so PR can be merged. Please close issue afterwards.
          Show
          Damien Pobel (Inactive) added a comment - Merged in https://github.com/ezsystems/PlatformUIBundle/commit/16bf32d46371c49f3f9d2e8c0182e524801b3eff

            People

            • Assignee:
              Unassigned
              Reporter:
              Damien Pobel (Inactive)
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: