Merge pull request #1968 from OpenRefine/wikidata_summary_fix
Increment editgroups hash size for 3.2, fix comma issue in summaries
This commit is contained in:
commit
bfec5ea2cb
@ -169,8 +169,13 @@ public class PerformWikibaseEditsOperation extends EngineDependentOperation {
|
|||||||
|
|
||||||
// Generate batch token
|
// Generate batch token
|
||||||
long token = (new Random()).nextLong();
|
long token = (new Random()).nextLong();
|
||||||
String summary = _summary + String.format(" ([[:toollabs:editgroups/b/OR/%s|details]])",
|
// The following replacement is a fix for: https://github.com/Wikidata/editgroups/issues/4
|
||||||
(Long.toHexString(token).substring(0, 8)));
|
// Because commas and colons are used by Wikibase to separate the auto-generated summaries
|
||||||
|
// from the user-supplied ones, we replace these separators by similar unicode characters to
|
||||||
|
// make sure they can be told apart.
|
||||||
|
String summaryWithoutCommas = _summary.replaceAll(", ","ꓹ ").replaceAll(": ","։ ");
|
||||||
|
String summary = summaryWithoutCommas + String.format(" ([[:toollabs:editgroups/b/OR/%s|details]])",
|
||||||
|
(Long.toHexString(token).substring(0, 9)));
|
||||||
|
|
||||||
// Evaluate the schema
|
// Evaluate the schema
|
||||||
List<ItemUpdate> itemDocuments = _schema.evaluate(_project, _engine);
|
List<ItemUpdate> itemDocuments = _schema.evaluate(_project, _engine);
|
||||||
|
Loading…
Reference in New Issue
Block a user