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

As a developer, I want to define human readable, translatable strings for a custom tag

    Details

      Description

      In the current iteration, custom tags are only given an identifier. Based on the specifications, we require for each custom tag:

      • a human readable name ("Quote")
      • a help text ("Add your quote")
      • a human readable name per attribute ("Quote's author")

      In addition, those elements must be translatable.

      Possible technical approach

      Field groups names use the translation system to provide human readable strings. We could easily do the same here. Each of the items given above would be outputted using the translation functions, using the custom tag's identifier as a key/prefix:

      - custom_tag_quote: Quote
      - custom_tag_quote_help_text: Add your quote
      - custom_tag_quote_attribute_author: Author
      

      An extractor should be provided that looks for custom tags, and pregenerates the translation keys (example of an extractor). A default translation for the name should be generated based on the custom tag's key. Considering that eZ Systems custom tags would be prefixed with ez, like ezyoutube, we would strip down the ez prefix, replace _ with spaces, and capitalize the first letter.

        Activity

        Bertrand Dunogier created issue -
        Bertrand Dunogier made changes -
        Field Original Value New Value
        Epic Link EZP-25357 [ 52851 ]
        Bertrand Dunogier made changes -
        Status Backlog [ 10000 ] Specification [ 10002 ]
        Assignee Bertrand Dunogier [ bertrand.dunogier@ez.no ]
        Bertrand Dunogier made changes -
        Description In the current iteration, custom tags are only given an identifier.

        Based on the specifications, we require for each custom tag:

        a human readable name ("Quote")
        a help text ("Add your quote")
        a human readable name per attribute ("Quote's author")
        In addition, those elements must be translatable.

        Possible technical approach
        Field groups names use the translation system to provide human readable strings. We could easily do the same here. Each of the items given above would be outputted using the translation functions, using the custom tag's identifier as a key/prefix:

        {code}
        - custom_tag_quote: Quote
        - custom_tag_quote_help_text: Add your quote
        - custom_tag_quote_attribute_author: Author
        {code}
        In the current iteration, custom tags are only given an identifier. Based on the specifications, we require for each custom tag:

        - a human readable name ("Quote")
        - a help text ("Add your quote")
        - a human readable name per attribute ("Quote's author")

        In addition, those elements must be translatable.

        h3. Possible technical approach
        Field groups names use the translation system to provide human readable strings. We could easily do the same here. Each of the items given above would be outputted using the translation functions, using the custom tag's identifier as a key/prefix:

        {code}
        - custom_tag_quote: Quote
        - custom_tag_quote_help_text: Add your quote
        - custom_tag_quote_attribute_author: Author
        {code}
        Bertrand Dunogier made changes -
        Description In the current iteration, custom tags are only given an identifier. Based on the specifications, we require for each custom tag:

        - a human readable name ("Quote")
        - a help text ("Add your quote")
        - a human readable name per attribute ("Quote's author")

        In addition, those elements must be translatable.

        h3. Possible technical approach
        Field groups names use the translation system to provide human readable strings. We could easily do the same here. Each of the items given above would be outputted using the translation functions, using the custom tag's identifier as a key/prefix:

        {code}
        - custom_tag_quote: Quote
        - custom_tag_quote_help_text: Add your quote
        - custom_tag_quote_attribute_author: Author
        {code}
        In the current iteration, custom tags are only given an identifier. Based on the specifications, we require for each custom tag:

        - a human readable name ("Quote")
        - a help text ("Add your quote")
        - a human readable name per attribute ("Quote's author")

        In addition, those elements must be translatable.

        h3. Possible technical approach
        Field groups names use the translation system to provide human readable strings. We could easily do the same here. Each of the items given above would be outputted using the translation functions, using the custom tag's identifier as a key/prefix:

        {code}
        - custom_tag_quote: Quote
        - custom_tag_quote_help_text: Add your quote
        - custom_tag_quote_attribute_author: Author
        {code}

        An extractor should be provided that looks for custom tags, and pregenerates the translation keys ([example of an extractor|https://github.com/ezsystems/repository-forms/blob/master/lib/Translation/LimitationTranslationExtractor.php]). A default translation for the name should be generated based on the custom tag's key. Considering that eZ Systems custom tags would be prefixed with {{ez}}, like {{ezyoutube}}, we would strip down the {{ez}} prefix, replace {{_}} with spaces, and capitalize the first letter.
        Bertrand Dunogier made changes -
        Status Specification [ 10002 ] Closed [ 6 ]
        Assignee Bertrand Dunogier [ bertrand.dunogier@ez.no ]
        Resolution Duplicate [ 3 ]

          People

          • Assignee:
            Unassigned
            Reporter:
            Bertrand Dunogier
          • Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: