Uploaded image for project: 'Nuxeo Platform'
  1. Nuxeo Platform
  2. NXP-24788

Spanish translations not working

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Critical
    • Resolution: Not A Bug
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: Translations, Web UI

      Description

      Steps to reproduce:

      • Create a Custom document type called Client, with a schema with 3 fields:
        • name (String)
        • surname (String)
        • gender (Directory)
      • Create the translations for each field
        messages.json
        {
        	"label.document.type.client": "Client",
          
          "label.doctype.client.name": "Name",
          "label.doctype.client.surname": "Surname",
          "label.doctype.client.gender": "Gender"  
        }
        
      messages-es.json
      {
      	"label.document.type.client": "Cliente",
        
        "label.doctype.client.name": "Nombre",
        "label.doctype.client.surname": "Apellido",
        "label.doctype.client.gender": "Genero"  
      }
      
      messages-es_ES.json
      {
      	"label.document.type.client": "Cliente",
        
        "label.doctype.client.name": "Nombre",
        "label.doctype.client.surname": "Apellido",
        "label.doctype.client.gender": "Genero"  
      }
      
      • Use i18n method in the creation layout
        <!--
        `nuxeo-client-create-layout`
        @group Nuxeo UI
        @element nuxeo-client-create-layout
        -->
        <dom-module id="nuxeo-client-create-layout">
          <template>
            <style>
              *[role=widget] {
                padding: 5px;
              }
            </style>
            <nuxeo-input role="widget" value="{{document.properties.dc:title}}" label="[[i18n('title')]]" type="text"></nuxeo-input>
        
            <nuxeo-input role="widget" value="{{document.properties.dc:description}}" label="[[i18n('label.description')]]" type="text"></nuxeo-input>
        
            <nuxeo-directory-suggestion role="widget" value="{{document.properties.client:gender}}" label="[[i18n('label.doctype.client.gender')]]" directory-name="genders"></nuxeo-directory-suggestion>
        
            <nuxeo-input role="widget" value="{{document.properties.client:name}}" label="[[i18n('label.doctype.client.name')]]" type="text"></nuxeo-input>
        
            <nuxeo-input role="widget" value="{{document.properties.client:surname}}" label="[[i18n('label.doctype.client.surname')]]" type="text"></nuxeo-input>
        
          </template>
        
          <script>
          Polymer({
            is: 'nuxeo-client-create-layout',
            behaviors: [Nuxeo.LayoutBehavior],
            properties: {
        
              /**
                 * @doctype Client
                 */
              document: {
                type: Object,
              },
        
            }
          });
          </script>
        </dom-module>
        
      • Deploy your changes

      Default tranlation (messages.json) and french translation (messages-fr.json) are applyed, but spanish translations are not applyed (messages-es.json and/or messages-es_ES.json)

        Attachments

          Activity

            People

            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: