10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
|
# File 'lib/transync/sync/init.rb', line 10
def run
@config['FILES'].each do |file|
worksheet = TransyncConfig.worksheets.detect{ |s| s.title == file }
if worksheet.nil?
worksheet = TransyncConfig.spreadsheet.add_worksheet(file)
puts "\u{2713} adding '#{file}' worksheet to spreadsheet with first row (key and languages)".colorize(:green)
end
worksheet[1, 1] = 'Key'
@config['LANGUAGES'].each_with_index do |language, index|
worksheet[1, index + 2] = language.upcase
end
worksheet.save
end
TransyncConfig.re_init
sync = TranslationSync.new(@path, 'x2g')
sync.run('x2g')
end
|