Uploaded image for project: 'Service Packs and Hot Fixes'
  1. Service Packs and Hot Fixes
  2. MNT-13821

If a localised string cannot be found then return the messageId **and the parameters**

    Details

    • Type: Bug
    • Status: Closed (View Workflow)
    • Resolution: Fixed
    • Affects Version/s: 5.0
    • Fix Version/s: 5.0.2
    • Component/s: Repository
    • Labels:
      None

      Description

      If a localised string cannot be found then return the messageId *and the parameters*.

      In the log i get this message:

      org.alfresco.service.cmr.dictionary.DictionaryException: 03100000 d_dictionary.model.err.no_model

      for some reason it does not get translated, it should be

      "Model ''{0}'' does not exist"

      , but this way i also lose the parameter. So even if it does not get transalted i must get the parameters.

      AlfrescoRuntimeException.java
      /**
           * Resolves the message id to the localised string.
           * <p>
           * If a localised message can not be found then the message Id is
           * returned.
           * 
           * @param messageId     the message Id
           * @param params        message parameters
           * @return              the localised message (or the message id if none found)
           */
          private static String resolveMessage(String messageId, Object[] params)
          {
              String message = I18NUtil.getMessage(messageId, params);
              if (message == null)
              {
                  // If a localised string cannot be found then return the messageId
                  message = messageId;
              }
              return buildErrorLogNumber(message);
          }
      

      it should be:

       // If a localised string cannot be found then return the messageId
                  message = messageId + " - " + params;
      

        Attachments

          Structure

            Activity

              People

              • Assignee:
                closedbugs Closed Bugs
                Reporter:
                mpreti Michele Preti (Inactive)
              • Votes:
                0 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 - 3 hours
                  3h

                    Structure Helper Panel