| OLD | NEW |
| 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 132 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 143 printOut(thing.nonLambda()); | 143 printOut(thing.nonLambda()); |
| 144 var x = YouveGotMessages.staticMessage(); | 144 var x = YouveGotMessages.staticMessage(); |
| 145 printOut(YouveGotMessages.staticMessage()); | 145 printOut(YouveGotMessages.staticMessage()); |
| 146 printOut(notAlwaysTranslated()); | 146 printOut(notAlwaysTranslated()); |
| 147 printOut(originalNotInBMP()); | 147 printOut(originalNotInBMP()); |
| 148 printOut(escapable()); | 148 printOut(escapable()); |
| 149 | 149 |
| 150 printOut(thing.plurals(0)); | 150 printOut(thing.plurals(0)); |
| 151 printOut(thing.plurals(1)); | 151 printOut(thing.plurals(1)); |
| 152 printOut(thing.plurals(2)); | 152 printOut(thing.plurals(2)); |
| 153 printOut(thing.plurals(3)); |
| 154 printOut(thing.plurals(4)); |
| 155 printOut(thing.plurals(5)); |
| 156 printOut(thing.plurals(6)); |
| 157 printOut(thing.plurals(7)); |
| 158 printOut(thing.plurals(8)); |
| 159 printOut(thing.plurals(9)); |
| 160 printOut(thing.plurals(10)); |
| 161 printOut(thing.plurals(11)); |
| 162 printOut(thing.plurals(20)); |
| 163 printOut(thing.plurals(100)); |
| 164 printOut(thing.plurals(101)); |
| 165 printOut(thing.plurals(100000)); |
| 153 var alice = new Person("Alice", "female"); | 166 var alice = new Person("Alice", "female"); |
| 154 var bob = new Person("Bob", "male"); | 167 var bob = new Person("Bob", "male"); |
| 155 var cat = new Person("cat", null); | 168 var cat = new Person("cat", null); |
| 156 printOut(thing.whereTheyWent(alice, "house")); | 169 printOut(thing.whereTheyWent(alice, "house")); |
| 157 printOut(thing.whereTheyWent(bob, "house")); | 170 printOut(thing.whereTheyWent(bob, "house")); |
| 158 printOut(thing.whereTheyWent(cat, "litter box")); | 171 printOut(thing.whereTheyWent(cat, "litter box")); |
| 159 printOut(thing.nested([alice, bob], "magasin")); | 172 printOut(thing.nested([alice, bob], "magasin")); |
| 160 printOut(thing.nested([alice], "magasin")); | 173 printOut(thing.nested([alice], "magasin")); |
| 161 printOut(thing.nested([], "magasin")); | 174 printOut(thing.nested([], "magasin")); |
| 162 printOut(thing.nested([bob, bob], "magasin")); | 175 printOut(thing.nested([bob, bob], "magasin")); |
| (...skipping 17 matching lines...) Expand all Loading... |
| 180 var fr = new Intl("fr"); | 193 var fr = new Intl("fr"); |
| 181 var english = new Intl("en_US"); | 194 var english = new Intl("en_US"); |
| 182 var de = new Intl("de_DE"); | 195 var de = new Intl("de_DE"); |
| 183 // Throw in an initialize of a null locale to make sure it doesn't throw. | 196 // Throw in an initialize of a null locale to make sure it doesn't throw. |
| 184 initializeMessages(null); | 197 initializeMessages(null); |
| 185 var f1 = initializeMessages(fr.locale).then((_) => printStuff(fr)); | 198 var f1 = initializeMessages(fr.locale).then((_) => printStuff(fr)); |
| 186 var f2 = initializeMessages(de.locale).then((_) => printStuff(de)); | 199 var f2 = initializeMessages(de.locale).then((_) => printStuff(de)); |
| 187 printStuff(english); | 200 printStuff(english); |
| 188 return Future.wait([f1, f2]); | 201 return Future.wait([f1, f2]); |
| 189 } | 202 } |
| OLD | NEW |