Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(207)

Unified Diff: pkg/intl/lib/src/intl_message.dart

Issue 23212003: Relax verification checks. The locale doesn't have to be constant, print (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/intl/lib/src/intl_message.dart
diff --git a/pkg/intl/lib/src/intl_message.dart b/pkg/intl/lib/src/intl_message.dart
index 51a0ee58f78874490da46f55b7347e72f65247b2..886c82d0e858cd10de922857a36d6984277c207e 100644
--- a/pkg/intl/lib/src/intl_message.dart
+++ b/pkg/intl/lib/src/intl_message.dart
@@ -77,18 +77,17 @@ abstract class Message {
if (messageName == null) {
return "The 'name' argument for Intl.message must be specified";
}
- if ((messageName.expression is! SimpleStringLiteral)
- || messageName.expression.value != outerName) {
+ if (messageName.expression is! SimpleStringLiteral) {
return "The 'name' argument for Intl.message must be a simple string "
- "literal and match the containing function name.";
+ "literal.";
}
var simpleArguments = arguments.where(
(each) => each is NamedExpression
- && ["desc", "locale", "name"].contains(each.name.label.name));
+ && ["desc", "name"].contains(each.name.label.name));
var values = simpleArguments.map((each) => each.expression).toList();
for (var arg in values) {
if (arg is! SimpleStringLiteral) {
- return "Intl.message argument '${arg.name.label.name}' must be "
+ return "Intl.message argument '$arg' must be "
"a simple string literal";
}
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698