Skip to content

Commit

Permalink
preserve name tag for Micromania; Wikidata warnings tweaks
Browse files Browse the repository at this point in the history
  • Loading branch information
Snowysauce committed Jan 11, 2025
1 parent 6b143f9 commit 066e8a8
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 6 deletions.
3 changes: 3 additions & 0 deletions data/brands/shop/video_games.json
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,10 @@
{
"displayName": "Micromania",
"id": "micromania-bf0c2b",
"issues": [10300],
"locationSet": {"include": ["fx"]},
"note": "Micromania also has small sub-brands",
"preserveTags": ["^name"],
"tags": {
"brand": "Micromania",
"brand:wikidata": "Q3312221",
Expand Down
8 changes: 4 additions & 4 deletions docs/wikidata-warnings.htm
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@
}

// The Wikidata entry doesn't have an English label.
if (warning.msg.match("missing English label")) {
if (warning.msg.match("missing an English label")) {
rowClass = "englishlabel";
}

Expand All @@ -96,8 +96,8 @@
rowClass = "deleted";
}

// The Wikidata entry has an unresolved-redirect.
if (warning.msg.match("unresolved-redirect")) {
// The Wikidata entry has an unresolved redirect.
if (warning.msg.match("Wikidata QID redirects to")) {
rowClass = "unresolved";
}

Expand Down Expand Up @@ -165,7 +165,7 @@ <h1>Wikidata Warnings</h1>
to make the account publicly viewable.
</li>
<li>
<strong>unresolved-redirects:</strong> An "unresolved-redirect" is when the Wikidata entry
<strong>Unresolved redirects:</strong> An "unresolved redirect" is when the Wikidata entry
the <abbr title="Name Suggestion Index">NSI</abbr> links to is redirecting to a different (possibly newer)
Wikidata entry. In this instance, the Wikidata reference will need to be updated within
the <abbr title="Name Suggestion Index">NSI</abbr> data itself.
Expand Down
4 changes: 2 additions & 2 deletions scripts/build_wikidata.js
Original file line number Diff line number Diff line change
Expand Up @@ -237,7 +237,7 @@ function processEntities(result) {
let label = entity.labels && entity.labels.en && entity.labels.en.value;

if (!!entity.redirects) {
const warning = { qid: qid, msg: `wikidata redirects to ${entity.redirects.to}` };
const warning = { qid: qid, msg: `Wikidata QID redirects to ${entity.redirects.to}` };
console.warn(chalk.yellow(warning.qid.padEnd(12)) + chalk.red(warning.msg));
_warnings.push(warning);
}
Expand All @@ -263,7 +263,7 @@ function processEntities(result) {

} else { // otherwise raise a warning for the user to deal with.
label = label || qid;
const warning = { qid: qid, msg: `Entity for "${label}" missing English label.` };
const warning = { qid: qid, msg: `Entity for "${label}" is missing an English label.` };
console.warn(chalk.yellow(warning.qid.padEnd(12)) + chalk.red(warning.msg));
_warnings.push(warning);
}
Expand Down

0 comments on commit 066e8a8

Please sign in to comment.