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

Portlet titles appearing in wrong alphabetical order in Apps - Plugins Configuration and in Apps - Components

    Details

      Description

      Steps - 7.0.x/master

      1. Log in with Test
      2. Change display language to German
      3. Go to Product Menu - Control Panel - Apps - Components
      4. In that page you should see these entries, among others:
        Benutzergruppen
        Benutzerstatistiken
        Benutzer und Organisationen
        

      Steps - 6.2.x

      1. Log in with Test
      2. Change display language to German
      3. Go to Control Panel - Apps - Plugins Configuration - "Portlet Plugins" tab
      4. In that page you should see these entries, among others:
        Benutzergruppen
        Benutzerstatistiken
        Benutzer und Organisationen
        

      Problem: "Benutzer und Organisationen" should appear before "Benutzergruppen" according to the German rules.
      You can verify it on http://alphabetizer.flap.tv/.

      Technical Background


      QA/Solution Notes
      The following portal property has been added:

      portal.properties
          #
          # Specify the collator rules to be used by the CollatorUtil. These rules, if
          # set, are provided to a RulesBasedCollator for text sorting and are only
          # configurable by locale. A file can also be used by prefixing "file\:" to
          # a path on the file system. Using a file means property escaping can be
          # avoided.
          #
          # See https://issues.liferay.com/browse/LPS-73600 for more information.
          #
          #collator.rules[en_US]=
      

      Reference: https://docs.oracle.com/javase/8/docs/api/java/text/RuleBasedCollator.html

      When using a file to configure rules (

      collator.rules[en_US]=file\:/path/to/file.txt

      ), the content should just be the value of the rule, no property escaping is needed.
      Example for using a file for rules (on Linux):
      add these lines to portal-ext.properties file:

      collator.rules[de]=file\:/home/liferay/bundles/ee-6.2.x/rules.txt
      collator.rules[en_US]=file\:/home/liferay/bundles/ee-6.2.x/rules.txt
      collator.rules[de_DE]=file\:/home/liferay/bundles/ee-6.2.x/rules.txt
      

      And the rules.txt file should contain this line:

      ='_' < ' ' < a,A < b,B < c,C < d,D < e,E < f,F < g,G < h,H < i,I < j,J < k,K < l,L < m,M < n,N < o,O < p,P < q,Q < r,R < s,S < t,T < u,U < v,V < w,W < x,X < y,Y < z,Z

      Example configurations for "German" language:

      collator.rules[de]=<'\ '<a\,A<b\,B<c\,C<d\,D<e\,E<f\,F<g\,G<h\,H<i\,I<j\,J<k\,K<l\,L<m\,M<n\,N<o\,O<p\,P<q\,Q<r\,R<s\,S<t\,T<u\,U<v\,V<w\,W<x\,X<y\,Y<z\,Z
      collator.rules[de_DE]=<'\ '<a\,A<b\,B<c\,C<d\,D<e\,E<f\,F<g\,G<h\,H<i\,I<j\,J<k\,K<l\,L<m\,M<n\,N<o\,O<p\,P<q\,Q<r\,R<s\,S<t\,T<u\,U<v\,V<w\,W<x\,X<y\,Y<z\,Z
      

        Attachments

        1. fail-lps73600.png
          fail-lps73600.png
          231 kB
        2. fixed.png
          fixed.png
          14 kB

          Issue Links

            Activity

              People

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

                Dates

                • Created:
                  Updated:
                  Resolved:
                  Days since last comment:
                  1 year, 47 weeks, 3 days ago

                  Packages

                  Version Package
                  6.2.X EE
                  7.0.0 DXP FP25
                  7.0.0 DXP FP26
                  7.0.X EE
                  7.0.4 CE GA5
                  7.1.X
                  Master