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

Unified Diff: lib/intl.dart

Issue 1244843002: Allow ClassName_methodName for a message name, easier to disambiguate duplicates (Closed) Base URL: https://github.com/dart-lang/intl.git@master
Patch Set: Created 5 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « README.md ('k') | lib/src/intl_message.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: lib/intl.dart
diff --git a/lib/intl.dart b/lib/intl.dart
index 50ba4310302265ed6f69b5f0a239f2e00a0e13a8..d952691ddc2a84d759f77c50d0b6d207de198863 100644
--- a/lib/intl.dart
+++ b/lib/intl.dart
@@ -138,12 +138,16 @@ class Intl {
* returns the value of this call and provides a scope for the variables that
* will be substituted in the message.
*
- * The parameters are a
- * [message_str] to be translated, which may be interpolated
- * based on one or more variables, the [name] of the message, which should
- * match the enclosing function name, the [args] of the enclosing
- * function, a [desc] providing a description of usage
- * and a map of [examples] for each interpolated variable. For example
+ * The [message_str] is the string to be translated, which may be interpolated
+ * based on one or more variables. The [name] of the message must
+ * match the enclosing function name. For methods, it can also be
+ * className_methodName. So for a method hello in class Simple, the name
+ * can be either "hello" or "Simple_hello". The name must also be globally
+ * unique in the program, so the second form can make it easier to distinguish
+ * messages with the same name but in different classes.
+ * The [args] repeats the arguments of the enclosing
+ * function, [desc] provides a description of usage,
+ * [examples] is a Map of exmaples for each interpolated variable. For example
* hello(yourName) => Intl.message(
* "Hello, $yourName",
* name: "hello",
« no previous file with comments | « README.md ('k') | lib/src/intl_message.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698