[ https://issues.apache.org/jira/browse/WW-4677?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15502672#comment-15502672 ]
Hudson commented on WW-4677: ---------------------------- SUCCESS: Integrated in Jenkins build Struts-JDK7-master #527 (See [https://builds.apache.org/job/Struts-JDK7-master/527/]) WW-4677 Exyends LocaleProvider to be used to validate Locale (lukaszlenart: rev ea92e95461386f1ddfda37bb09ec170b8e306ae7) * (edit) core/src/test/java/org/apache/struts2/views/jsp/AbstractTagTest.java * (edit) core/src/main/java/com/opensymphony/xwork2/validator/DelegatingValidatorContext.java * (edit) core/src/test/java/com/opensymphony/xwork2/validator/StringLengthFieldValidatorTest.java * (edit) core/src/main/java/com/opensymphony/xwork2/LocaleProvider.java * (edit) core/src/test/java/com/opensymphony/xwork2/ActionSupportTest.java * (edit) core/src/main/java/org/apache/struts2/interceptor/I18nInterceptor.java * (edit) core/src/test/java/com/opensymphony/xwork2/validator/VisitorFieldValidatorTest.java * (edit) core/src/test/java/com/opensymphony/xwork2/CompositeTextProviderTest.java * (edit) core/src/test/java/com/opensymphony/xwork2/TextProviderSupportTest.java * (edit) core/src/test/java/org/apache/struts2/views/jsp/TextTagTest.java * (edit) core/src/test/java/org/apache/struts2/interceptor/I18nInterceptorTest.java * (edit) core/src/test/java/org/apache/struts2/interceptor/FileUploadInterceptorTest.java * (edit) core/src/test/java/org/apache/struts2/views/jsp/ui/OptGroupTest.java * (edit) core/src/main/java/com/opensymphony/xwork2/ActionSupport.java * (edit) core/src/test/java/com/opensymphony/xwork2/validator/SimpleActionValidationTest.java * (edit) core/src/test/java/com/opensymphony/xwork2/conversion/impl/AnnotationXWorkConverterTest.java * (edit) core/src/test/java/com/opensymphony/xwork2/util/LocalizedTextUtilTest.java * (edit) core/src/test/java/com/opensymphony/xwork2/conversion/impl/XWorkConverterTest.java * (edit) core/src/main/java/com/opensymphony/xwork2/DefaultLocaleProvider.java > 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} > <interceptor-ref name="I18nInterceptor"> > <param name="validation"> > false > </param> > </interceptor-ref> > {code} > and then access it in the interceptor to override default behaviour. -- This message was sent by Atlassian JIRA (v6.3.4#6332)