fastlane-plugin-xliff_en_gen 0.3.0 → 0.3.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: d54fa6a0a1f79f46b1429f3bcbad0d5031b84d26
4
- data.tar.gz: 377f6155db4039190bc39f0697b664c035ccdeec
3
+ metadata.gz: 8d8183c6a8b7508ff5b180881040482a087c126c
4
+ data.tar.gz: 035331dbbb3ce794a8ef98c412283b3e297398b3
5
5
  SHA512:
6
- metadata.gz: 15e8f13048d26b9ce725cf4c5df858de42ac24280fab733b1a98b00e1de1f1ce74f08ee66b9ce7296052b9ba58586b55ba61da2035eef77fe70cfd8e7a808a87
7
- data.tar.gz: 90d54ea86d4fcd61767e3cd77f0fd521a0a8315095ae3f2d3bdd191cc93e333fd373ec9fd696a885498b1b6a834de5af3b2b7a843387bc2f81546c8dede3d8b0
6
+ metadata.gz: c7aee5bea143b2b77a6a369837ee1290e58495d47f367e4b7bb321daf9ad9652109239dfbc6bc911e2d3806d12de1e65ac1f354418183cbe2f1fdda6a346c2a1
7
+ data.tar.gz: 92e1920ca35169ccd3b370a8a640bd99a18c9bdd19c52dba3a0f4550e4ee43ca842e067c83714ff00756a032f616e7f4fd7fa2f95a2f12395549f4224c40a9aa
@@ -6,6 +6,8 @@ module Fastlane
6
6
 
7
7
  projectPath = File.absolute_path(params[:xcodeproj])
8
8
 
9
+ UI.message("Located project at: "+projectPath)
10
+
9
11
  workingPath = File.dirname(projectPath)
10
12
 
11
13
  dir = File.dirname(projectPath)
@@ -46,16 +48,15 @@ module Fastlane
46
48
 
47
49
  translations.sort! {|x,y| x['id'] <=> y ['id']}
48
50
 
49
-
50
51
  File.open("Localizable.strings", "w"){ |f|
51
52
 
52
- translations.each do |transInfo|
53
+ translations.each do |transInfo|
53
54
 
54
- f.write ('/* ' + transInfo['note'] + ' */' + "\n")
55
- f.write ('"' + transInfo['id'] + '"' + "=" '"' + transInfo['English'] + '";' + "\n")
56
- f.write ("\n")
55
+ f.write ('/* ' + transInfo['note'] + ' */' + "\n")
56
+ f.write ('"' + transInfo['id'] + '"' + "=" '"' + transInfo['English'] + '";' + "\n")
57
+ f.write ("\n")
57
58
 
58
- end
59
+ end
59
60
 
60
61
  }
61
62
 
@@ -64,6 +65,8 @@ module Fastlane
64
65
 
65
66
  FileUtils.mv 'Localizable.strings', localizablePath, :force => true
66
67
 
68
+ UI.message("Localizable moved to: "+localizablePath)
69
+
67
70
  FileUtils.rm xliffPath, :force => true
68
71
 
69
72
  end
@@ -71,7 +74,7 @@ module Fastlane
71
74
 
72
75
 
73
76
  def self.description
74
- "gen Localizable.strings file from xliff"
77
+ "Overwrite project Localizable.strings file from English version xliff"
75
78
  end
76
79
 
77
80
  def self.authors
@@ -83,29 +86,23 @@ module Fastlane
83
86
  end
84
87
 
85
88
  def self.details
86
- # Optional:
87
- "generate new Localizable.strings file based on export en.xliff"
89
+ "Generate new Localizable.strings file based on the exported en.xliff by using xcode build, and over write the file based on the en.xliff.\n This will include nokogiri to parse xml."
88
90
  end
89
91
 
90
92
  def self.available_options
91
93
  [
92
- # FastlaneCore::ConfigItem.new(key: :your_option,
93
- # env_name: "XLIFF_EN_GEN_YOUR_OPTION",
94
- # description: "A description of your option",
95
- # optional: false,
96
- # type: String)
97
94
  FastlaneCore::ConfigItem.new(key: :xcodeproj,
98
95
  env_name: "XLIFF_EN_GEN_PROJECT",
99
96
  description: "Specify the path to your main Xcode project",
100
97
  optional: false,
101
98
  type: String,
102
99
  verify_block: proc do |value|
103
- UI.user_error!("Please use the path to the project") if !value.end_with? ".xcodeproj"
100
+ UI.user_error!("Please specify your project file path") if !value.end_with? ".xcodeproj"
104
101
  UI.user_error!("Could not find Xcode project at path '#{File.expand_path(value)}'") if !File.exist?(value) and !Helper.is_test?
105
102
  end),
106
103
  FastlaneCore::ConfigItem.new(key: :localizable,
107
104
  env_name: "XLIFF_EN_GEN_LOCALIZABLE_PATH",
108
- description: "localizable path to replace",
105
+ description: "localizable.strings path to be replaced",
109
106
  optional: false,
110
107
  type: String,
111
108
  verify_block: proc do |value|
@@ -115,9 +112,6 @@ module Fastlane
115
112
  end
116
113
 
117
114
  def self.is_supported?(platform)
118
- # Adjust this if your plugin only works for a particular platform (iOS vs. Android, for example)
119
- # See: https://github.com/fastlane/fastlane/blob/master/fastlane/docs/Platforms.md
120
- #
121
115
  [:ios, :mac].include?(platform)
122
116
  true
123
117
  end
@@ -1,5 +1,5 @@
1
1
  module Fastlane
2
2
  module XliffEnGen
3
- VERSION = "0.3.0"
3
+ VERSION = "0.3.1"
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: fastlane-plugin-xliff_en_gen
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.0
4
+ version: 0.3.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - alexander sun