old/lib/RubyExt/Localization/Object.rb in ruby-ext-0.2.16 vs old/lib/RubyExt/Localization/Object.rb in ruby-ext-0.4.0
- old
+ new
@@ -1,19 +1,19 @@
class Object
- def to_l string, binding = nil
- lang = RubyExt::Localization.language
- unless lang == RubyExt::Localization::DEFAULT_LANGUAGE
- aself = self.respond_to(:localization_self) || self
- aclass = (aself.class == Class or aself.class == Module) ? aself : aself.class
-
- localization = aclass.localization lang
- if localization and localization.include? string
- string = localization[string]
- else
- RubyExt::Localization.log.warn("Not localized: '#{aclass.name}' '#{string}'!")
- end
- end
-
- string = string.interpolate binding if binding
- return string
- end
+ def to_l string, binding = nil
+ lang = RubyExt::Localization.language
+ unless lang == RubyExt::Localization::DEFAULT_LANGUAGE
+ aself = self.respond_to(:localization_self) || self
+ aclass = (aself.class == Class or aself.class == Module) ? aself : aself.class
+
+ localization = aclass.localization lang
+ if localization and localization.include? string
+ string = localization[string]
+ else
+ RubyExt::Localization.log.warn("Not localized: '#{aclass.name}' '#{string}'!")
+ end
+ end
+
+ string = string.interpolate binding if binding
+ return string
+ end
end
\ No newline at end of file