| 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 160 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 171 print(nestedSelect("CDN", 2)); | 171 print(nestedSelect("CDN", 2)); |
| 172 }); | 172 }); |
| 173 } | 173 } |
| 174 | 174 |
| 175 var localeToUse = 'en_US'; | 175 var localeToUse = 'en_US'; |
| 176 | 176 |
| 177 main() { | 177 main() { |
| 178 var fr = new Intl("fr"); | 178 var fr = new Intl("fr"); |
| 179 var english = new Intl("en_US"); | 179 var english = new Intl("en_US"); |
| 180 var de = new Intl("de_DE"); | 180 var de = new Intl("de_DE"); |
| 181 // Throw in an initialize of a null locale to make sure it doesn't throw. |
| 182 initializeMessages(null); |
| 181 initializeMessages(fr.locale).then((_) => printStuff(fr)); | 183 initializeMessages(fr.locale).then((_) => printStuff(fr)); |
| 182 initializeMessages(de.locale).then((_) => printStuff(de)); | 184 initializeMessages(de.locale).then((_) => printStuff(de)); |
| 183 printStuff(english); | 185 printStuff(english); |
| 184 } | 186 } |
| OLD | NEW |