class Lokale::Action

Attributes

arg[RW]
type[RW]

Public Class Methods

add_to_proj() click to toggle source
# File lib/lokale/config.rb, line 19
def self.add_to_proj;      Action.new(:add_to_proj)     end
append() click to toggle source
# File lib/lokale/config.rb, line 15
def self.append;           Action.new(:append)          end
copy_base() click to toggle source
# File lib/lokale/config.rb, line 14
def self.copy_base;        Action.new(:copy_base)       end
create_config() click to toggle source
# File lib/lokale/config.rb, line 18
def self.create_config;    Action.new(:create_config)   end
export() click to toggle source
# File lib/lokale/config.rb, line 16
def self.export;           Action.new(:export)          end
import() click to toggle source
# File lib/lokale/config.rb, line 17
def self.import;           Action.new(:import)          end
new(type) click to toggle source
# File lib/lokale/config.rb, line 9
def initialize(type)
  @type = type
end
summary() click to toggle source
# File lib/lokale/config.rb, line 13
def self.summary;          Action.new(:summary)         end

Public Instance Methods

perform(agent, reporter) click to toggle source
# File lib/lokale.rb, line 15
def perform(agent, reporter)
  send(("perform_" + @type.to_s).to_sym, agent, reporter)
end
perform_add_to_proj(agent, reporter) click to toggle source
# File lib/lokale.rb, line 49
def perform_add_to_proj(agent, reporter)
  print "Creating project file...".blue
  agent.write_to_project_file
end
perform_append(agent, reporter) click to toggle source
# File lib/lokale.rb, line 29
def perform_append(agent, reporter)
  print "Appending new macro calls to localization files...".blue
  agent.append_new_macro_calls
end
perform_copy_base(agent, reporter) click to toggle source
# File lib/lokale.rb, line 24
def perform_copy_base(agent, reporter)
  print "Copying `en` strings files to `Base`...".blue
  agent.copy_base
end
perform_create_config(agent, reporter) click to toggle source
# File lib/lokale.rb, line 44
def perform_create_config(agent, reporter)
  print "Creating config file...".blue
  Config.get.create_default_file
end
perform_export(agent, reporter) click to toggle source
# File lib/lokale.rb, line 34
def perform_export(agent, reporter)
  print "Preparing xliff files with new localized strings...".blue
  agent.export_xliffs
end
perform_import(agent, reporter) click to toggle source
# File lib/lokale.rb, line 39
def perform_import(agent, reporter)
  print "Attempting to import new strings...".blue
  agent.try_to_import
end
perform_summary(agent, reporter) click to toggle source
# File lib/lokale.rb, line 19
def perform_summary(agent, reporter)
  print "Printing summary...".blue
  reporter.print_summary
end
print(str) click to toggle source