locraft 1.6.5 → 1.6.6

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: 7e2f36b7952612510d81448f0241795dfbf6ade2
4
- data.tar.gz: 96c6cea4b62d7ed53887721d2f8f7edfae80284b
3
+ metadata.gz: 753e103518e93778506565a15194db9e626c9594
4
+ data.tar.gz: 6e1c2cf4d5a4e879bfba2243632196c6cf841c28
5
5
  SHA512:
6
- metadata.gz: 1d520f6ba61314335168db434628fe08a1f0a30f1e7bc587bfd9b240b0d112cc79cdae5da47d6ab01af223787d75f2f44a6cadf0db1175c538cf94343b27605d
7
- data.tar.gz: be59bbe85ea8902c4648d82b65e6aae5a9579b603cde2ea33bd509d5817e511c2ac5b2f7029aa8e15bc3bd7b9de90f097952dc93d8fc163d57bf3fa042ff7c3e
6
+ metadata.gz: 2e07a1ca62f5e9d7d8f88330d1992ae6b01259a86c58542e0fd00d5adcaeb7eeef786e53b969d1547c3ed790619eacaec7db8ecbf04c1e707d721a3efe4f2ead
7
+ data.tar.gz: baf9460c770a6ac3c9cf19200fdc5d41f5b212639a2871f8c4fd0ac6fa811bee8a9faef1c76a155c375f75b6ae0148f5b6b9a66496054d99853e20cc78f0464d
@@ -6,8 +6,8 @@ module Locraft
6
6
  !@config.relative_plist_destination.nil?
7
7
  end
8
8
 
9
- def destination_dir_for(lang)
10
- "#{@config.relative_plist_destination}/#{lang}.lproj"
9
+ def destination_dir_for(_, lang_code)
10
+ "#{@config.relative_plist_destination}/#{lang_code}.lproj"
11
11
  end
12
12
 
13
13
  def valid_localization?(l)
@@ -15,7 +15,7 @@ module Locraft
15
15
  def generate(localizations_hash)
16
16
  @config.langs.each do |lang, lang_code|
17
17
  localizations = localizations_hash[lang].select { |l| valid_localization?(l) }
18
- destination_dir = destination_dir_for(lang_code)
18
+ destination_dir = destination_dir_for(lang, lang_code)
19
19
  file = "#{destination_dir}/#{strings_file}"
20
20
  mkdir_p destination_dir unless Dir.exist?(destination_dir)
21
21
  File.open(file, 'w+') do |f|
@@ -37,8 +37,8 @@ module Locraft
37
37
  Utils.resource_file('strings_template.txt')
38
38
  end
39
39
 
40
- def destination_dir_for(lang)
41
- "#{@config.relative_strings_destination}/#{lang}.lproj"
40
+ def destination_dir_for(_, lang_code)
41
+ "#{@config.relative_strings_destination}/#{lang_code}.lproj"
42
42
  end
43
43
 
44
44
  def strings_file
@@ -6,8 +6,9 @@ module Locraft
6
6
  Utils.resource_file('xml_strings_template.txt')
7
7
  end
8
8
 
9
- def destination_dir_for(lang)
10
- "#{@config.relative_strings_destination}/values-#{lang}"
9
+ def destination_dir_for(lang, lang_code)
10
+ comp = @config.default_lang == lang ? 'values' : "values-#{lang_code}"
11
+ "#{@config.relative_strings_destination}/#{comp}"
11
12
  end
12
13
 
13
14
  def strings_line_with(localization)
@@ -21,4 +22,4 @@ module Locraft
21
22
  puts "xml strings file generated: [#{f}]"
22
23
  end
23
24
  end
24
- end
25
+ end
@@ -1,3 +1,3 @@
1
1
  module Locraft
2
- VERSION = '1.6.5'.freeze
2
+ VERSION = '1.6.6'.freeze
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: locraft
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.6.5
4
+ version: 1.6.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - sroik