lib/i18n_screwdriver.rb in i18n_screwdriver-0.4.0 vs lib/i18n_screwdriver.rb in i18n_screwdriver-0.5.0
- old
+ new
@@ -1,28 +1,15 @@
-# encoding: utf-8
-
-require 'action_view'
-require 'action_controller'
-require 'i18n/screwdriver/scanner'
-
module I18n
module Screwdriver
def self.included(klass)
klass.send :include, InstanceMethods
end
module InstanceMethods
def _(translation)
# the . is a special character in rails i18n - we have to strip it
translation_without_dot = translation.gsub(/\./, '').strip
- translated = I18n.translate(translation_without_dot)
-
- if defined?(Rails) && Rails.env.development? && translated.start_with?('translation missing')
- # TODO: add translation with key to all translation files
- # so that rake task is obsolete - instant feedback!
- end
-
- translated
+ I18n.translate("#{translation_without_dot}")
end
end
end
end
\ No newline at end of file