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

Unified Diff: pkg/intl/example/basic/messages_th_th.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: Fixes from review comments, also made tests more robust, removed scheduled_test dependency 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/example/basic/messages_th_th.dart
diff --git a/pkg/intl/example/basic/messages_th_th.dart b/pkg/intl/example/basic/messages_th_th.dart
index 899399dad590f53302e52a2a679ea0425c74c9cc..59c98dc316baf2f852ea822e9bc31013c1b4d881 100644
--- a/pkg/intl/example/basic/messages_th_th.dart
+++ b/pkg/intl/example/basic/messages_th_th.dart
@@ -5,13 +5,19 @@
/**
* This is a library that provides messages for a German locale. All the
* messages from the main program should be duplicated here with the same
- * function name. Note that the library name is significant, as it's looked
- * up based on a naming convention.
+ * function name.
*/
-
library messages_th_TH;
-import '../../lib/intl.dart';
+import 'package:intl/intl.dart';
+import 'package:intl/message_lookup_by_library.dart';
+
+final messages = new MessageLookup();
+
+class MessageLookup extends MessageLookupByLibrary {
-runAt(time, day) =>
- Intl.message('วิ่ง $time on $day.', name: 'runAt', args: [time, day]);
+ get localeName => 'th_TH';
+ final messages = {
+ "runAt" : (time, day) => Intl.message('วิ่ง $time on $day.')
+ };
+}

Powered by Google App Engine
This is Rietveld 408576698