require "pathname" BUILD_DIR = Pathname("build") LOCALE_DIR = Pathname("trans") TRANS_DIR = Pathname("translate") PSEUDO_LANG = "ach" CROWDIN_SNIPPET = < var _jipt = []; _jipt.push(['project', 'joinplume']); _jipt.push(['escape', function() { window.location.href = 'https://joinplu.me'; }]); EOS class Pathname alias to_str to_s end task :default => [:build_trans, :build_site] desc "Build site" task :build_site => [:build_base, "crowdin:download"] do Pathname.glob("#{LOCALE_DIR}/**/*.html").select(&:file?).each do |path| content = path.read content.sub! /