lib/i18n/backend/transliterator.rb in i18n-0.6.3 vs lib/i18n/backend/transliterator.rb in i18n-0.6.4
- old
+ new
@@ -1,8 +1,6 @@
# encoding: utf-8
-require 'i18n/core_ext/string/encoding'
-
module I18n
module Backend
module Transliterator
DEFAULT_REPLACEMENT_CHAR = "?"
@@ -89,14 +87,12 @@
@approximations ||= {}
end
# Add transliteration rules to the approximations hash.
def add(hash)
- hash.keys.each do |key|
- utf8_key = key.to_s.dup.force_encoding('UTF-8')
- hash[utf8_key] = hash.delete(key).to_s
+ hash.each do |key, value|
+ approximations[key.to_s] = value.to_s
end
- approximations.merge! hash
end
end
end
end
end
\ No newline at end of file