You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@shindig.apache.org by "John Hjelmstad (JIRA)" <ji...@apache.org> on 2009/10/20 03:38:59 UTC

[jira] Created: (SHINDIG-1201) Fix handling of RTL locales/bundles.

Fix handling of RTL locales/bundles.
------------------------------------

                 Key: SHINDIG-1201
                 URL: https://issues.apache.org/jira/browse/SHINDIG-1201
             Project: Shindig
          Issue Type: Bug
         Environment: all
            Reporter: John Hjelmstad
            Assignee: John Hjelmstad


Consider gadget: http://www.cs.bme.hu/~egmont/rtl/rtl.xml

When rendered with &lang=ar&country=us, RTL (lang=ar) keyed strings are chosen but two problems occur:
1. <body direction=ltr> rather than rtl.
2. BIDI substitutions expand to ltr values rather than rtl.

The underlying issues appear to be:
A) When MessageBundle creates a composite bundle that includes EMPTY Bundle entries, the EMPTY bundle's default "ltr" value overrides the "rtl" bundles.
B) When RenderingContentRewriter chooses which direction to set for <body> it gets this from the gadgetSpec.getLocale direct match rather than the MessageBundle to be rendered.

[A] seems to be a clear issue, but it's not 100% clear what to do in the case of [B] since multiple (lang-only and country-only) bundles may be chosen with differing rtl/ltr values.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (SHINDIG-1201) Fix handling of RTL locales/bundles.

Posted by "John Hjelmstad (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/SHINDIG-1201?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12767657#action_12767657 ] 

John Hjelmstad commented on SHINDIG-1201:
-----------------------------------------

http://codereview.appspot.com/136045/show

> Fix handling of RTL locales/bundles.
> ------------------------------------
>
>                 Key: SHINDIG-1201
>                 URL: https://issues.apache.org/jira/browse/SHINDIG-1201
>             Project: Shindig
>          Issue Type: Bug
>         Environment: all
>            Reporter: John Hjelmstad
>            Assignee: John Hjelmstad
>         Attachments: SHINDIG-1201.patch
>
>
> Consider gadget: http://www.cs.bme.hu/~egmont/rtl/rtl.xml
> When rendered with &lang=ar&country=us, RTL (lang=ar) keyed strings are chosen but two problems occur:
> 1. <body direction=ltr> rather than rtl.
> 2. BIDI substitutions expand to ltr values rather than rtl.
> The underlying issues appear to be:
> A) When MessageBundle creates a composite bundle that includes EMPTY Bundle entries, the EMPTY bundle's default "ltr" value overrides the "rtl" bundles.
> B) When RenderingContentRewriter chooses which direction to set for <body> it gets this from the gadgetSpec.getLocale direct match rather than the MessageBundle to be rendered.
> [A] seems to be a clear issue, but it's not 100% clear what to do in the case of [B] since multiple (lang-only and country-only) bundles may be chosen with differing rtl/ltr values.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Resolved: (SHINDIG-1201) Fix handling of RTL locales/bundles.

Posted by "John Hjelmstad (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/SHINDIG-1201?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

John Hjelmstad resolved SHINDIG-1201.
-------------------------------------

    Resolution: Fixed

Thanks Paul -- I'll add some more testing in a bit. Committing now though as we need this patch in fairly short order.

> Fix handling of RTL locales/bundles.
> ------------------------------------
>
>                 Key: SHINDIG-1201
>                 URL: https://issues.apache.org/jira/browse/SHINDIG-1201
>             Project: Shindig
>          Issue Type: Bug
>         Environment: all
>            Reporter: John Hjelmstad
>            Assignee: John Hjelmstad
>         Attachments: SHINDIG-1201.patch
>
>
> Consider gadget: http://www.cs.bme.hu/~egmont/rtl/rtl.xml
> When rendered with &lang=ar&country=us, RTL (lang=ar) keyed strings are chosen but two problems occur:
> 1. <body direction=ltr> rather than rtl.
> 2. BIDI substitutions expand to ltr values rather than rtl.
> The underlying issues appear to be:
> A) When MessageBundle creates a composite bundle that includes EMPTY Bundle entries, the EMPTY bundle's default "ltr" value overrides the "rtl" bundles.
> B) When RenderingContentRewriter chooses which direction to set for <body> it gets this from the gadgetSpec.getLocale direct match rather than the MessageBundle to be rendered.
> [A] seems to be a clear issue, but it's not 100% clear what to do in the case of [B] since multiple (lang-only and country-only) bundles may be chosen with differing rtl/ltr values.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (SHINDIG-1201) Fix handling of RTL locales/bundles.

Posted by "John Hjelmstad (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/SHINDIG-1201?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

John Hjelmstad updated SHINDIG-1201:
------------------------------------

    Attachment: SHINDIG-1201.patch

Patch provided. This implementation chooses the _last_ valid language_direction for the composite MessageBundle, which seems generally right (exact match > lang > country > all precedence). Other input welcome.

> Fix handling of RTL locales/bundles.
> ------------------------------------
>
>                 Key: SHINDIG-1201
>                 URL: https://issues.apache.org/jira/browse/SHINDIG-1201
>             Project: Shindig
>          Issue Type: Bug
>         Environment: all
>            Reporter: John Hjelmstad
>            Assignee: John Hjelmstad
>         Attachments: SHINDIG-1201.patch
>
>
> Consider gadget: http://www.cs.bme.hu/~egmont/rtl/rtl.xml
> When rendered with &lang=ar&country=us, RTL (lang=ar) keyed strings are chosen but two problems occur:
> 1. <body direction=ltr> rather than rtl.
> 2. BIDI substitutions expand to ltr values rather than rtl.
> The underlying issues appear to be:
> A) When MessageBundle creates a composite bundle that includes EMPTY Bundle entries, the EMPTY bundle's default "ltr" value overrides the "rtl" bundles.
> B) When RenderingContentRewriter chooses which direction to set for <body> it gets this from the gadgetSpec.getLocale direct match rather than the MessageBundle to be rendered.
> [A] seems to be a clear issue, but it's not 100% clear what to do in the case of [B] since multiple (lang-only and country-only) bundles may be chosen with differing rtl/ltr values.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (SHINDIG-1201) Fix handling of RTL locales/bundles.

Posted by "Paul Lindner (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/SHINDIG-1201?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12767921#action_12767921 ] 

Paul Lindner commented on SHINDIG-1201:
---------------------------------------

patch looks good.

maybe add a test to ./java/gadgets/src/test/java/org/apache/shindig/gadgets/spec/MessageBundleTest.java or elsewhere?


> Fix handling of RTL locales/bundles.
> ------------------------------------
>
>                 Key: SHINDIG-1201
>                 URL: https://issues.apache.org/jira/browse/SHINDIG-1201
>             Project: Shindig
>          Issue Type: Bug
>         Environment: all
>            Reporter: John Hjelmstad
>            Assignee: John Hjelmstad
>         Attachments: SHINDIG-1201.patch
>
>
> Consider gadget: http://www.cs.bme.hu/~egmont/rtl/rtl.xml
> When rendered with &lang=ar&country=us, RTL (lang=ar) keyed strings are chosen but two problems occur:
> 1. <body direction=ltr> rather than rtl.
> 2. BIDI substitutions expand to ltr values rather than rtl.
> The underlying issues appear to be:
> A) When MessageBundle creates a composite bundle that includes EMPTY Bundle entries, the EMPTY bundle's default "ltr" value overrides the "rtl" bundles.
> B) When RenderingContentRewriter chooses which direction to set for <body> it gets this from the gadgetSpec.getLocale direct match rather than the MessageBundle to be rendered.
> [A] seems to be a clear issue, but it's not 100% clear what to do in the case of [B] since multiple (lang-only and country-only) bundles may be chosen with differing rtl/ltr values.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.