Sha256: 328bb13b95a2eeeb2a7644bfed9bce014d2615d42d39b46eccf9d665a16b2bdb
Contents?: true
Size: 983 Bytes
Versions: 25
Compression:
Stored size: 983 Bytes
Contents
namespace :faalis do namespace :js do desc "Collect all the strings which marked for translation from javascript files" task :collect => :environment do `grunt --gruntfile #{Faalis::Engine.root}/lib/tasks/grunt/Gruntfile.js --base #{Faalis::Engine.root}/ nggettext_extract` end desc "Compile all the strings which marked for translation in javascript files" task :compile => :environment do `grunt --gruntfile #{Faalis::Engine.root}/lib/tasks/grunt/Gruntfile.js nggettext_compile` end task :remove_copyright_header do Dir.glob("{app,lib}/**/*.js").each do |file| puts ">> #{file}" c = File.open(file, "r").read c.gsub!(/\/\*.*Faalis.*\USA\.$/mi, "") c.gsub!(/^[\-]+ \*\/$/i, "") File.open(file, "w").write c end end end end namespace :gettext do def files_to_translate Dir.glob("{app,lib,config,locale}/**/*.{rb ,erb,haml,slim,rhtml,js.erb,handlebars.erb }") end end
Version data entries
25 entries across 25 versions & 1 rubygems