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

Version Path
faalis-0.26.3 lib/tasks/faalis_tasks.rake
faalis-0.26.2 lib/tasks/faalis_tasks.rake
faalis-0.26.1 lib/tasks/faalis_tasks.rake
faalis-0.26.0 lib/tasks/faalis_tasks.rake
faalis-0.25.1 lib/tasks/faalis_tasks.rake
faalis-0.25.0 lib/tasks/faalis_tasks.rake
faalis-0.24.4 lib/tasks/faalis_tasks.rake
faalis-0.24.3 lib/tasks/faalis_tasks.rake
faalis-0.24.2 lib/tasks/faalis_tasks.rake
faalis-0.24.0 lib/tasks/faalis_tasks.rake
faalis-0.23.0 lib/tasks/faalis_tasks.rake
faalis-0.22.0 lib/tasks/faalis_tasks.rake
faalis-0.21.1 lib/tasks/faalis_tasks.rake
faalis-0.21.0 lib/tasks/faalis_tasks.rake
faalis-0.20.0 lib/tasks/faalis_tasks.rake
faalis-0.19.0 lib/tasks/faalis_tasks.rake
faalis-0.18.1 lib/tasks/faalis_tasks.rake
faalis-0.18.0 lib/tasks/faalis_tasks.rake
faalis-0.17.0 lib/tasks/faalis_tasks.rake
faalis-0.16.3 lib/tasks/faalis_tasks.rake