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

Side by Side Diff: pkg/intl/test/message_extraction/sample_with_messages.dart

Issue 18543009: Plurals and Genders (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Fix typo Created 7 years, 5 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « pkg/intl/test/message_extraction/part_of_sample_with_messages.dart ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 /** 5 /**
6 * This is a program with various [Intl.message] messages. It just prints 6 * This is a program with various [Intl.message] messages. It just prints
7 * all of them, and is used for testing of message extraction, translation, 7 * all of them, and is used for testing of message extraction, translation,
8 * and code generation. 8 * and code generation.
9 */ 9 */
10 library sample; 10 library sample;
(...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after
102 print(leadingQuotes()); 102 print(leadingQuotes());
103 print(alwaysAccented()); 103 print(alwaysAccented());
104 print(trickyInterpolation("this")); 104 print(trickyInterpolation("this"));
105 var thing = new YouveGotMessages(); 105 var thing = new YouveGotMessages();
106 print(thing.method()); 106 print(thing.method());
107 print(thing.nonLambda()); 107 print(thing.nonLambda());
108 var x = YouveGotMessages.staticMessage(); 108 var x = YouveGotMessages.staticMessage();
109 print(YouveGotMessages.staticMessage()); 109 print(YouveGotMessages.staticMessage());
110 print(notAlwaysTranslated()); 110 print(notAlwaysTranslated());
111 print(originalNotInBMP()); 111 print(originalNotInBMP());
112 // TODO(alanknight): Support named arguments.
113 // print(thing.namedArgs(thing: 'well...'));
114 // TODO(alanknight): Support plurals. Do we need to consider changing
115 // the form so as not to have a difficult to validate interpolation
116 // in our translation output?
117 // print(thing.plurals(1));
118 // print(thing.plurals(2));
119 print(escapable()); 112 print(escapable());
113
114 print(thing.plurals(0));
115 print(thing.plurals(1));
116 print(thing.plurals(2));
117 var alice = new Person("Alice", "female");
118 var bob = new Person("Bob", "male");
119 var cat = new Person("cat", null);
120 print(thing.whereTheyWent(alice, "house"));
121 print(thing.whereTheyWent(bob, "house"));
122 print(thing.whereTheyWent(cat, "litter box"));
123 print(thing.nested([alice, bob], "magasin"));
124 print(thing.nested([alice], "magasin"));
125 print(thing.nested([], "magasin"));
126 print(thing.nested([bob, bob], "magasin"));
127 print(thing.nested([alice, alice], "magasin"));
120 }); 128 });
121 } 129 }
122 130
123 var localeToUse = 'en_US'; 131 var localeToUse = 'en_US';
124 132
125 main() { 133 main() {
126 var fr = new Intl("fr"); 134 var fr = new Intl("fr");
127 var english = new Intl("en_US"); 135 var english = new Intl("en_US");
128 var de = new Intl("de_DE"); 136 var de = new Intl("de_DE");
129 initializeMessages(fr.locale).then((_) => printStuff(fr)); 137 initializeMessages(fr.locale).then((_) => printStuff(fr));
130 initializeMessages(de.locale).then((_) => printStuff(de)); 138 initializeMessages(de.locale).then((_) => printStuff(de));
131 printStuff(english); 139 printStuff(english);
132 } 140 }
OLDNEW
« no previous file with comments | « pkg/intl/test/message_extraction/part_of_sample_with_messages.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698