lib/review/i18n.rb in review-1.7.2 vs lib/review/i18n.rb in review-2.0.0.beta1
- old
+ new
@@ -36,11 +36,11 @@
I18n.setup(locale)
end
end
class << self
- alias_method :v, :t ## for EPUBMaker backward compatibility
+ alias v t ## for EPUBMaker backward compatibility
end
def self.update(user_i18n, locale = nil)
@i18n.update(user_i18n, locale)
end
@@ -63,14 +63,10 @@
def update_localefile(path)
user_i18n = YAML.load_file(path)
locale = user_i18n["locale"]
if locale
user_i18n.delete("locale")
- if @store[locale]
- @store[locale].merge!(user_i18n)
- else
- @store[locale] = user_i18n
- end
+ @store[locale].merge!(user_i18n)
else
user_i18n.each do |key, values|
raise KeyError, "Invalid locale file: #{path}" unless values.kind_of? Hash
@store[key].merge!(values)
end