Skip to content

Commit 2bda146

Browse files
committed
replace placeholder in translation
1 parent 06b0ce2 commit 2bda146

File tree

2 files changed

+9
-2
lines changed

2 files changed

+9
-2
lines changed

src/Analysis/Problem/Vanilla/DatapackParsingProblem.php

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,9 @@ class DatapackParsingProblem extends VanillaProblem
1414
*/
1515
public function getMessage(): string
1616
{
17-
return Translator::getInstance()->getTranslation("datapack-parsing-problem");
17+
return Translator::getInstance()->getTranslation("datapack-parsing-problem", [
18+
"datapack" => $this->getDatapack()
19+
]);
1820
}
1921

2022
/**
@@ -33,4 +35,9 @@ public function setMatches(array $matches, mixed $patternKey): void
3335
$this->datapack = $matches[1];
3436
$this->addSolution(new FileDeleteSolution($this->datapack));
3537
}
38+
39+
public function getDatapack(): string
40+
{
41+
return $this->datapack;
42+
}
3643
}

test/data/Vanilla/vanilla-failed-to-parse-from-pack.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6609,7 +6609,7 @@
66096609
"analysis": {
66106610
"problems": [
66116611
{
6612-
"message": "The datapack '{{datapack}}' could not be parsed.",
6612+
"message": "The datapack 'far-end-ender-expansion-2-0-3-v1-17-1.zip' could not be parsed.",
66136613
"counter": 91,
66146614
"entry": {
66156615
"level": 3,

0 commit comments

Comments
 (0)