[jira] [Commented] (WICKET-6943) There should be ability to check if current session's locale is RTL

2022-01-11 Thread ASF subversion and git services (Jira)


[ 
https://issues.apache.org/jira/browse/WICKET-6943?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17474299#comment-17474299
 ] 

ASF subversion and git services commented on WICKET-6943:
-

Commit 6e5480fe2f8aa14f82a5195b6c399014287ef1d0 in wicket's branch 
refs/heads/wicket-9.x from Maxim Solodovnik
[ https://gitbox.apache.org/repos/asf?p=wicket.git;h=6e5480f ]

[WICKET-6943] Session.isRtlLanguage made public


> There should be ability to check if current session's locale is RTL
> ---
>
> Key: WICKET-6943
> URL: https://issues.apache.org/jira/browse/WICKET-6943
> Project: Wicket
>  Issue Type: Improvement
>  Components: wicket-core
>Affects Versions: 9.7.0
>Reporter: Maxim Solodovnik
>Assignee: Maxim Solodovnik
>Priority: Major
> Fix For: 10.0.0, 9.8.0
>
>
> Currently there is no common way to determine if current session's locale is 
> RTL or not
> it would be useful to add common way to determine locale's direction



--
This message was sent by Atlassian Jira
(v8.20.1#820001)


[jira] [Commented] (WICKET-6943) There should be ability to check if current session's locale is RTL

2022-01-11 Thread ASF subversion and git services (Jira)


[ 
https://issues.apache.org/jira/browse/WICKET-6943?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17474297#comment-17474297
 ] 

ASF subversion and git services commented on WICKET-6943:
-

Commit 831dbc1c2eb03fca23f20c8066de78d27599f6e9 in wicket's branch 
refs/heads/master from Maxim Solodovnik
[ https://gitbox.apache.org/repos/asf?p=wicket.git;h=831dbc1 ]

[WICKET-6943] Session.isRtlLanguage made public


> There should be ability to check if current session's locale is RTL
> ---
>
> Key: WICKET-6943
> URL: https://issues.apache.org/jira/browse/WICKET-6943
> Project: Wicket
>  Issue Type: Improvement
>  Components: wicket-core
>Affects Versions: 9.7.0
>Reporter: Maxim Solodovnik
>Assignee: Maxim Solodovnik
>Priority: Major
> Fix For: 10.0.0, 9.8.0
>
>
> Currently there is no common way to determine if current session's locale is 
> RTL or not
> it would be useful to add common way to determine locale's direction



--
This message was sent by Atlassian Jira
(v8.20.1#820001)


[jira] [Commented] (WICKET-6943) There should be ability to check if current session's locale is RTL

2022-01-11 Thread Martin Tzvetanov Grigorov (Jira)


[ 
https://issues.apache.org/jira/browse/WICKET-6943?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17474273#comment-17474273
 ] 

Martin Tzvetanov Grigorov commented on WICKET-6943:
---

bq. shall I merge this one to 8.x?

Up to you!
You can skip 8.x for now and backport it later if a user asks for it.

> There should be ability to check if current session's locale is RTL
> ---
>
> Key: WICKET-6943
> URL: https://issues.apache.org/jira/browse/WICKET-6943
> Project: Wicket
>  Issue Type: Improvement
>  Components: wicket-core
>Affects Versions: 9.7.0
>Reporter: Maxim Solodovnik
>Assignee: Maxim Solodovnik
>Priority: Major
> Fix For: 10.0.0, 9.8.0
>
>
> Currently there is no common way to determine if current session's locale is 
> RTL or not
> it would be useful to add common way to determine locale's direction



--
This message was sent by Atlassian Jira
(v8.20.1#820001)


[jira] [Commented] (WICKET-6943) There should be ability to check if current session's locale is RTL

2022-01-11 Thread ASF GitHub Bot (Jira)


[ 
https://issues.apache.org/jira/browse/WICKET-6943?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17474272#comment-17474272
 ] 

ASF GitHub Bot commented on WICKET-6943:


martin-g commented on a change in pull request #488:
URL: https://github.com/apache/wicket/pull/488#discussion_r782736474



##
File path: wicket-core/src/main/java/org/apache/wicket/Session.java
##
@@ -184,6 +195,36 @@ public static Session get()
}
}
 
+   /**
+* Check if a BCP 47 / III language code indicates an RTL language, i.e.
+* either: - a language code explicitly specifying one of the 
right-to-left
+* scripts, e.g. "az-Arab", or
+* 
+* - a language code specifying one of the languages normally written 
in a
+* right-to-left script, e.g. "fa" (Farsi), except ones explicitly
+* specifying Latin or Cyrillic script (which are the usual LTR
+* alternatives).
+* 
+* http://www.unicode.org/iso15924/iso15924-num.html;>
+* The list of right-to-left scripts appears in the 100-199 range 
in, of which Arabic and
+* Hebrew are by far the most widely used. We also recognize Thaana, 
N'Ko,
+* and Tifinagh, which also have significant modern usage. The rest 
(Syriac,
+* Samaritan, Mandaic, etc.) seem to have extremely limited or no modern
+* usage and are not recognized. The languages usually written in a
+* right-to-left script are taken as those with 
+* http://www.iana.org/assignments/language-subtag-registry;>Suppress-Script:
+* Hebr|Arab|Thaa|Nkoo|Tfng, as well as
+* Sindhi (sd) and Uyghur (ug). The presence of other subtags of the
+* language code, e.g. regions like EG (Egypt), is ignored.
+*
+* @param locale - locale to check
+* @return true in case passed locale is right-to-left
+*/
+   public static boolean isRtlLanguage(final Locale locale) {

Review comment:
   OK!




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscr...@wicket.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


> There should be ability to check if current session's locale is RTL
> ---
>
> Key: WICKET-6943
> URL: https://issues.apache.org/jira/browse/WICKET-6943
> Project: Wicket
>  Issue Type: Improvement
>  Components: wicket-core
>Affects Versions: 9.7.0
>Reporter: Maxim Solodovnik
>Assignee: Maxim Solodovnik
>Priority: Major
> Fix For: 10.0.0, 9.8.0
>
>
> Currently there is no common way to determine if current session's locale is 
> RTL or not
> it would be useful to add common way to determine locale's direction



--
This message was sent by Atlassian Jira
(v8.20.1#820001)


[jira] [Commented] (WICKET-6943) There should be ability to check if current session's locale is RTL

2022-01-11 Thread ASF GitHub Bot (Jira)


[ 
https://issues.apache.org/jira/browse/WICKET-6943?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17474248#comment-17474248
 ] 

ASF GitHub Bot commented on WICKET-6943:


solomax commented on a change in pull request #488:
URL: https://github.com/apache/wicket/pull/488#discussion_r782714873



##
File path: wicket-core/src/main/java/org/apache/wicket/Session.java
##
@@ -184,6 +195,36 @@ public static Session get()
}
}
 
+   /**
+* Check if a BCP 47 / III language code indicates an RTL language, i.e.
+* either: - a language code explicitly specifying one of the 
right-to-left
+* scripts, e.g. "az-Arab", or
+* 
+* - a language code specifying one of the languages normally written 
in a
+* right-to-left script, e.g. "fa" (Farsi), except ones explicitly
+* specifying Latin or Cyrillic script (which are the usual LTR
+* alternatives).
+* 
+* http://www.unicode.org/iso15924/iso15924-num.html;>
+* The list of right-to-left scripts appears in the 100-199 range 
in, of which Arabic and
+* Hebrew are by far the most widely used. We also recognize Thaana, 
N'Ko,
+* and Tifinagh, which also have significant modern usage. The rest 
(Syriac,
+* Samaritan, Mandaic, etc.) seem to have extremely limited or no modern
+* usage and are not recognized. The languages usually written in a
+* right-to-left script are taken as those with 
+* http://www.iana.org/assignments/language-subtag-registry;>Suppress-Script:
+* Hebr|Arab|Thaa|Nkoo|Tfng, as well as
+* Sindhi (sd) and Uyghur (ug). The presence of other subtags of the
+* language code, e.g. regions like EG (Egypt), is ignored.
+*
+* @param locale - locale to check
+* @return true in case passed locale is right-to-left
+*/
+   public static boolean isRtlLanguage(final Locale locale) {

Review comment:
   @martin-g can this method be made public? We are using it for utility 
purposes :)
   Another possible use: `in-memory` rendering using different locale




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscr...@wicket.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


> There should be ability to check if current session's locale is RTL
> ---
>
> Key: WICKET-6943
> URL: https://issues.apache.org/jira/browse/WICKET-6943
> Project: Wicket
>  Issue Type: Improvement
>  Components: wicket-core
>Affects Versions: 9.7.0
>Reporter: Maxim Solodovnik
>Assignee: Maxim Solodovnik
>Priority: Major
> Fix For: 10.0.0, 9.8.0
>
>
> Currently there is no common way to determine if current session's locale is 
> RTL or not
> it would be useful to add common way to determine locale's direction



--
This message was sent by Atlassian Jira
(v8.20.1#820001)


[jira] [Commented] (WICKET-6943) There should be ability to check if current session's locale is RTL

2022-01-11 Thread ASF GitHub Bot (Jira)


[ 
https://issues.apache.org/jira/browse/WICKET-6943?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17474246#comment-17474246
 ] 

ASF GitHub Bot commented on WICKET-6943:


solomax commented on a change in pull request #488:
URL: https://github.com/apache/wicket/pull/488#discussion_r782714873



##
File path: wicket-core/src/main/java/org/apache/wicket/Session.java
##
@@ -184,6 +195,36 @@ public static Session get()
}
}
 
+   /**
+* Check if a BCP 47 / III language code indicates an RTL language, i.e.
+* either: - a language code explicitly specifying one of the 
right-to-left
+* scripts, e.g. "az-Arab", or
+* 
+* - a language code specifying one of the languages normally written 
in a
+* right-to-left script, e.g. "fa" (Farsi), except ones explicitly
+* specifying Latin or Cyrillic script (which are the usual LTR
+* alternatives).
+* 
+* http://www.unicode.org/iso15924/iso15924-num.html;>
+* The list of right-to-left scripts appears in the 100-199 range 
in, of which Arabic and
+* Hebrew are by far the most widely used. We also recognize Thaana, 
N'Ko,
+* and Tifinagh, which also have significant modern usage. The rest 
(Syriac,
+* Samaritan, Mandaic, etc.) seem to have extremely limited or no modern
+* usage and are not recognized. The languages usually written in a
+* right-to-left script are taken as those with 
+* http://www.iana.org/assignments/language-subtag-registry;>Suppress-Script:
+* Hebr|Arab|Thaa|Nkoo|Tfng, as well as
+* Sindhi (sd) and Uyghur (ug). The presence of other subtags of the
+* language code, e.g. regions like EG (Egypt), is ignored.
+*
+* @param locale - locale to check
+* @return true in case passed locale is right-to-left
+*/
+   public static boolean isRtlLanguage(final Locale locale) {

Review comment:
   @martin-g can this method be made public? We are using it for utility 
purposes :)




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscr...@wicket.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


> There should be ability to check if current session's locale is RTL
> ---
>
> Key: WICKET-6943
> URL: https://issues.apache.org/jira/browse/WICKET-6943
> Project: Wicket
>  Issue Type: Improvement
>  Components: wicket-core
>Affects Versions: 9.7.0
>Reporter: Maxim Solodovnik
>Assignee: Maxim Solodovnik
>Priority: Major
> Fix For: 10.0.0, 9.8.0
>
>
> Currently there is no common way to determine if current session's locale is 
> RTL or not
> it would be useful to add common way to determine locale's direction



--
This message was sent by Atlassian Jira
(v8.20.1#820001)


[jira] [Commented] (WICKET-6943) There should be ability to check if current session's locale is RTL

2022-01-11 Thread ASF subversion and git services (Jira)


[ 
https://issues.apache.org/jira/browse/WICKET-6943?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17473266#comment-17473266
 ] 

ASF subversion and git services commented on WICKET-6943:
-

Commit bede789c2d1f1cacb408bfcc7c846cb0d2134c52 in wicket's branch 
refs/heads/master from Maxim Solodovnik
[ https://gitbox.apache.org/repos/asf?p=wicket.git;h=bede789 ]

[WICKET-6943] Save info about Locale direction LTR/RTL to Session metadata 
(#488)

[WICKET-6943] Save info about language direction of session locale (RTL/LTR)

> There should be ability to check if current session's locale is RTL
> ---
>
> Key: WICKET-6943
> URL: https://issues.apache.org/jira/browse/WICKET-6943
> Project: Wicket
>  Issue Type: Improvement
>  Components: wicket-core
>Affects Versions: 9.7.0
>Reporter: Maxim Solodovnik
>Assignee: Maxim Solodovnik
>Priority: Major
> Fix For: 10.0.0, 9.8.0
>
>
> Currently there is no common way to determine if current session's locale is 
> RTL or not
> it would be useful to add common way to determine locale's direction



--
This message was sent by Atlassian Jira
(v8.20.1#820001)


[jira] [Commented] (WICKET-6943) There should be ability to check if current session's locale is RTL

2022-01-11 Thread ASF subversion and git services (Jira)


[ 
https://issues.apache.org/jira/browse/WICKET-6943?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17473265#comment-17473265
 ] 

ASF subversion and git services commented on WICKET-6943:
-

Commit 883f56d3d9dda6e2932942c361f22d388fe8de96 in wicket's branch 
refs/heads/wicket-9.x from Maxim Solodovnik
[ https://gitbox.apache.org/repos/asf?p=wicket.git;h=883f56d ]

[WICKET-6943] Save info about Locale direction LTR/RTL to Session metadata 
(#488)

[WICKET-6943] Save info about language direction of session locale (RTL/LTR)

> There should be ability to check if current session's locale is RTL
> ---
>
> Key: WICKET-6943
> URL: https://issues.apache.org/jira/browse/WICKET-6943
> Project: Wicket
>  Issue Type: Improvement
>  Components: wicket-core
>Affects Versions: 9.7.0
>Reporter: Maxim Solodovnik
>Assignee: Maxim Solodovnik
>Priority: Major
> Fix For: 10.0.0, 9.8.0
>
>
> Currently there is no common way to determine if current session's locale is 
> RTL or not
> it would be useful to add common way to determine locale's direction



--
This message was sent by Atlassian Jira
(v8.20.1#820001)


[jira] [Commented] (WICKET-6943) There should be ability to check if current session's locale is RTL

2022-01-11 Thread Maxim Solodovnik (Jira)


[ 
https://issues.apache.org/jira/browse/WICKET-6943?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17473258#comment-17473258
 ] 

Maxim Solodovnik commented on WICKET-6943:
--

[~mgrigorov] shall I merge this one to 8.x?

> There should be ability to check if current session's locale is RTL
> ---
>
> Key: WICKET-6943
> URL: https://issues.apache.org/jira/browse/WICKET-6943
> Project: Wicket
>  Issue Type: Improvement
>  Components: wicket-core
>Affects Versions: 9.7.0
>Reporter: Maxim Solodovnik
>Assignee: Maxim Solodovnik
>Priority: Major
> Fix For: 10.0.0, 9.8.0
>
>
> Currently there is no common way to determine if current session's locale is 
> RTL or not
> it would be useful to add common way to determine locale's direction



--
This message was sent by Atlassian Jira
(v8.20.1#820001)


[jira] [Commented] (WICKET-6943) There should be ability to check if current session's locale is RTL

2022-01-11 Thread ASF GitHub Bot (Jira)


[ 
https://issues.apache.org/jira/browse/WICKET-6943?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17473254#comment-17473254
 ] 

ASF GitHub Bot commented on WICKET-6943:


solomax merged pull request #488:
URL: https://github.com/apache/wicket/pull/488


   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscr...@wicket.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


> There should be ability to check if current session's locale is RTL
> ---
>
> Key: WICKET-6943
> URL: https://issues.apache.org/jira/browse/WICKET-6943
> Project: Wicket
>  Issue Type: Improvement
>  Components: wicket-core
>Affects Versions: 9.7.0
>Reporter: Maxim Solodovnik
>Assignee: Maxim Solodovnik
>Priority: Major
> Fix For: 9.8.0
>
>
> Currently there is no common way to determine if current session's locale is 
> RTL or not
> it would be useful to add common way to determine locale's direction



--
This message was sent by Atlassian Jira
(v8.20.1#820001)


[jira] [Commented] (WICKET-6943) There should be ability to check if current session's locale is RTL

2022-01-10 Thread ASF subversion and git services (Jira)


[ 
https://issues.apache.org/jira/browse/WICKET-6943?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17472505#comment-17472505
 ] 

ASF subversion and git services commented on WICKET-6943:
-

Commit 1da7b399dfb58e21147aef30bb57d66a15346b2a in wicket's branch 
refs/heads/session-locale-rtl from Maxim Solodovnik
[ https://gitbox.apache.org/repos/asf?p=wicket.git;h=1da7b39 ]

[WICKET-6943] wordings in javadoc


> There should be ability to check if current session's locale is RTL
> ---
>
> Key: WICKET-6943
> URL: https://issues.apache.org/jira/browse/WICKET-6943
> Project: Wicket
>  Issue Type: Improvement
>  Components: wicket-core
>Affects Versions: 9.7.0
>Reporter: Maxim Solodovnik
>Assignee: Maxim Solodovnik
>Priority: Major
> Fix For: 9.8.0
>
>
> Currently there is no common way to determine if current session's locale is 
> RTL or not
> it would be useful to add common way to determine locale's direction



--
This message was sent by Atlassian Jira
(v8.20.1#820001)


[jira] [Commented] (WICKET-6943) There should be ability to check if current session's locale is RTL

2022-01-10 Thread ASF GitHub Bot (Jira)


[ 
https://issues.apache.org/jira/browse/WICKET-6943?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17472478#comment-17472478
 ] 

ASF GitHub Bot commented on WICKET-6943:


solomax commented on a change in pull request #488:
URL: https://github.com/apache/wicket/pull/488#discussion_r781783553



##
File path: wicket-core/src/main/java/org/apache/wicket/Session.java
##
@@ -130,6 +132,15 @@
/** Name of session attribute under which this session is stored */
public static final String SESSION_ATTRIBUTE_NAME = "session";
 
+   /**
+* taken from BidiUtils

Review comment:
   done




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscr...@wicket.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


> There should be ability to check if current session's locale is RTL
> ---
>
> Key: WICKET-6943
> URL: https://issues.apache.org/jira/browse/WICKET-6943
> Project: Wicket
>  Issue Type: Improvement
>  Components: wicket-core
>Affects Versions: 9.7.0
>Reporter: Maxim Solodovnik
>Assignee: Maxim Solodovnik
>Priority: Major
> Fix For: 9.8.0
>
>
> Currently there is no common way to determine if current session's locale is 
> RTL or not
> it would be useful to add common way to determine locale's direction



--
This message was sent by Atlassian Jira
(v8.20.1#820001)


[jira] [Commented] (WICKET-6943) There should be ability to check if current session's locale is RTL

2022-01-10 Thread ASF GitHub Bot (Jira)


[ 
https://issues.apache.org/jira/browse/WICKET-6943?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17472479#comment-17472479
 ] 

ASF GitHub Bot commented on WICKET-6943:


solomax commented on a change in pull request #488:
URL: https://github.com/apache/wicket/pull/488#discussion_r781783625



##
File path: wicket-core/src/main/java/org/apache/wicket/Session.java
##
@@ -184,6 +195,36 @@ public static Session get()
}
}
 
+   /**
+* Check if a BCP 47 / III language code indicates an RTL language, i.e.
+* either: - a language code explicitly specifying one of the 
right-to-left
+* scripts, e.g. "az-Arab", or
+* 
+* - a language code specifying one of the languages normally written 
in a
+* right-to-left script, e.g. "fa" (Farsi), except ones explicitly
+* specifying Latin or Cyrillic script (which are the usual LTR
+* alternatives).
+* 
+* http://www.unicode.org/iso15924/iso15924-num.html;>
+* The list of right-to-left scripts appears in the 100-199 range 
in, of which Arabic and
+* Hebrew are by far the most widely used. We also recognize Thaana, 
N'Ko,
+* and Tifinagh, which also have significant modern usage. The rest 
(Syriac,
+* Samaritan, Mandaic, etc.) seem to have extremely limited or no modern
+* usage and are not recognized. The languages usually written in a
+* right-to-left script are taken as those with 
+* http://www.iana.org/assignments/language-subtag-registry;>Suppress-Script:
+* Hebr|Arab|Thaa|Nkoo|Tfng, as well as
+* Sindhi (sd) and Uyghur (ug). The presence of other subtags of the
+* language code, e.g. regions like EG (Egypt), is ignored.
+*
+* @param locale - locale to check
+* @return true in case passed locale is right-to-left
+*/
+   public static boolean isRtlLanguage(final Locale locale) {

Review comment:
   method made private




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscr...@wicket.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


> There should be ability to check if current session's locale is RTL
> ---
>
> Key: WICKET-6943
> URL: https://issues.apache.org/jira/browse/WICKET-6943
> Project: Wicket
>  Issue Type: Improvement
>  Components: wicket-core
>Affects Versions: 9.7.0
>Reporter: Maxim Solodovnik
>Assignee: Maxim Solodovnik
>Priority: Major
> Fix For: 9.8.0
>
>
> Currently there is no common way to determine if current session's locale is 
> RTL or not
> it would be useful to add common way to determine locale's direction



--
This message was sent by Atlassian Jira
(v8.20.1#820001)


[jira] [Commented] (WICKET-6943) There should be ability to check if current session's locale is RTL

2022-01-10 Thread ASF subversion and git services (Jira)


[ 
https://issues.apache.org/jira/browse/WICKET-6943?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17472463#comment-17472463
 ] 

ASF subversion and git services commented on WICKET-6943:
-

Commit 6c3ed7c055a83d59d6739badac0f6e174f6bcfd4 in wicket's branch 
refs/heads/session-locale-rtl from Maxim Solodovnik
[ https://gitbox.apache.org/repos/asf?p=wicket.git;h=6c3ed7c ]

[WICKET-6943] tests at CI should work


> There should be ability to check if current session's locale is RTL
> ---
>
> Key: WICKET-6943
> URL: https://issues.apache.org/jira/browse/WICKET-6943
> Project: Wicket
>  Issue Type: Improvement
>  Components: wicket-core
>Affects Versions: 9.7.0
>Reporter: Maxim Solodovnik
>Assignee: Maxim Solodovnik
>Priority: Major
> Fix For: 9.8.0
>
>
> Currently there is no common way to determine if current session's locale is 
> RTL or not
> it would be useful to add common way to determine locale's direction



--
This message was sent by Atlassian Jira
(v8.20.1#820001)


[jira] [Commented] (WICKET-6943) There should be ability to check if current session's locale is RTL

2022-01-10 Thread ASF subversion and git services (Jira)


[ 
https://issues.apache.org/jira/browse/WICKET-6943?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17472061#comment-17472061
 ] 

ASF subversion and git services commented on WICKET-6943:
-

Commit 33b031b25fd498836ec6817d6d6a9bdcb46fc2ef in wicket's branch 
refs/heads/session-locale-rtl from Maxim Solodovnik
[ https://gitbox.apache.org/repos/asf?p=wicket.git;h=33b031b ]

[WICKET-6943] missing case and tests


> There should be ability to check if current session's locale is RTL
> ---
>
> Key: WICKET-6943
> URL: https://issues.apache.org/jira/browse/WICKET-6943
> Project: Wicket
>  Issue Type: Improvement
>  Components: wicket-core
>Affects Versions: 9.7.0
>Reporter: Maxim Solodovnik
>Assignee: Maxim Solodovnik
>Priority: Major
> Fix For: 9.8.0
>
>
> Currently there is no common way to determine if current session's locale is 
> RTL or not
> it would be useful to add common way to determine locale's direction



--
This message was sent by Atlassian Jira
(v8.20.1#820001)


[jira] [Commented] (WICKET-6943) There should be ability to check if current session's locale is RTL

2022-01-10 Thread ASF subversion and git services (Jira)


[ 
https://issues.apache.org/jira/browse/WICKET-6943?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17471792#comment-17471792
 ] 

ASF subversion and git services commented on WICKET-6943:
-

Commit a1b128a46a168ece948a5a3da93cabf49b5386ed in wicket's branch 
refs/heads/session-locale-rtl from Maxim Solodovnik
[ https://gitbox.apache.org/repos/asf?p=wicket.git;h=a1b128a ]

[WICKET-6943] comments are addressed


> There should be ability to check if current session's locale is RTL
> ---
>
> Key: WICKET-6943
> URL: https://issues.apache.org/jira/browse/WICKET-6943
> Project: Wicket
>  Issue Type: Improvement
>  Components: wicket-core
>Affects Versions: 9.7.0
>Reporter: Maxim Solodovnik
>Assignee: Maxim Solodovnik
>Priority: Major
> Fix For: 9.8.0
>
>
> Currently there is no common way to determine if current session's locale is 
> RTL or not
> it would be useful to add common way to determine locale's direction



--
This message was sent by Atlassian Jira
(v8.20.1#820001)


[jira] [Commented] (WICKET-6943) There should be ability to check if current session's locale is RTL

2022-01-10 Thread ASF GitHub Bot (Jira)


[ 
https://issues.apache.org/jira/browse/WICKET-6943?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17471783#comment-17471783
 ] 

ASF GitHub Bot commented on WICKET-6943:


solomax commented on a change in pull request #488:
URL: https://github.com/apache/wicket/pull/488#discussion_r781004738



##
File path: wicket-core/src/main/java/org/apache/wicket/Session.java
##
@@ -130,6 +132,15 @@
/** Name of session attribute under which this session is stored */
public static final String SESSION_ATTRIBUTE_NAME = "session";
 
+   /**
+* taken from BidiUtils

Review comment:
   I'd love to, but the sources seems to be unavailable :(
   
   This SO article 
https://stackoverflow.com/questions/4192382/is-there-any-way-to-detect-an-rtl-language-in-java
   has link to googlecode which is dead :(
   
   I'll change the wording to be `Google Closure Templates BidiUtils` :)




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscr...@wicket.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


> There should be ability to check if current session's locale is RTL
> ---
>
> Key: WICKET-6943
> URL: https://issues.apache.org/jira/browse/WICKET-6943
> Project: Wicket
>  Issue Type: Improvement
>  Components: wicket-core
>Affects Versions: 9.7.0
>Reporter: Maxim Solodovnik
>Assignee: Maxim Solodovnik
>Priority: Major
> Fix For: 9.8.0
>
>
> Currently there is no common way to determine if current session's locale is 
> RTL or not
> it would be useful to add common way to determine locale's direction



--
This message was sent by Atlassian Jira
(v8.20.1#820001)


[jira] [Commented] (WICKET-6943) There should be ability to check if current session's locale is RTL

2022-01-10 Thread ASF GitHub Bot (Jira)


[ 
https://issues.apache.org/jira/browse/WICKET-6943?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17471771#comment-17471771
 ] 

ASF GitHub Bot commented on WICKET-6943:


martin-g commented on pull request #488:
URL: https://github.com/apache/wicket/pull/488#issuecomment-1008655176


   Also, basic unit tests are still missing.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscr...@wicket.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


> There should be ability to check if current session's locale is RTL
> ---
>
> Key: WICKET-6943
> URL: https://issues.apache.org/jira/browse/WICKET-6943
> Project: Wicket
>  Issue Type: Improvement
>  Components: wicket-core
>Affects Versions: 9.7.0
>Reporter: Maxim Solodovnik
>Assignee: Maxim Solodovnik
>Priority: Major
> Fix For: 9.8.0
>
>
> Currently there is no common way to determine if current session's locale is 
> RTL or not
> it would be useful to add common way to determine locale's direction



--
This message was sent by Atlassian Jira
(v8.20.1#820001)


[jira] [Commented] (WICKET-6943) There should be ability to check if current session's locale is RTL

2022-01-10 Thread ASF GitHub Bot (Jira)


[ 
https://issues.apache.org/jira/browse/WICKET-6943?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17471770#comment-17471770
 ] 

ASF GitHub Bot commented on WICKET-6943:


martin-g commented on a change in pull request #488:
URL: https://github.com/apache/wicket/pull/488#discussion_r780984975



##
File path: wicket-core/src/main/java/org/apache/wicket/Session.java
##
@@ -130,6 +132,15 @@
/** Name of session attribute under which this session is stored */
public static final String SESSION_ATTRIBUTE_NAME = "session";
 
+   /**
+* taken from BidiUtils

Review comment:
   Maybe expand with "Apache Commons XYZ BidiUtils" or even a link to the 
Git repository ?

##
File path: wicket-core/src/main/java/org/apache/wicket/Session.java
##
@@ -184,6 +195,36 @@ public static Session get()
}
}
 
+   /**
+* Check if a BCP 47 / III language code indicates an RTL language, i.e.
+* either: - a language code explicitly specifying one of the 
right-to-left
+* scripts, e.g. "az-Arab", or
+* 
+* - a language code specifying one of the languages normally written 
in a
+* right-to-left script, e.g. "fa" (Farsi), except ones explicitly
+* specifying Latin or Cyrillic script (which are the usual LTR
+* alternatives).
+* 
+* http://www.unicode.org/iso15924/iso15924-num.html;>
+* The list of right-to-left scripts appears in the 100-199 range 
in, of which Arabic and
+* Hebrew are by far the most widely used. We also recognize Thaana, 
N'Ko,
+* and Tifinagh, which also have significant modern usage. The rest 
(Syriac,
+* Samaritan, Mandaic, etc.) seem to have extremely limited or no modern
+* usage and are not recognized. The languages usually written in a
+* right-to-left script are taken as those with 
+* http://www.iana.org/assignments/language-subtag-registry;>Suppress-Script:
+* Hebr|Arab|Thaa|Nkoo|Tfng, as well as
+* Sindhi (sd) and Uyghur (ug). The presence of other subtags of the
+* language code, e.g. regions like EG (Egypt), is ignored.
+*
+* @param locale - locale to check
+* @return true in case passed locale is right-to-left
+*/
+   public static boolean isRtlLanguage(final Locale locale) {

Review comment:
   Any reason this method to be `public` ?
   IMO we should start with `private` until there is a good reason to be part 
of the API




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscr...@wicket.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


> There should be ability to check if current session's locale is RTL
> ---
>
> Key: WICKET-6943
> URL: https://issues.apache.org/jira/browse/WICKET-6943
> Project: Wicket
>  Issue Type: Improvement
>  Components: wicket-core
>Affects Versions: 9.7.0
>Reporter: Maxim Solodovnik
>Assignee: Maxim Solodovnik
>Priority: Major
> Fix For: 9.8.0
>
>
> Currently there is no common way to determine if current session's locale is 
> RTL or not
> it would be useful to add common way to determine locale's direction



--
This message was sent by Atlassian Jira
(v8.20.1#820001)


[jira] [Commented] (WICKET-6943) There should be ability to check if current session's locale is RTL

2022-01-10 Thread ASF GitHub Bot (Jira)


[ 
https://issues.apache.org/jira/browse/WICKET-6943?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17471757#comment-17471757
 ] 

ASF GitHub Bot commented on WICKET-6943:


solomax commented on a change in pull request #488:
URL: https://github.com/apache/wicket/pull/488#discussion_r780968425



##
File path: 
wicket-core/src/main/java/org/apache/wicket/core/util/lang/LocaleUtils.java
##
@@ -0,0 +1,67 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *  http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.wicket.core.util.lang;
+
+import java.util.Locale;
+import java.util.regex.Pattern;
+
+import org.apache.wicket.util.lang.Args;
+
+public class LocaleUtils {

Review comment:
   removed

##
File path: 
wicket-core/src/main/java/org/apache/wicket/core/util/lang/LocaleUtils.java
##
@@ -0,0 +1,67 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *  http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.wicket.core.util.lang;
+
+import java.util.Locale;
+import java.util.regex.Pattern;
+
+import org.apache.wicket.util.lang.Args;
+
+public class LocaleUtils {
+   /**
+* taken from BidiUtils
+*
+* A regular expression for matching right-to-left language codes. See
+* {@link #isRtlLanguage} for the design.
+*/
+   private static final Pattern RtlLocalesRe = 
Pattern.compile("^(ar|dv|he|iw|fa|nqo|ps|sd|ug|ur|yi|.*[-_](Arab|Hebr|Thaa|Nkoo|Tfng))"

Review comment:
   done




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscr...@wicket.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


> There should be ability to check if current session's locale is RTL
> ---
>
> Key: WICKET-6943
> URL: https://issues.apache.org/jira/browse/WICKET-6943
> Project: Wicket
>  Issue Type: Improvement
>  Components: wicket-core
>Affects Versions: 9.7.0
>Reporter: Maxim Solodovnik
>Assignee: Maxim Solodovnik
>Priority: Major
> Fix For: 9.8.0
>
>
> Currently there is no common way to determine if current session's locale is 
> RTL or not
> it would be useful to add common way to determine locale's direction



--
This message was sent by Atlassian Jira
(v8.20.1#820001)


[jira] [Commented] (WICKET-6943) There should be ability to check if current session's locale is RTL

2022-01-09 Thread ASF subversion and git services (Jira)


[ 
https://issues.apache.org/jira/browse/WICKET-6943?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17471666#comment-17471666
 ] 

ASF subversion and git services commented on WICKET-6943:
-

Commit 4cb4bd470e2f86e4d9bb5ade8856f37d5400e8e7 in wicket's branch 
refs/heads/session-locale-rtl from Maxim Solodovnik
[ https://gitbox.apache.org/repos/asf?p=wicket.git;h=4cb4bd4 ]

[WICKET-6943] build should be fixed


> There should be ability to check if current session's locale is RTL
> ---
>
> Key: WICKET-6943
> URL: https://issues.apache.org/jira/browse/WICKET-6943
> Project: Wicket
>  Issue Type: Improvement
>  Components: wicket-core
>Affects Versions: 9.7.0
>Reporter: Maxim Solodovnik
>Assignee: Maxim Solodovnik
>Priority: Major
> Fix For: 9.8.0
>
>
> Currently there is no common way to determine if current session's locale is 
> RTL or not
> it would be useful to add common way to determine locale's direction



--
This message was sent by Atlassian Jira
(v8.20.1#820001)


[jira] [Commented] (WICKET-6943) There should be ability to check if current session's locale is RTL

2022-01-09 Thread ASF subversion and git services (Jira)


[ 
https://issues.apache.org/jira/browse/WICKET-6943?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17471661#comment-17471661
 ] 

ASF subversion and git services commented on WICKET-6943:
-

Commit 1dae6392d42379bd66f92a526df67dbfddc03830 in wicket's branch 
refs/heads/session-locale-rtl from Maxim Solodovnik
[ https://gitbox.apache.org/repos/asf?p=wicket.git;h=1dae639 ]

[WICKET-6943] comments are addressed


> There should be ability to check if current session's locale is RTL
> ---
>
> Key: WICKET-6943
> URL: https://issues.apache.org/jira/browse/WICKET-6943
> Project: Wicket
>  Issue Type: Improvement
>  Components: wicket-core
>Affects Versions: 9.7.0
>Reporter: Maxim Solodovnik
>Assignee: Maxim Solodovnik
>Priority: Major
> Fix For: 9.8.0
>
>
> Currently there is no common way to determine if current session's locale is 
> RTL or not
> it would be useful to add common way to determine locale's direction



--
This message was sent by Atlassian Jira
(v8.20.1#820001)