update translation
update labels default in task scheduler fix default values in initial data and fix problem with interval weeks update user in commands crons remove po_to_json Remove Gem to_po_json Fix scheduler with months and years fix command calculateApp
This commit is contained in:
29
Rakefile
29
Rakefile
@@ -1,16 +1,5 @@
|
||||
require 'rubygems'
|
||||
require 'json'
|
||||
require "po_to_json"
|
||||
|
||||
class PoToJson
|
||||
def _generate_for_json(language, overwrite = {})
|
||||
@options = parse_options(overwrite.merge(language: language))
|
||||
#parse_document
|
||||
#@parsed ||= inject_meta(parse_document)
|
||||
generated = build_json_for(parse_document)
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
desc "Default Task - Build Library"
|
||||
task :default => [:required] do
|
||||
@@ -79,16 +68,6 @@ task :build => [:required] do
|
||||
mafeHash = getHash(Dir.pwd + "/vendor/colosa/MichelangeloFE")
|
||||
pmdynaformHash = getHash(Dir.pwd + "/vendor/colosa/pmDynaform")
|
||||
|
||||
puts "Building PO to JSON".cyan
|
||||
|
||||
Dir["#{Dir.pwd}/workflow/engine/content/translations/*.po"].each do |file|
|
||||
lang = file.split('.')
|
||||
json_string = PoToJson.new(file)._generate_for_json(lang[1], :pretty => true)
|
||||
File.open("#{Dir.pwd}/workflow/public_html/translations/#{lang[1]}.json",'w').write(json_string)
|
||||
puts file
|
||||
end
|
||||
|
||||
|
||||
puts "Building file: Task Scheduler".cyan
|
||||
system "npm run build --prefix #{Dir.pwd}/vendor/colosa/taskscheduler"
|
||||
system "cp -Rf #{Dir.pwd}/vendor/colosa/taskscheduler/taskscheduler #{targetDir}/taskscheduler"
|
||||
@@ -490,12 +469,4 @@ end
|
||||
def getLog
|
||||
output = `git log -30 --pretty='[%cr] %h %d %s <%an>' --no-merges`
|
||||
return output
|
||||
end
|
||||
|
||||
def generate_for_json()
|
||||
@overwrite = {pretty: false}
|
||||
@options = parse_options(overwrite.merge(language: 'en'))
|
||||
@parsed ||= inject_meta(parse_document)
|
||||
|
||||
generated = build_json_for(build_json_for(@parsed))
|
||||
end
|
||||
Reference in New Issue
Block a user