localio 0.0.3 → 0.0.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 2ab1bb80d6ff76d09f5a49870da6def8a557327c
4
- data.tar.gz: 0d5ac9d5fbeacb0ae31ea0bffcb7ba5ad0e192e8
3
+ metadata.gz: 540f6dc0ecdf7b06651818a6d9a954a68108c2de
4
+ data.tar.gz: c3c81e794cf70ecdadbaf31c2a66d1bdc002da8e
5
5
  SHA512:
6
- metadata.gz: cfaeda3f347fef27740843416e499de7e0e634ab3cdece0c0bfd03ada9e789cd32bdbd6736a7469d847a911acc19ec85c33e3db614d0a8c4f7f5913aea055a25
7
- data.tar.gz: ed4cc7851740012f89fedfcaeb00083d33cfd61a6f4e49f2fc49fc47328ee9439fa0d85d0126c58a625dbb13ba95c3d6479e15d42e14220a27641611a42d872b
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, etc., using a centralized spreadsheet as source. The spreadsheet can be from Google Drive or a simple Excel file.
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:
@@ -1,3 +1,3 @@
1
1
  module Localio
2
- VERSION = "0.0.3"
2
+ VERSION = "0.0.4"
3
3
  end
@@ -23,7 +23,7 @@ class IosWriter
23
23
  segments.segments << segment
24
24
 
25
25
  unless term.is_comment?
26
- constant_key = 'kLocale' + Formatter.format(term.keyword, :camel_case, nil)
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.3
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-02 00:00:00.000000000 Z
11
+ date: 2013-09-04 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rspec