lib/i18n_screwdriver.rb in i18n_screwdriver-9.2 vs lib/i18n_screwdriver.rb in i18n_screwdriver-9.3

- old
+ new

@@ -8,12 +8,13 @@ def self.filename_for_locale(locale) File.join("config", "locales", "application.#{locale}.yml") end - def self.generate_key(string) - string = string.strip - (string =~ /^:[a-z][a-z0-9_]*$/) ? string : Digest::MD5.hexdigest(string) + def self.generate_key(source) + return ":#{source}" if source.is_a?(Symbol) + source = source.strip + (source =~ /^:[a-z][a-z0-9_]*$/) ? source : Digest::MD5.hexdigest(source) end def self.file_with_translations_exists?(locale) File.exists?(filename_for_locale(locale)) end