Uploaded image for project: 'PUBLIC - Liferay Portal Community Edition'
  1. PUBLIC - Liferay Portal Community Edition
  2. LPS-43539

Reduce the amount of format and get methods related with Language classes

    Details

      Description

      Currently we have a bunch of methods to get and format I18n messages.

      The current use is:

      *One .get method to get a key without attributes
      *One .format method to get a key with an attribute
      *One .format method to get a key with an array of attributes

      This is replicated 3 times because this methods could receive as first parameter a Locale, a PageContext or a PortletConfig.

      The solution we propose is to deprecate the get methods, and change the signature of the format methods using varargs, so whe will only have to use a unique method:

      *One .format method that could receive 0 to n Object attributes (or an array of them) - This is also replicated 3 times

      FTR- Brian also suggest us to improve Source Formatter to automatic change LanguageUtil.get to LanguageUtil.format

        Attachments

          Activity

            People

            • Assignee:
              roberto.diaz Roberto Díaz
              Reporter:
              roberto.diaz Roberto Díaz
              Recent user:
              Shalaka Tendulkar
              Participants of an Issue:
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Packages

                Version Package
                6.2.10 EE GA1