[gatein-issues] [JBoss JIRA] (GTNPORTAL-2344) Navigation labels are shortened but not looking good in multibyte languages

Toshiya Kobayashi (JIRA) jira-events at lists.jboss.org
Thu Feb 2 02:20:48 EST 2012


    [ https://issues.jboss.org/browse/GTNPORTAL-2344?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12663616#comment-12663616 ] 

Toshiya Kobayashi commented on GTNPORTAL-2344:
----------------------------------------------

For example, you can find the following line in http://localhost:8080/portal/classic/home

{code}
<a class="TabIcon DefaultPageIcon" href="/portal/classic/groupnavigation">&#x30b0;&#x30eb;&#x30fc;&#x30...</a>
{code}

UIPortalNavigation.gtmpl trancates a label which is encoded into HTML entity. HTML entity may have 8 characters for one multibyte char.

{code}
<%
  String label = node.getEncodedResolvedLabel();
  if(label.length() > 30) label = label.substring(0,29) + "...";
...
{code}

I think there is no reasonable way to trancate encoded labels on gtmpl side. (They may or may not include HTML entities.)

Providing getEncodedResolvedLabel() method with threshold length and calling it from gtmpl would be good?

{code}
public String getEncodedResolvedLabel(int thresholdLength) {
 ...
}
{code}
                
> Navigation labels are shortened but not looking good in multibyte languages
> ---------------------------------------------------------------------------
>
>                 Key: GTNPORTAL-2344
>                 URL: https://issues.jboss.org/browse/GTNPORTAL-2344
>             Project: GateIn Portal
>          Issue Type: Bug
>      Security Level: Public(Everyone can see) 
>          Components: Internationalization and Localization, User Interface
>    Affects Versions: 3.2.0-Beta01
>            Reporter: Toshiya Kobayashi
>         Attachments: label-shortened_gatein.png
>
>
> Labels are shortened in Navigation bar and Menu bar in multibyte languages. It seems to be intentional but it has tailing ascii char (likely cut in the middle of multibyte). See attached png. ('グルー0...', 'アドミニストレ&...')

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.jboss.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

       



More information about the gatein-issues mailing list