[ofbiz-framework] branch release18.12 updated: Fixed: StringOutOfBounds Exception while checking available Languages (OFBIZ-10707)

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

[ofbiz-framework] branch release18.12 updated: Fixed: StringOutOfBounds Exception while checking available Languages (OFBIZ-10707)

mbrohl
This is an automated email from the ASF dual-hosted git repository.

mbrohl pushed a commit to branch release18.12
in repository https://gitbox.apache.org/repos/asf/ofbiz-framework.git


The following commit(s) were added to refs/heads/release18.12 by this push:
     new b56ff5f  Fixed: StringOutOfBounds Exception while checking available Languages (OFBIZ-10707)
b56ff5f is described below

commit b56ff5f65965efcba7097753478b5858c35a637b
Author: Benjamin Jugl <[hidden email]>
AuthorDate: Wed Feb 3 10:24:58 2021 +0100

    Fixed: StringOutOfBounds Exception while checking available Languages
    (OFBIZ-10707)
---
 themes/common-theme/template/includes/ListLocales.ftl | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/themes/common-theme/template/includes/ListLocales.ftl b/themes/common-theme/template/includes/ListLocales.ftl
index 647090f..691ef1f 100644
--- a/themes/common-theme/template/includes/ListLocales.ftl
+++ b/themes/common-theme/template/includes/ListLocales.ftl
@@ -31,7 +31,9 @@ under the License.
       <#assign altRow = !altRow>
       <#assign langAttr = availableLocale.toString()?replace("_", "-")>
       <#assign langDir = "ltr">
-      <#if "ar.iw"?contains(langAttr?substring(0, 2))>
+      <#if Static["java.awt.ComponentOrientation"].getOrientation(availableLocale).isLeftToRight()>
+        <#assign langDir = "ltr">
+      <#else>
         <#assign langDir = "rtl">
       </#if>
       <tr <#if altRow>class="alternate-row"</#if>>