aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--sonar-ws-client/src/main/java/org/sonar/wsclient/connectors/HttpClient3Connector.java3
-rw-r--r--sonar-ws-client/src/main/java/org/sonar/wsclient/connectors/HttpClient4Connector.java3
-rw-r--r--sonar-ws-client/src/main/java/org/sonar/wsclient/services/AbstractQuery.java23
3 files changed, 29 insertions, 0 deletions
diff --git a/sonar-ws-client/src/main/java/org/sonar/wsclient/connectors/HttpClient3Connector.java b/sonar-ws-client/src/main/java/org/sonar/wsclient/connectors/HttpClient3Connector.java
index 966095110bc..cb720320d7c 100644
--- a/sonar-ws-client/src/main/java/org/sonar/wsclient/connectors/HttpClient3Connector.java
+++ b/sonar-ws-client/src/main/java/org/sonar/wsclient/connectors/HttpClient3Connector.java
@@ -149,6 +149,9 @@ public class HttpClient3Connector extends Connector {
private void initRequest(HttpMethodBase request, AbstractQuery query) {
request.setRequestHeader("Accept", "application/json");
+ if (query.getLocale() != null) {
+ request.setRequestHeader("Accept-Language", query.getLocale());
+ }
request.getParams().setSoTimeout(query.getTimeoutMilliseconds());
}
diff --git a/sonar-ws-client/src/main/java/org/sonar/wsclient/connectors/HttpClient4Connector.java b/sonar-ws-client/src/main/java/org/sonar/wsclient/connectors/HttpClient4Connector.java
index 4044592a0ce..e1aebfd175e 100644
--- a/sonar-ws-client/src/main/java/org/sonar/wsclient/connectors/HttpClient4Connector.java
+++ b/sonar-ws-client/src/main/java/org/sonar/wsclient/connectors/HttpClient4Connector.java
@@ -178,6 +178,9 @@ public class HttpClient4Connector extends Connector {
private void initRequest(HttpRequestBase request, AbstractQuery query) {
request.setHeader("Accept", "application/json");
+ if (query.getLocale() != null) {
+ request.setHeader("Accept-Language", query.getLocale());
+ }
request.getParams().setParameter(CoreConnectionPNames.CONNECTION_TIMEOUT, query.getTimeoutMilliseconds());
request.getParams().setParameter(CoreConnectionPNames.SO_TIMEOUT, query.getTimeoutMilliseconds());
}
diff --git a/sonar-ws-client/src/main/java/org/sonar/wsclient/services/AbstractQuery.java b/sonar-ws-client/src/main/java/org/sonar/wsclient/services/AbstractQuery.java
index 141dd14fab3..ff9aed7ddd5 100644
--- a/sonar-ws-client/src/main/java/org/sonar/wsclient/services/AbstractQuery.java
+++ b/sonar-ws-client/src/main/java/org/sonar/wsclient/services/AbstractQuery.java
@@ -20,6 +20,7 @@
package org.sonar.wsclient.services;
import java.util.Date;
+import java.util.Locale;
/**
* @since 2.2
@@ -35,6 +36,9 @@ public abstract class AbstractQuery<MODEL extends Model> {
private int timeoutMilliseconds = DEFAULT_TIMEOUT_MILLISECONDS;
+ // accepted-language as defined in http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html
+ private String locale;
+
/**
* Must start with a slash, for example: /api/metrics
* <p>
@@ -75,6 +79,25 @@ public abstract class AbstractQuery<MODEL extends Model> {
}
/**
+ * Accepted-language, as defined in http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html
+ *
+ * @since 2.10
+ */
+ public final String getLocale() {
+ return locale;
+ }
+
+ /**
+ * Set the Accepted-language HTTP parameter
+ *
+ * @since 2.10
+ */
+ public final AbstractQuery<MODEL> setLocale(String locale) {
+ this.locale = locale;
+ return this;
+ }
+
+ /**
* Encodes single parameter value.
*/
protected static String encode(String value) {
port/47441/stable29'>backport/47441/stable29 Nextcloud server, a safe home for all your data: https://github.com/nextcloud/serverwww-data
summaryrefslogtreecommitdiffstats
path: root/settings/l10n/sl.php
blob: a6b110d78e59d7b2018ea4bf37b67a9c9925ef59 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151