icapps-translations 0.2.1 → 0.2.2

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: 7dd2178741324fa58e7936b8807d41bdda6ec28a
4
- data.tar.gz: a86b14558053d326198c1d2dc913e810124249e2
3
+ metadata.gz: 2a339e7881726b7a7bf09c35539b750e34de185d
4
+ data.tar.gz: b900ece200409794b634844585a6c1fcf92319c5
5
5
  SHA512:
6
- metadata.gz: d1df6931a9b3cad88373fd51f62108fa4e4f810d58d61ccb19116a9d7448455cb05b77babb41474abf55831b10eac69ff5dd49e82648ee33d553fe2f91ec493d
7
- data.tar.gz: be7e24477c232b132b4097ff123a2997dd298c50dcee80d30ca24cf83b27bf322d996de73a3e541ddd9370362f4fb053453ea1eb4530bfb53c4fa26e9b342089
6
+ metadata.gz: b7d64f3c033168bd890b4aa29fc8792a7780de12611afe1ac1702dde263a5124769204e1b5171d74acbed6a13f1adf627af7f6396cb36ecfead15b0641b54808
7
+ data.tar.gz: 69e6cdb3a0f2b69a26156c58c4e958050f37279a558cfcccbb7657616463b5962a2f82296cecd23753ee2611bec8c6f1495e53ec26618af03d6d9dc1d5761ec3
data/README.md CHANGED
@@ -25,6 +25,26 @@ Or install it yourself as:
25
25
 
26
26
  _You can pass the `--verbose` parameter to both commands in order to get more detailed information on what is happening._
27
27
 
28
+ ### Xcode
29
+
30
+ The 'translations' gem currently supports the following folder structure for **iOS**:
31
+
32
+ `*/en.lproj/Localizable.strings`
33
+
34
+ In this case the language's short name is 'en' and the filename in the configuration is set to 'Localizable.strings'. The en.lproj folder can be nested inside other folders.
35
+
36
+ ### Android
37
+
38
+ We currently check if the folder has an android project by looking for `.gradle` files. So this is currently the only supported way for Android.
39
+
40
+ The 'translations' gem currently supports the following folder structure for **Android**:
41
+
42
+ `app/src/main/res/values-en/strings.xml`
43
+
44
+ In this case the language's short name is 'en' and the filename in the configuration is set to 'strings.xml'. It's important that this structure is available as defined above. This is currently not configurable.
45
+
46
+ When you have a `default_language` set to 'en' in your configuration file the `values-en` will be `values` instead.
47
+
28
48
  ## Build gem
29
49
 
30
50
  Start by updating the version number in the `lib/icapps/translations/version.rb` file.
@@ -11,7 +11,8 @@ module Icapps
11
11
  def fetch_language_file(language)
12
12
  short_name = language['short_name']
13
13
  puts "[VERBOSE] Fetching #{short_name} translations.".colorize(:white) if options[:verbose]
14
- string_files = Dir.glob("**/#{short_name}.lproj/#{config.filename}")
14
+ # Ignore the .strings files in the Build folder.
15
+ string_files = Dir.glob("**/#{short_name}.lproj/#{config.filename}").reject{ |f| f[%r{^Build/}] }
15
16
  if string_files.count == 0
16
17
  puts "[WARNING] No 'Localizable.string' file found for the #{short_name} language.".colorize(:yellow)
17
18
  elsif string_files.count > 1
@@ -1,5 +1,5 @@
1
1
  module Icapps
2
2
  module Translations
3
- VERSION = '0.2.1'
3
+ VERSION = '0.2.2'
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: icapps-translations
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.1
4
+ version: 0.2.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jelle Vandebeeck
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-10-13 00:00:00.000000000 Z
11
+ date: 2016-01-18 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -110,7 +110,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
110
110
  version: '0'
111
111
  requirements: []
112
112
  rubyforge_project:
113
- rubygems_version: 2.4.3
113
+ rubygems_version: 2.4.5.1
114
114
  signing_key:
115
115
  specification_version: 4
116
116
  summary: Import translations from the iCapps translations portal.