class Fastlane::Actions::ImportLocalizationsAction

Public Class Methods

authors() click to toggle source
# File lib/fastlane/plugin/localization/actions/import_localizations_action.rb, line 17
def self.authors
  ["vmalyi"]
end
available_options() click to toggle source
# File lib/fastlane/plugin/localization/actions/import_localizations_action.rb, line 21
def self.available_options
  [
     FastlaneCore::ConfigItem.new(key: :source_path,
                             env_name: "SOURCE_PATH",
                          description: "Destination path to XLIFF file which will be imported",
                             optional: false,
                                 type: String),
     FastlaneCore::ConfigItem.new(key: :project,
                             env_name: "PROJECT",
                          description: "Project to import localizations to",
                             optional: false,
                                 type: String),
  ]
end
description() click to toggle source
# File lib/fastlane/plugin/localization/actions/import_localizations_action.rb, line 13
def self.description
  "Import app localizations with help of xcodebuild -importLocalizations tool"
end
is_supported?(platform) click to toggle source
# File lib/fastlane/plugin/localization/actions/import_localizations_action.rb, line 36
def self.is_supported?(platform)
    true
end
run(params) click to toggle source
# File lib/fastlane/plugin/localization/actions/import_localizations_action.rb, line 4
def self.run(params)
  source_path = params[:source_path]
  project = params[:project]

  UI.message("Importing localizations from #{source_path} folder to #{project} project")

  sh "xcodebuild -importLocalizations -localizationPath #{source_path} -project #{project}"
end