Repository: Wikidata/Wikidata-Toolkit
Pull request #732 (2022-09-29 01:03:33)

Bump slf4jVersion from 2.0.2 to 2.0.3
Bumps `slf4jVersion` from 2.0.2 to 2.0.3.
Updates `slf4j-api` from 2.0.2 to 2.0.3
<details>
<summary>Commits</summary>
<ul>
<li><a href="https://github.com/qos-ch/slf4j/commit/b2cb05f16acc21a3266a74ef5c578f2cd9efdead"><code>b2cb05f</code></a> prepare release 2.0.3</li>
<li><a href="https://github.com/qos-ch/slf4j/commit/4b5bb41ede1cf046e7bfd9dd639d43584020fb41"><code>4b5bb41</code></a> fix SLF4J-546, Fluent logging API doesn't populate timestamp with Reload4JLogger</li>
<li><a href="https://github.com/qos-ch/slf4j/commit/b500a6fdfd80772b089cd4069430dd0f6106afb1"><code>b500a6f</code></a> javadoc explaining using multiple markers instead of nested markers</li>
<li><a href="https://github.com/qos-ch/slf4j/commit/d81affb012f37e1d1eb8c2c6fbbb3a4ee15eb3e8"><code>d81affb</code></a> comment about ThreadLocal key or value types</li>
<li><a href="https://github.com/qos-ch/slf4j/commit/bcbbe40ffde9b32729198014a771482cf796c5af"><code>bcbbe40</code></a> Reword Marker Javadoc to improve grammar.</li>
<li><a href="https://github.com/qos-ch/slf4j/commit/7686020c364bb0567263b14d10752eee6f393fa5"><code>7686020</code></a> Merge pull request <a href="https://github-redirect.dependabot.com/qos-ch/slf4j/issues/310">#310</a> from ascopes/patch-1</li>
<li><a href="https://github.com/qos-ch/slf4j/commit/3f47f87ccce890c6ec8e7e10a882dce9e87db397"><code>3f47f87</code></a> Add missing javadoc to SLF4JServiceProvider.java</li>
<li><a href="https://github.com/qos-ch/slf4j/commit/eb1710af7bbc4a05efa1078d34ee076e1c591a73"><code>eb1710a</code></a> start work on 2.0.3-SNAPSHOT, fix SLF4J-564</li>
<li><a href="https://github.com/qos-ch/slf4j/commit/bb49a5aeefc26cd22755951c6088bde670495049"><code>bb49a5a</code></a> Merge pull request <a href="https://github-redirect.dependabot.com/qos-ch/slf4j/issues/307">#307</a> from radio-rogal/slf4j-564-simple-logger-javadoc</li>
<li><a href="https://github.com/qos-ch/slf4j/commit/768ca7d4c02f475c4ebae2e9f666cd12a6bca45b"><code>768ca7d</code></a> [SLF4J-564] slf4j-simple: fix javadoc for SimpleLogger</li>
<li>See full diff in <a href="https://github.com/qos-ch/slf4j/compare/v_2.0.2...v_2.0.3">compare view</a></li>
</ul>
</details>
<br />

Updates `slf4j-log4j12` from 2.0.2 to 2.0.3
<details>
<summary>Commits</summary>
<ul>
<li><a href="https://github.com/qos-ch/slf4j/commit/b2cb05f16acc21a3266a74ef5c578f2cd9efdead"><code>b2cb05f</code></a> prepare release 2.0.3</li>
<li><a href="https://github.com/qos-ch/slf4j/commit/4b5bb41ede1cf046e7bfd9dd639d43584020fb41"><code>4b5bb41</code></a> fix SLF4J-546, Fluent logging API doesn't populate timestamp with Reload4JLogger</li>
<li><a href="https://github.com/qos-ch/slf4j/commit/b500a6fdfd80772b089cd4069430dd0f6106afb1"><code>b500a6f</code></a> javadoc explaining using multiple markers instead of nested markers</li>
<li><a href="https://github.com/qos-ch/slf4j/commit/d81affb012f37e1d1eb8c2c6fbbb3a4ee15eb3e8"><code>d81affb</code></a> comment about ThreadLocal key or value types</li>
<li><a href="https://github.com/qos-ch/slf4j/commit/bcbbe40ffde9b32729198014a771482cf796c5af"><code>bcbbe40</code></a> Reword Marker Javadoc to improve grammar.</li>
<li><a href="https://github.com/qos-ch/slf4j/commit/7686020c364bb0567263b14d10752eee6f393fa5"><code>7686020</code></a> Merge pull request <a href="https://github-redirect.dependabot.com/qos-ch/slf4j/issues/310">#310</a> from ascopes/patch-1</li>
<li><a href="https://github.com/qos-ch/slf4j/commit/3f47f87ccce890c6ec8e7e10a882dce9e87db397"><code>3f47f87</code></a> Add missing javadoc to SLF4JServiceProvider.java</li>
<li><a href="https://github.com/qos-ch/slf4j/commit/eb1710af7bbc4a05efa1078d34ee076e1c591a73"><code>eb1710a</code></a> start work on 2.0.3-SNAPSHOT, fix SLF4J-564</li>
<li><a href="https://github.com/qos-ch/slf4j/commit/bb49a5aeefc26cd22755951c6088bde670495049"><code>bb49a5a</code></a> Merge pull request <a href="https://github-redirect.dependabot.com/qos-ch/slf4j/issues/307">#307</a> from radio-rogal/slf4j-564-simple-logger-javadoc</li>
<li><a href="https://github.com/qos-ch/slf4j/commit/768ca7d4c02f475c4ebae2e9f666cd12a6bca45b"><code>768ca7d</code></a> [SLF4J-564] slf4j-simple: fix javadoc for SimpleLogger</li>
<li>See full diff in <a href="https://github.com/qos-ch/slf4j/compare/v_2.0.2...v_2.0.3">compare view</a></li>
</ul>
</details>
<br />


Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
- `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)


</details>


Patch:
diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml
index 32619203..48319b52 100644
--- a/.github/workflows/deploy.yml
+++ b/.github/workflows/deploy.yml
@@ -31,7 +31,7 @@ jobs:
       - name: Generate javadocs
         run: mvn compile javadoc:aggregate
       - name: Publish javadocs
-        uses: JamesIves/github-pages-deploy-action@v4.4.0
+        uses: JamesIves/github-pages-deploy-action@v4.4.1
         with:
           branch: gh-pages
           folder: target/site/apidocs
diff --git a/RELEASE-NOTES.md b/RELEASE-NOTES.md
index 6e03d81c..19668652 100644
--- a/RELEASE-NOTES.md
+++ b/RELEASE-NOTES.md
@@ -1,6 +1,12 @@
 Wikidata Toolkit Release Notes
 ==============================
 
+Version 0.14.2
+--------------
+
+Bug fixes:
+* add `uselang` as optional parameter for wbsearchentities action (#239)
+
 Version 0.14.1
 --------------
 
diff --git a/pom.xml b/pom.xml
index 81549746..db779808 100644
--- a/pom.xml
+++ b/pom.xml
@@ -5,7 +5,7 @@
 
 	<groupId>org.wikidata.wdtk</groupId>
 	<artifactId>wdtk-parent</artifactId>
-	<version>0.14.2-SNAPSHOT</version>
+	<version>0.14.3-SNAPSHOT</version>
 	<packaging>pom</packaging>
 
 	<name>Wikidata Toolkit</name>
@@ -72,15 +72,15 @@
 
 	<properties>
 		<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
-		<apacheCommonsCompressVersion>1.21</apacheCommonsCompressVersion>
+		<apacheCommonsCompressVersion>1.22</apacheCommonsCompressVersion>
 		<apacheCommonsLangVersion>3.12.0</apacheCommonsLangVersion>
 		<apacheCommonsIOVersion>2.11.0</apacheCommonsIOVersion>
 		<jacksonVersion>2.13.4</jacksonVersion>
 		<junitVersion>4.13.2</junitVersion>
 		<hamcrestVersion>2.2</hamcrestVersion>
-		<mockitoVersion>4.8.0</mockitoVersion>
+		<mockitoVersion>4.8.1</mockitoVersion>
 		<rdf4jVersion>3.7.7</rdf4jVersion>
-		<slf4jVersion>2.0.2</slf4jVersion>
+		<slf4jVersion>2.0.3</slf4jVersion>
 		<threetenVersion>1.7.1</threetenVersion>
 		<okhttpSignpostVersion>1.1.0</okhttpSignpostVersion>
 		<okhttpVersion>4.10.0</okhttpVersion>
diff --git a/wdtk-datamodel/pom.xml b/wdtk-datamodel/pom.xml
index c8048db4..7fe5a42f 100644
--- a/wdtk-datamodel/pom.xml
+++ b/wdtk-datamodel/pom.xml
@@ -6,7 +6,7 @@
 	<parent>
 		<groupId>org.wikidata.wdtk</groupId>
 		<artifactId>wdtk-parent</artifactId>
-		<version>0.14.2-SNAPSHOT</version>
+		<version>0.14.3-SNAPSHOT</version>
 	</parent>
 
 	<artifactId>wdtk-datamodel</artifactId>
diff --git a/wdtk-distribution/pom.xml b/wdtk-distribution/pom.xml
index 4c814215..d0970b64 100644
--- a/wdtk-distribution/pom.xml
+++ b/wdtk-distribution/pom.xml
@@ -6,7 +6,7 @@
 	<parent>
 		<groupId>org.wikidata.wdtk</groupId>
 		<artifactId>wdtk-parent</artifactId>
-		<version>0.14.2-SNAPSHOT</version>
+		<version>0.14.3-SNAPSHOT</version>
 	</parent>
 
 	<artifactId>wdtk-distribution</artifactId>
@@ -44,7 +44,7 @@
 			      <plugin>
 			        <groupId>org.apache.maven.plugins</groupId>
 			        <artifactId>maven-shade-plugin</artifactId>
-			        <version>3.4.0</version>
+			        <version>3.4.1</version>
 			        <executions>
 			          <execution>
 			          	<id>wdtk-library</id>
diff --git a/wdtk-dumpfiles/pom.xml b/wdtk-dumpfiles/pom.xml
index a22142ba..c5d5bc90 100644
--- a/wdtk-dumpfiles/pom.xml
+++ b/wdtk-dumpfiles/pom.xml
@@ -5,7 +5,7 @@
 	<parent>
 		<groupId>org.wikidata.wdtk</groupId>
 		<artifactId>wdtk-parent</artifactId>
-		<version>0.14.2-SNAPSHOT</version>
+		<version>0.14.3-SNAPSHOT</version>
 	</parent>
 
 	<artifactId>wdtk-dumpfiles</artifactId>
diff --git a/wdtk-examples/pom.xml b/wdtk-examples/pom.xml
index 9dea12bc..f1094d0b 100644
--- a/wdtk-examples/pom.xml
+++ b/wdtk-examples/pom.xml
@@ -5,7 +5,7 @@
 	<parent>
 		<groupId>org.wikidata.wdtk</groupId>
 		<artifactId>wdtk-parent</artifactId>
-		<version>0.14.2-SNAPSHOT</version>
+		<version>0.14.3-SNAPSHOT</version>
 	</parent>
 
 	<artifactId>wdtk-examples</artifactId>
diff --git a/wdtk-rdf/pom.xml b/wdtk-rdf/pom.xml
index efd36893..e1592e83 100644
--- a/wdtk-rdf/pom.xml
+++ b/wdtk-rdf/pom.xml
@@ -5,7 +5,7 @@
   <parent>
     <groupId>org.wikidata.wdtk</groupId>
     <artifactId>wdtk-parent</artifactId>
-    <version>0.14.2-SNAPSHOT</version>
+    <version>0.14.3-SNAPSHOT</version>
   </parent>
 
   <artifactId>wdtk-rdf</artifactId>
diff --git a/wdtk-storage/pom.xml b/wdtk-storage/pom.xml
index 453e6702..76ac33b0 100644
--- a/wdtk-storage/pom.xml
+++ b/wdtk-storage/pom.xml
@@ -5,7 +5,7 @@
 	<parent>
 		<groupId>org.wikidata.wdtk</groupId>
 		<artifactId>wdtk-parent</artifactId>
-		<version>0.14.2-SNAPSHOT</version>
+		<version>0.14.3-SNAPSHOT</version>
 	</parent>
 
 	<artifactId>wdtk-storage</artifactId>
diff --git a/wdtk-util/pom.xml b/wdtk-util/pom.xml
index 0d50398d..55af5c58 100644
--- a/wdtk-util/pom.xml
+++ b/wdtk-util/pom.xml
@@ -5,7 +5,7 @@
 	<parent>
 		<groupId>org.wikidata.wdtk</groupId>
 		<artifactId>wdtk-parent</artifactId>
-		<version>0.14.2-SNAPSHOT</version>
+		<version>0.14.3-SNAPSHOT</version>
 	</parent>
 
 	<artifactId>wdtk-util</artifactId>
diff --git a/wdtk-wikibaseapi/pom.xml b/wdtk-wikibaseapi/pom.xml
index 282b7a00..a06ad455 100644
--- a/wdtk-wikibaseapi/pom.xml
+++ b/wdtk-wikibaseapi/pom.xml
@@ -6,7 +6,7 @@
 	<parent>
 		<groupId>org.wikidata.wdtk</groupId>
 		<artifactId>wdtk-parent</artifactId>
-		<version>0.14.2-SNAPSHOT</version>
+		<version>0.14.3-SNAPSHOT</version>
 	</parent>
 
 	<artifactId>wdtk-wikibaseapi</artifactId>
diff --git a/wdtk-wikibaseapi/src/main/java/org/wikidata/wdtk/wikibaseapi/WbGetEntitiesSearchData.java b/wdtk-wikibaseapi/src/main/java/org/wikidata/wdtk/wikibaseapi/WbGetEntitiesSearchData.java
index edb02352..7d06ed91 100644
--- a/wdtk-wikibaseapi/src/main/java/org/wikidata/wdtk/wikibaseapi/WbGetEntitiesSearchData.java
+++ b/wdtk-wikibaseapi/src/main/java/org/wikidata/wdtk/wikibaseapi/WbGetEntitiesSearchData.java
@@ -32,21 +32,21 @@ public class WbGetEntitiesSearchData {
 
 	/**
 	 * search for this text. See
-	 * {@link WbSearchEntitiesAction#wbSearchEntities(String, String, Boolean, String, Long, Long)}
+	 * {@link WbSearchEntitiesAction#wbSearchEntities(String, String, Boolean, String, Long, Long, String)}
 	 * for details.
 	 */
 	public String search = null;
 
 	/**
 	 * search in this language. See
-	 * {@link WbSearchEntitiesAction#wbSearchEntities(String, String, Boolean, String, Long, Long)}
+	 * {@link WbSearchEntitiesAction#wbSearchEntities(String, String, Boolean, String, Long, Long, String)}
 	 * for details.
 	 */
 	public String language = null;
 
 	/**
 	 * whether to disable language fallback. See
-	 * {@link WbSearchEntitiesAction#wbSearchEntities(String, String, Boolean, String, Long, Long)}
+	 * {@link WbSearchEntitiesAction#wbSearchEntities(String, String, Boolean, String, Long, Long, String)}
 	 * for details.
 	 */
 	public Boolean strictlanguage = null;
@@ -54,7 +54,7 @@ public class WbGetEntitiesSearchData {
 	/**
 	 * search for this type of entity
 	 * One of the following values: item, property. See
-	 * {@link WbSearchEntitiesAction#wbSearchEntities(String, String, Boolean, String, Long, Long)}
+	 * {@link WbSearchEntitiesAction#wbSearchEntities(String, String, Boolean, String, Long, Long, String)}
 	 * for details.
 	 */
 	public String type = null;
@@ -62,7 +62,7 @@ public class WbGetEntitiesSearchData {
 	/**
 	 * maximal number of results
 	 * no more than 50 (500 for bots) allowed. See
-	 * {@link WbSearchEntitiesAction#wbSearchEntities(String, String, Boolean, String, Long, Long)}
+	 * {@link WbSearchEntitiesAction#wbSearchEntities(String, String, Boolean, String, Long, Long, String)}
 	 * for details.
 	 */
 	public Long limit = null;
@@ -70,8 +70,15 @@ public class WbGetEntitiesSearchData {
 	/**
 	 * offset where to continue a search
 	 * this parameter is called "continue" in the API (which is a Java keyword). See
-	 * {@link WbSearchEntitiesAction#wbSearchEntities(String, String, Boolean, String, Long, Long)}
+	 * {@link WbSearchEntitiesAction#wbSearchEntities(String, String, Boolean, String, Long, Long, String)}
 	 * for details.
 	 */
 	public Long offset = null;
+
+	/**
+	 * get response in this language. See
+	 * {@link WbSearchEntitiesAction#wbSearchEntities(String, String, Boolean, String, Long, Long, String)}
+	 * for details.
+	 */
+	public String uselang = null;
 }
diff --git a/wdtk-wikibaseapi/src/main/java/org/wikidata/wdtk/wikibaseapi/WbSearchEntitiesAction.java b/wdtk-wikibaseapi/src/main/java/org/wikidata/wdtk/wikibaseapi/WbSearchEntitiesAction.java
index bab63c08..49acfef5 100644
--- a/wdtk-wikibaseapi/src/main/java/org/wikidata/wdtk/wikibaseapi/WbSearchEntitiesAction.java
+++ b/wdtk-wikibaseapi/src/main/java/org/wikidata/wdtk/wikibaseapi/WbSearchEntitiesAction.java
@@ -69,7 +69,17 @@ public class WbSearchEntitiesAction {
 	public List<WbSearchEntitiesResult> wbSearchEntities(WbGetEntitiesSearchData properties)
 			throws MediaWikiApiErrorException, IOException {
 		return wbSearchEntities(properties.search, properties.language,
-				properties.strictlanguage, properties.type, properties.limit, properties.offset);
+				properties.strictlanguage, properties.type, properties.limit, properties.offset, properties.uselang);
+	}
+
+	/**
+	 * Keeping this for backwards compatibility, the real action happens in 
+	 * {@link WbSearchEntitiesAction#wbSearchEntities(String, String, Boolean, String, Long, Long, String)}
+	 */
+	public List<WbSearchEntitiesResult> wbSearchEntities(String search, String language,
+			Boolean strictLanguage, String type, Long limit, Long offset)
+					throws MediaWikiApiErrorException, IOException {
+		return wbSearchEntities(search, language, strictLanguage, type, limit, offset, null);
 	}
 
 	/**
@@ -103,7 +113,8 @@ public class WbSearchEntitiesAction {
 	 *            (optional) offset where to continue a search
 	 *            Default: 0
 	 *            this parameter is called "continue" in the API (which is a Java keyword)
-	 *
+	 * @param uselang        
+	 *            (optional) the response should have this language, default en
 	 * @return list of matching entities retrieved via the API URL
 	 * @throws MediaWikiApiErrorException
 	 *             if the API returns an error
@@ -112,8 +123,8 @@ public class WbSearchEntitiesAction {
 	 * @throws MalformedResponseException
 	 *             if response JSON cannot be parsed
 	 */
-	public List<WbSearchEntitiesResult> wbSearchEntities(String search, String language,
-			Boolean strictLanguage, String type, Long limit, Long offset)
+	public List<WbSearchEntitiesResult> wbSearchEntities(String search, String language, 
+			Boolean strictLanguage, String type, Long limit, Long offset, String uselang)
 					throws MediaWikiApiErrorException, IOException {
 
 		Map<String, String> parameters = new HashMap<>();
@@ -148,6 +159,10 @@ public class WbSearchEntitiesAction {
 			parameters.put("continue", Long.toString(offset));
 		}
 
+		if (uselang != null) {
+			parameters.put("uselang", uselang);
+		}
+
 		List<WbSearchEntitiesResult> results = new ArrayList<>();
 
 		JsonNode root = this.connection.sendJsonRequest("POST", parameters);


Test patch:
diff --git a/wdtk-testing/pom.xml b/wdtk-testing/pom.xml
index 8ce34162..9cd051a4 100644
--- a/wdtk-testing/pom.xml
+++ b/wdtk-testing/pom.xml
@@ -5,7 +5,7 @@
 	<parent>
 		<groupId>org.wikidata.wdtk</groupId>
 		<artifactId>wdtk-parent</artifactId>
-		<version>0.14.2-SNAPSHOT</version>
+		<version>0.14.3-SNAPSHOT</version>
 	</parent>
 
 	<artifactId>wdtk-testing</artifactId>
diff --git a/wdtk-wikibaseapi/src/test/java/org/wikidata/wdtk/wikibaseapi/WbSearchEntitiesActionTest.java b/wdtk-wikibaseapi/src/test/java/org/wikidata/wdtk/wikibaseapi/WbSearchEntitiesActionTest.java
index 6ceb00d8..434b7ae5 100644
--- a/wdtk-wikibaseapi/src/test/java/org/wikidata/wdtk/wikibaseapi/WbSearchEntitiesActionTest.java
+++ b/wdtk-wikibaseapi/src/test/java/org/wikidata/wdtk/wikibaseapi/WbSearchEntitiesActionTest.java
@@ -63,7 +63,7 @@ public class WbSearchEntitiesActionTest {
     @Test
     public void testWbSearchEntities() throws MediaWikiApiErrorException, IOException {
         List<WbSearchEntitiesResult> results = action.wbSearchEntities("abc",
-                "en", null, null, null, null);
+                "en", null, null, null, null, null);
 
         assertEquals(7, results.size());
 
@@ -89,18 +89,18 @@ public class WbSearchEntitiesActionTest {
     public void testWbSearchEntitiesEmpty() throws MediaWikiApiErrorException, IOException {
         List<WbSearchEntitiesResult> results = action.wbSearchEntities(
                 "some search string with no results", "en", null, null, null,
-                null);
+                null, null);
 
         assertTrue(results.isEmpty());
     }
 
     @Test(expected = IllegalArgumentException.class)
     public void testIdsAndTitles() throws MediaWikiApiErrorException, IOException {
-        action.wbSearchEntities(null, "en", null, null, null, null);
+        action.wbSearchEntities(null, "en", null, null, null, null, null);
     }
 
     @Test(expected = IllegalArgumentException.class)
     public void testIdsAndSites() throws MediaWikiApiErrorException, IOException {
-        action.wbSearchEntities("abc", null, null, null, null, null);
+        action.wbSearchEntities("abc", null, null, null, null, null, null);
     }
 }