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

Translate document type in the toast displayed at creation

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 10.10
    • Fix Version/s: 10.10-HF23, 11.1
    • Component/s: Web UI
    • Release Notes Summary:
      The document type is translated in the toast displayed at creation.
    • Backlog priority:
      500
    • Sprint:
      nxGang Sprint 11.1.26
    • Team:
      GANG

      Description

      The toast displayed to confirm a document creation uses the document type id to build the message, as defined in nuxeo-app.html:

      _handleDocumentCreated: function(e) {
              if (!e.detail.response.entries || e.detail.response.entries.length === 1) {
                var doc = e.detail.response.entries ? e.detail.response.entries[0] : e.detail.response;
                this._toast(this.i18n('app.createdDocument', doc.type.toLowerCase() + ' ' + doc.title));
              } else {
                this._toast(this.i18n('app.createdDocuments', e.detail.response.entries.length));
              }
            },
      

      A better user experience would be translate the document type before building the message, as in this example:

      const typeLabel = this.i18n(`label.document.type.${doc.type.toLowerCase()}`);
      this._toast(this.i18n('app.createdDocument', typeLabel + ' ' + doc.title));
      

        Attachments

          Activity

            People

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

              Dates

              • Created:
                Updated:
                Resolved:

                Time Tracking

                Estimated:
                Original Estimate - Not Specified
                Not Specified
                Remaining:
                Remaining Estimate - 0 minutes
                0m
                Logged:
                Time Spent - 35 minutes
                35m

                  PagerDuty

                  Error rendering 'com.pagerduty.jira-server-plugin:PagerDuty'. Please contact your Jira administrators.