Class: Fastlane::Actions::ExportLocalizationsAction

Inherits:
Action
  • Object
show all
Defined in:
lib/fastlane/plugin/localization/actions/export_localizations_action.rb

Class Method Summary collapse

Class Method Details

.authorsObject



17
18
19
# File 'lib/fastlane/plugin/localization/actions/export_localizations_action.rb', line 17

def self.authors
  ["vmalyi"]
end

.available_optionsObject



21
22
23
24
25
26
27
28
29
30
31
32
33
34
# File 'lib/fastlane/plugin/localization/actions/export_localizations_action.rb', line 21

def self.available_options
  [
     FastlaneCore::ConfigItem.new(key: :destination_path,
                             env_name: "DESTINATION_PATH",
                          description: "Destination path where XLIFF will be exported to",
                             optional: false,
                                 type: String),
     FastlaneCore::ConfigItem.new(key: :project,
                             env_name: "PROJECT",
                          description: "Project to export localizations from",
                             optional: false,
                                 type: String),
  ]
end

.descriptionObject



13
14
15
# File 'lib/fastlane/plugin/localization/actions/export_localizations_action.rb', line 13

def self.description
  "Export app localizations with help of xcodebuild -exportLocalizations tool"
end

.is_supported?(platform) ⇒ Boolean

Returns:

  • (Boolean)


36
37
38
# File 'lib/fastlane/plugin/localization/actions/export_localizations_action.rb', line 36

def self.is_supported?(platform)
    true
end

.run(params) ⇒ Object



4
5
6
7
8
9
10
11
# File 'lib/fastlane/plugin/localization/actions/export_localizations_action.rb', line 4

def self.run(params)
  destination_path = params[:destination_path]
  project = params[:project]

  UI.message("Exporting localizations from #{project} to #{destination_path} folder")

  sh "xcodebuild -exportLocalizations -localizationPath #{destination_path} -project #{project}"
end