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

Unified Diff: pkg/intl/test/message_extraction/sample_with_messages.dart

Issue 182443003: Add 'meaning' to Intl.messages (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years, 10 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
Index: pkg/intl/test/message_extraction/sample_with_messages.dart
diff --git a/pkg/intl/test/message_extraction/sample_with_messages.dart b/pkg/intl/test/message_extraction/sample_with_messages.dart
index ede8896902a656090f88c08f9b346773b7480011..d47c639c9768aa3f83cfeeb293d0c8d81f12c045 100644
--- a/pkg/intl/test/message_extraction/sample_with_messages.dart
+++ b/pkg/intl/test/message_extraction/sample_with_messages.dart
@@ -110,6 +110,13 @@ nestedOuter(number, gen) => Intl.plural(number,
name: 'nestedOuter',
args: [number, gen]);
+/// Distinguish two messages with identical text using the meaning parameter.
+rentToBePaid() => Intl.message("rent", name: "rentToBePaid",
+ meaning: 'Money for rent', desc: "Money to be paid for rent");
+
+rentAsVerb() => Intl.message("rent", name: "rentAsVerb",
+ meaning: 'rent as a verb', desc: "The action of renting, as in rent a car");
+
printStuff(Intl locale) {
// Use a name that's not a literal so this will get skipped. Then we have
@@ -193,6 +200,8 @@ printStuff(Intl locale) {
printOut(nestedSelect("CDN", 2));
printOut(pluralThatFailsParsing(1));
printOut(pluralThatFailsParsing(2));
+ printOut(rentAsVerb());
+ printOut(rentToBePaid());
});
}

Powered by Google App Engine
This is Rietveld 408576698