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

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

Issue 23241004: Remove prefixes on Intl.message calls within Intl.dart (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 4 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/intl/lib/intl.dart
diff --git a/pkg/intl/lib/intl.dart b/pkg/intl/lib/intl.dart
index e91c2b22a040d038d76deb37194002068f2c9443..a15abedd8f47405c9276b54336f64c117af59a55 100644
--- a/pkg/intl/lib/intl.dart
+++ b/pkg/intl/lib/intl.dart
@@ -249,8 +249,8 @@ class Intl {
// top-level message, so look up our translation by calling Intl.message
// with ourselves as an argument.
if (name != null) {
- return Intl.message(
- Intl.plural(howMany,
+ return message(
+ plural(howMany,
zero: zero, one: one, two: two, few: few, many: many, other: other),
name: name,
args: args,
@@ -273,10 +273,10 @@ class Intl {
}
/**
- * Format a message differently depending on [gender]. Normally used as part
- * of an Intl.message message that is to be translated.
+ * Format a message differently depending on [targetGender]. Normally used as
+ * part of an Intl.message message that is to be translated.
*/
- static String gender(String gender,
+ static String gender(String targetGender,
{String male, String female, String other,
String desc, Map examples, String locale, String name,
List<String>args}) {
@@ -284,8 +284,8 @@ class Intl {
// top-level message, so look up our translation by calling Intl.message
// with ourselves as an argument.
if (name != null) {
- return Intl.message(
- Intl.gender(gender, male: male, female: female, other: other),
+ return message(
+ gender(targetGender, male: male, female: female, other: other),
name: name,
args: args,
locale: locale);
@@ -294,7 +294,7 @@ class Intl {
if (other == null) {
throw new ArgumentError("The 'other' named argument must be specified");
}
- switch(gender) {
+ switch(targetGender) {
case "female" : return female == null ? other : female;
case "male" : return male == null ? other : male;
default: return other;
@@ -314,8 +314,8 @@ class Intl {
// top-level message, so look up our translation by calling Intl.message
// with ourselves as an argument.
if (name != null) {
- return Intl.message(
- Intl.select(choice, cases),
+ return message(
+ select(choice, cases),
name: name,
args: args,
locale: locale);
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698