localio 0.0.3 → 0.0.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +6 -2
- data/lib/localio/version.rb +1 -1
- data/lib/localio/writers/ios_writer.rb +5 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 540f6dc0ecdf7b06651818a6d9a954a68108c2de
|
4
|
+
data.tar.gz: c3c81e794cf70ecdadbaf31c2a66d1bdc002da8e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3e3160c96af5755ceae63bad27328243445b111986612089a6fece86bb06add60fbb6a1b7bfed258f2659294de1f2f21dbdb53aa07c2269ef03873a144fdb1a4
|
7
|
+
data.tar.gz: 0cb0946fba47cff7026cbc06765d0b9d472c9394e9eedf7eb39a66a1f0a855c88bce4963ced6a0032b2ac6588065774e21032f9f7c9ebe46c5747e33dedc4ea9
|
data/README.md
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
# Localio
|
2
2
|
|
3
|
-
Localio generates automatically localizable files for many platforms like Rails, Android, iOS,
|
3
|
+
Localio generates automatically localizable files for many platforms like Rails, Android, iOS, and JSON files using a centralized spreadsheet as source. The spreadsheet can be in Google Drive or a simple local Excel file.
|
4
4
|
|
5
5
|
## Installation
|
6
6
|
|
@@ -26,7 +26,9 @@ In your Locfile directory you can then execute
|
|
26
26
|
localize
|
27
27
|
````
|
28
28
|
|
29
|
-
and your localizable files will be created with the parameters specified in the Locfile.
|
29
|
+
and your localizable files will be created with the parameters specified in the Locfile.
|
30
|
+
|
31
|
+
You can also specify in the first parameter a file with another name, and it will work as well.
|
30
32
|
|
31
33
|
### The Spreadsheet
|
32
34
|
|
@@ -34,6 +36,8 @@ You will need a little spreadsheet with all the localization literals and their
|
|
34
36
|
|
35
37
|
There is a basic example in this Google Drive link: [https://docs.google.com/spreadsheet/ccc?key=0AmX_w4-5HkOgdFFoZ19iSUlRSERnQTJ4NVZiblo2UXc&usp=sharing](https://docs.google.com/spreadsheet/ccc?key=0AmX_w4-5HkOgdFFoZ19iSUlRSERnQTJ4NVZiblo2UXc&usp=sharing). You just have to duplicate and save to your account, or download and save it as XLS file.
|
36
38
|
|
39
|
+
**NOTE** Localio will only search for translations on the first worksheet of the spreadsheet.
|
40
|
+
|
37
41
|
### Locfile
|
38
42
|
|
39
43
|
A minimal `Locfile` example could be:
|
data/lib/localio/version.rb
CHANGED
@@ -23,7 +23,7 @@ class IosWriter
|
|
23
23
|
segments.segments << segment
|
24
24
|
|
25
25
|
unless term.is_comment?
|
26
|
-
constant_key =
|
26
|
+
constant_key = ios_constant_formatter term.keyword
|
27
27
|
constant_value = key
|
28
28
|
constant_segment = Segment.new(constant_key, constant_value, lang)
|
29
29
|
constant_segments.segments << constant_segment
|
@@ -45,4 +45,8 @@ class IosWriter
|
|
45
45
|
def self.ios_key_formatter(key)
|
46
46
|
'_'+key.space_to_underscore.strip_tag.capitalize
|
47
47
|
end
|
48
|
+
|
49
|
+
def self.ios_constant_formatter(key)
|
50
|
+
'kLocale'+key.space_to_underscore.strip_tag.camel_case
|
51
|
+
end
|
48
52
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: localio
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Nacho Lopez
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2013-09-
|
11
|
+
date: 2013-09-04 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rspec
|