2 # Translations are simple value objects that carry some context information
3 # alongside the actual translation string.
5 class Translation < String
6 class Attribute < Translation
7 attr_accessor :requested_locale, :locale, :key
10 class Static < Translation
11 attr_accessor :requested_locale, :locale, :key, :options, :plural_key, :original
13 def initialize(string, meta = nil)
14 self.original = string
19 def initialize(string, meta = nil)
25 locale.to_sym != requested_locale.to_sym
29 meta.each {|name, value| send :"#{name}=", value } if meta