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 +4 -4
- data/README.md +20 -0
- data/lib/icapps/translations/import/xcode.rb +2 -1
- data/lib/icapps/translations/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 2a339e7881726b7a7bf09c35539b750e34de185d
|
4
|
+
data.tar.gz: b900ece200409794b634844585a6c1fcf92319c5
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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
|
-
|
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
|
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.
|
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:
|
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.
|
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.
|