Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F14642560
D12291.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
2 KB
Referenced Files
None
Subscribers
None
D12291.diff
View Options
diff --git a/src/parser/aast/api/AASTTree.php b/src/parser/aast/api/AASTTree.php
--- a/src/parser/aast/api/AASTTree.php
+++ b/src/parser/aast/api/AASTTree.php
@@ -68,7 +68,10 @@
if (empty($this->nodeConstants[$type_id])) {
$tree_type = $this->getTreeType();
throw new Exception(
- "No type name for node type ID '{$type_id}' in '{$tree_type}' AAST.");
+ pht(
+ "No type name for node type ID '%s' in '%s' AAST.",
+ $type_id,
+ $tree_type));
}
return $this->nodeConstants[$type_id];
@@ -78,18 +81,22 @@
if (empty($this->nodeReverseMap[$type_name])) {
$tree_type = $this->getTreeType();
throw new Exception(
- "No type ID for node type name '{$type_name}' in '{$tree_type}' AAST.");
+ pht(
+ "No type ID for node type name '%s' in '%s' AAST.",
+ $type_name,
+ $tree_type));
}
return $this->nodeReverseMap[$type_name];
}
-
public function getTokenTypeNameFromTypeID($type_id) {
if (empty($this->tokenConstants[$type_id])) {
$tree_type = $this->getTreeType();
throw new Exception(
- "No type name for token type ID '{$type_id}' ".
- "in '{$tree_type}' AAST.");
+ pht(
+ "No type name for token type ID '%s' in '%s' AAST.",
+ $type_id,
+ $tree_type));
}
return $this->tokenConstants[$type_id];
}
@@ -98,15 +105,17 @@
if (empty($this->tokenReverseMap[$type_name])) {
$tree_type = $this->getTreeType();
throw new Exception(
- "No type ID for token type name '{$type_name}' ".
- "in '{$tree_type}' AAST.");
+ pht(
+ "No type ID for token type name '%s' in '%s' AAST.",
+ $type_name,
+ $tree_type));
}
return $this->tokenReverseMap[$type_name];
}
-
/**
- * Unlink internal datastructures so that PHP's will garbage collect the tree.
+ * Unlink internal datastructures so that PHP will garbage collect the tree.
+ *
* This renders the object useless.
*
* @return void
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sun, Jan 12, 6:18 AM (21 h, 36 m)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
6986457
Default Alt Text
D12291.diff (2 KB)
Attached To
Mode
D12291: `pht`ize some strings
Attached
Detach File
Event Timeline
Log In to Comment