[jira] [Updated] (WW-4677) I18N Interceptor automatically validates locales

2016-09-16 Thread Lukasz Lenart (JIRA)

 [ 
https://issues.apache.org/jira/browse/WW-4677?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Lukasz Lenart updated WW-4677:
--
Summary: I18N Interceptor automatically validates locales  (was: I18N 
Interceptor Automatically validates locales)

> I18N Interceptor automatically validates locales
> 
>
> Key: WW-4677
> URL: https://issues.apache.org/jira/browse/WW-4677
> Project: Struts 2
>  Issue Type: Improvement
>  Components: Core Interceptors
>Affects Versions: 2.5
> Environment: 2.5.1 running on Java 8, RHEL Linux 6/7 
>Reporter: Zoran Avtarovski
> Fix For: 2.5.3
>
>
> There is an annoying issue with the I18N Interceptor, which now validates 
> locales against the list of default available locales in this bit of code:
> {code:java}
> if (locale != null && 
> Arrays.asList(Locale.getAvailableLocales()).contains(locale)) {
> locale = Locale.getDefault();
> }
> {code}
> The problem is I have a web app for refugees and not all the languages are in 
> the available locales array. This must be relatively new as it worked in the 
> old version 2.x ish.
> Ideally it would be great if we could add a parameter (or constant) to 
> bi-pass the validation.
> For example a tag in the struts.xml file:
> {code:xml}
> 
>   
>  false
>   
> 
> {code}
> and then access it in the interceptor to override default behaviour.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Updated] (WW-4677) I18N Interceptor Automatically validates locales

2016-08-17 Thread Lukasz Lenart (JIRA)

 [ 
https://issues.apache.org/jira/browse/WW-4677?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Lukasz Lenart updated WW-4677:
--
Description: 
There is an annoying issue with the I18N Interceptor, which now validates 
locales against the list of default available locales in this bit of code:

{code:java}
if (locale != null && 
Arrays.asList(Locale.getAvailableLocales()).contains(locale)) {
locale = Locale.getDefault();
}
{code}

The problem is I have a web app for refugees and not all the languages are in 
the available locales array. This must be relatively new as it worked in the 
old version 2.x ish.

Ideally it would be great if we could add a parameter (or constant) to bi-pass 
the validation.

For example a tag in the struts.xml file:

{code:xml}

  
 false
  

{code}

and then access it in the interceptor to override default behaviour.



  was:
There is an annoying issue with the I18N Interceptor, which now validates 
locales against the list of default available locales in this bit of code:

if (locale != null && 
Arrays.asList(Locale.getAvailableLocales()).contains(locale)) {
locale = Locale.getDefault();
}

The problem is I have a web app for refugees and not all the languages are in 
the available locales array. This must be relatively new as it worked in the 
old version 2.x ish.

Ideally it would be great if we could add a parameter (or constant) to bi-pass 
the validation.

For example a tag in the struts.xml file:

  
 false
  


and then access it in the interceptor to override default behaviour.




> I18N Interceptor Automatically validates locales
> 
>
> Key: WW-4677
> URL: https://issues.apache.org/jira/browse/WW-4677
> Project: Struts 2
>  Issue Type: Improvement
>  Components: Core Interceptors
>Affects Versions: 2.5
> Environment: 2.5.1 running on Java 8, RHEL Linux 6/7 
>Reporter: Zoran Avtarovski
> Fix For: 2.5.3
>
>
> There is an annoying issue with the I18N Interceptor, which now validates 
> locales against the list of default available locales in this bit of code:
> {code:java}
> if (locale != null && 
> Arrays.asList(Locale.getAvailableLocales()).contains(locale)) {
> locale = Locale.getDefault();
> }
> {code}
> The problem is I have a web app for refugees and not all the languages are in 
> the available locales array. This must be relatively new as it worked in the 
> old version 2.x ish.
> Ideally it would be great if we could add a parameter (or constant) to 
> bi-pass the validation.
> For example a tag in the struts.xml file:
> {code:xml}
> 
>   
>  false
>   
> 
> {code}
> and then access it in the interceptor to override default behaviour.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Updated] (WW-4677) I18N Interceptor Automatically validates locales

2016-08-17 Thread Lukasz Lenart (JIRA)

 [ 
https://issues.apache.org/jira/browse/WW-4677?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Lukasz Lenart updated WW-4677:
--
Fix Version/s: (was: 2.5.x)
   2.5.3

> I18N Interceptor Automatically validates locales
> 
>
> Key: WW-4677
> URL: https://issues.apache.org/jira/browse/WW-4677
> Project: Struts 2
>  Issue Type: Improvement
>  Components: Core Interceptors
>Affects Versions: 2.5
> Environment: 2.5.1 running on Java 8, RHEL Linux 6/7 
>Reporter: Zoran Avtarovski
> Fix For: 2.5.3
>
>
> There is an annoying issue with the I18N Interceptor, which now validates 
> locales against the list of default available locales in this bit of code:
> if (locale != null && 
> Arrays.asList(Locale.getAvailableLocales()).contains(locale)) {
> locale = Locale.getDefault();
> }
> The problem is I have a web app for refugees and not all the languages are in 
> the available locales array. This must be relatively new as it worked in the 
> old version 2.x ish.
> Ideally it would be great if we could add a parameter (or constant) to 
> bi-pass the validation.
> For example a tag in the struts.xml file:
> 
>   
>  false
>   
> 
> and then access it in the interceptor to override default behaviour.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)