aboutsummaryrefslogtreecommitdiffstats
path: root/railties/doc/guides
diff options
context:
space:
mode:
authorGeorge Ogata <george.ogata@gmail.com>2009-01-22 12:08:00 +1100
committerGeorge Ogata <george.ogata@gmail.com>2009-01-22 12:08:00 +1100
commite89138a31b7c0bcf94d4c11b1f47af3d4f57024c (patch)
tree9c265285d829bfb8dfc45b32dcb5eea8b49ed0ed /railties/doc/guides
parent986a7c620c8e1e2839fbc8f5727470aa23c195c4 (diff)
downloadrails-e89138a31b7c0bcf94d4c11b1f47af3d4f57024c.tar.gz
rails-e89138a31b7c0bcf94d4c11b1f47af3d4f57024c.tar.bz2
rails-e89138a31b7c0bcf94d4c11b1f47af3d4f57024c.zip
Update interpolations in i18n guide.
Value is available for all messages, and count for some of the numericality ones.
Diffstat (limited to 'railties/doc/guides')
-rw-r--r--railties/doc/guides/source/i18n.txt30
1 files changed, 15 insertions, 15 deletions
diff --git a/railties/doc/guides/source/i18n.txt b/railties/doc/guides/source/i18n.txt
index e80de7adc9..25abac7f4c 100644
--- a/railties/doc/guides/source/i18n.txt
+++ b/railties/doc/guides/source/i18n.txt
@@ -524,11 +524,11 @@ This way you can provide special translations for various error messages at diff
==== Error message interpolation
-The translated model name and translated attribute name are always available for interpolation.
+The translated model name, translated attribute name, and value are always available for interpolation.
So, for example, instead of the default error message "can not be blank" you could use the attribute name like this: "Please fill in your {{attribute}}".
-count and/or value are available where applicable. Count can be used for pluralization if present:
+count, where available, can be used for pluralization if present:
|=====================================================================================================
| validation | with option | message | interpolation
@@ -540,19 +540,19 @@ count and/or value are available where applicable. Count can be used for plurali
| validates_length_of | :is | :wrong_length | count
| validates_length_of | :minimum | :too_short | count
| validates_length_of | :maximum | :too_long | count
-| validates_uniqueness_of | - | :taken | value
-| validates_format_of | - | :invalid | value
-| validates_inclusion_of | - | :inclusion | value
-| validates_exclusion_of | - | :exclusion | value
-| validates_associated | - | :invalid | value
-| validates_numericality_of | - | :not_a_number | value
-| validates_numericality_of | :greater_than | :greater_than | value
-| validates_numericality_of | :greater_than_or_equal_to | :greater_than_or_equal_to | value
-| validates_numericality_of | :equal_to | :equal_to | value
-| validates_numericality_of | :less_than | :less_than | value
-| validates_numericality_of | :less_than_or_equal_to | :less_than_or_equal_to | value
-| validates_numericality_of | :odd | :odd | value
-| validates_numericality_of | :even | :even | value
+| validates_uniqueness_of | - | :taken | -
+| validates_format_of | - | :invalid | -
+| validates_inclusion_of | - | :inclusion | -
+| validates_exclusion_of | - | :exclusion | -
+| validates_associated | - | :invalid | -
+| validates_numericality_of | - | :not_a_number | -
+| validates_numericality_of | :greater_than | :greater_than | count
+| validates_numericality_of | :greater_than_or_equal_to | :greater_than_or_equal_to | count
+| validates_numericality_of | :equal_to | :equal_to | count
+| validates_numericality_of | :less_than | :less_than | count
+| validates_numericality_of | :less_than_or_equal_to | :less_than_or_equal_to | count
+| validates_numericality_of | :odd | :odd | -
+| validates_numericality_of | :even | :even | -
|=====================================================================================================