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

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

Issue 12733003: Adds facilities for extracting Intl.message calls and generating code from translations (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 9 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/lib/intl.dart
diff --git a/pkg/intl/lib/intl.dart b/pkg/intl/lib/intl.dart
index 18af6a7fcf8bd72913f8d274d118903d5e3e86b7..502b00210c3996ca06d9eddadac6ddeaaf4fe65e 100644
--- a/pkg/intl/lib/intl.dart
+++ b/pkg/intl/lib/intl.dart
@@ -47,7 +47,7 @@ part 'bidi_utils.dart';
* examples: {'date' : 'June 8, 2012'});
* print(today(new DateTime.now());
*
- * msg({num_people, place}) => Intl.message(
+ * msg(num_people, place) => Intl.message(
Emily Fortuna 2013/03/13 18:54:43 So now we can take an arbitrary number of paramete
Alan Knight 2013/03/14 17:49:05 Yes, it can take an arbitrary number. I'm using Fu
Emily Fortuna 2013/03/14 19:45:00 sgtm.
* '''I see ${Intl.plural(num_people,
* {'0': 'no one at all',
* '1': 'one other person',
@@ -128,7 +128,7 @@ class Intl {
* will be extracted automatically but for the time being it must be passed
* explicitly in the [name] and [args] arguments.
*/
- static Future<String> message(String message_str, {final String desc: '',
+ static message(String message_str, {final String desc: '',
Emily Fortuna 2013/03/13 18:54:43 should the return type here be a String?
Alan Knight 2013/03/14 17:49:05 Oh yeah, right. Got so caught up in it having been
final Map examples: const {}, String locale, String name,
List<String> args}) {
return messageLookup.lookupMessage(
@@ -271,4 +271,6 @@ class Intl {
if (_defaultLocale == null) _defaultLocale = systemLocale;
return _defaultLocale;
}
+
+ toString() => "Intl($locale)";
}

Powered by Google App Engine
This is Rietveld 408576698