File tree 2 files changed +27
-2
lines changed
src/main/java/hudson/plugins/locale
2 files changed +27
-2
lines changed Original file line number Diff line number Diff line change 34
34
<properties >
35
35
<changelist >999999-SNAPSHOT</changelist >
36
36
<gitHubRepo >jenkinsci/locale-plugin</gitHubRepo >
37
- <jenkins .version>2.440.3 </jenkins .version>
37
+ <jenkins .version>2.452.1 </jenkins .version>
38
38
<configuration-as-code .version>1810.v9b_c30a_249a_4c</configuration-as-code .version>
39
39
<spotless .check.skip>false</spotless .check.skip>
40
40
</properties >
41
41
<dependencyManagement >
42
42
<dependencies >
43
43
<dependency >
44
44
<groupId >io.jenkins.tools.bom</groupId >
45
- <artifactId >bom-2.440 .x</artifactId >
45
+ <artifactId >bom-2.452 .x</artifactId >
46
46
<version >3120.v4d898e1e9fc4</version >
47
47
<type >pom</type >
48
48
<scope >import</scope >
Original file line number Diff line number Diff line change 1
1
package hudson .plugins .locale ;
2
2
3
3
import java .io .IOException ;
4
+ import java .util .Enumeration ;
4
5
import java .util .Locale ;
6
+ import java .util .NoSuchElementException ;
5
7
import javax .servlet .Filter ;
6
8
import javax .servlet .FilterChain ;
7
9
import javax .servlet .FilterConfig ;
@@ -33,6 +35,29 @@ public Locale getLocale() {
33
35
// Force locale to configured default, ignore request' Accept-Language header
34
36
return Locale .getDefault ();
35
37
}
38
+
39
+ @ Override
40
+ public Enumeration <Locale > getLocales () {
41
+ // Create a custom Enumeration with only the default locale
42
+ return new Enumeration <Locale >() {
43
+ private boolean hasMoreElements = true ;
44
+
45
+ @ Override
46
+ public boolean hasMoreElements () {
47
+ return hasMoreElements ;
48
+ }
49
+
50
+ @ Override
51
+ public Locale nextElement () {
52
+ if (hasMoreElements ) {
53
+ hasMoreElements = false ;
54
+ return getLocale ();
55
+ } else {
56
+ throw new NoSuchElementException ();
57
+ }
58
+ }
59
+ };
60
+ }
36
61
};
37
62
}
38
63
}
You can’t perform that action at this time.
0 commit comments