Page MenuHomePhabricator

D12293.id.diff
No OneTemporary

D12293.id.diff

diff --git a/src/parser/aast/api/AASTNode.php b/src/parser/aast/api/AASTNode.php
--- a/src/parser/aast/api/AASTNode.php
+++ b/src/parser/aast/api/AASTNode.php
@@ -78,8 +78,11 @@
$child = $this->getChildByIndex($index);
if ($child->getTypeName() != $type) {
throw new Exception(
- "Child in position '{$index}' is not of type '{$type}': ".
- $this->getDescription());
+ pht(
+ "Child in position '%d' is not of type '%s': %s",
+ $index,
+ $type,
+ $this->getDescription()));
}
return $child;
@@ -96,7 +99,7 @@
++$idx;
}
- throw new Exception("No child with index '{$index}'.");
+ throw new Exception(pht("No child with index '%d'.", $index));
}
/**
@@ -244,7 +247,7 @@
$concrete = addcslashes($concrete, "\\\n\"");
- return 'a node of type '.$this->getTypeName().': "'.$concrete.'"';
+ return pht('a node of type %s: "%s"', $this->getTypeName(), $concrete);
}
protected function getTypeIDFromTypeName($type_name) {

File Metadata

Mime Type
text/plain
Expires
Sun, Feb 9, 3:28 AM (8 h, 1 m)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
7104929
Default Alt Text
D12293.id.diff (1 KB)

Event Timeline