localio 0.0.7 → 0.0.8

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: 61f4ea2bba9a06ef18ee6e890b1c16b26963cd52
4
- data.tar.gz: a2ad832421307568af82725ffa7212343d92bd23
3
+ metadata.gz: 4a46bd0b7b52240cbcaf00ebf31a4b21a20b9ac8
4
+ data.tar.gz: c2e547d7b8490a610f609872881b2b6cf889e929
5
5
  SHA512:
6
- metadata.gz: b6e0a0198dee04dd09566dab033f9f27d2a9feb10c49a12bee13c501b38646ead4ae298d3c56825323fec81e9383ebd4fe700fbc545f8f4e0f9747513f0ebd23
7
- data.tar.gz: dd82c6e5f5df3d221f0e57827dc62b118462b08b805be7c3c07f668e2feb5a7c78d193c0bab0459e18ff110986e0d3ccd9e48ff8943513319ee9f5b51b7b8f7e
6
+ metadata.gz: 1f0e89a33668a70136c506102c405f531cf3958f1f23bbc228d943688bd16f799280f6ceda1ed20d1b0afb4a054fe980f168210c51891c868e786d1b9b1b5ea8
7
+ data.tar.gz: 7d58c5f8c9fdf69065d88b0938d9dbd8e2f41f5f7d9542476c87bfb6aa5eff5c893c4b275fa6bf024dee907ba4382985b949f7915e4c7b126c938a3b57e45867
data/.gitignore CHANGED
@@ -1,3 +1,4 @@
1
+ .DS_Store
1
2
  *.gem
2
3
  *.rbc
3
4
  .bundle
data/README.md CHANGED
@@ -18,7 +18,7 @@ Or install it yourself as:
18
18
 
19
19
  ## Usage
20
20
 
21
- You have to create a custom file, Locfile, similar to Rakefile or Gemfile, with some information for this to work. Also you must have some spreadsheet with a particular format, either in Google Drive or in XLS format.
21
+ You have to create a custom file, Locfile, similar to Rakefile or Gemfile, with some information for this to work. Also you must have some spreadsheet with a particular format, either in Google Drive or in Excel (XLS or XLSX) format.
22
22
 
23
23
  In your Locfile directory you can then execute
24
24
 
@@ -122,7 +122,16 @@ source :xls,
122
122
 
123
123
  ##### XLSX
124
124
 
125
- Currently XLSX is not supported though the code is there (not tested, though) and it will be included in a future release.
125
+ `source :xlsx` will use a local XLSX file. In the parameter's hash you should specify a `:path`.
126
+
127
+ Option | Description
128
+ ----------------------------|-------------------------------------------------------------------------
129
+ `:path` | (Req.) Path for your XLSX file.
130
+
131
+ ````ruby
132
+ source :xlsx,
133
+ :path => 'YourExcelFileWithTranslations.xlsx'
134
+ ````
126
135
 
127
136
  #### Key formatters
128
137
 
@@ -4,7 +4,7 @@ class Segment
4
4
 
5
5
  def initialize(key, translation, language)
6
6
  @key = key
7
- @translation = translation
7
+ @translation = translation.replace_escaped
8
8
  @language = language
9
9
  end
10
10
 
@@ -34,6 +34,10 @@ class String
34
34
  def space_to_underscore
35
35
  self.gsub(' ', '_')
36
36
  end
37
+
38
+ def replace_escaped
39
+ self.gsub("`+", "+").gsub("`=","=").gsub("\\+", "+").gsub("\\=","=")
40
+ end
37
41
 
38
42
  def camel_case
39
43
  return self if self !~ /_/ && self =~ /[A-Z]+.*/
@@ -1,3 +1,3 @@
1
1
  module Localio
2
- VERSION = "0.0.7"
2
+ VERSION = "0.0.8"
3
3
  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.7
4
+ version: 0.0.8
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-11-16 00:00:00.000000000 Z
11
+ date: 2013-11-18 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rspec
@@ -117,7 +117,6 @@ executables:
117
117
  extensions: []
118
118
  extra_rdoc_files: []
119
119
  files:
120
- - .DS_Store
121
120
  - .gitignore
122
121
  - CONTRIBUTING.md
123
122
  - Gemfile
@@ -171,7 +170,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
171
170
  version: '0'
172
171
  requirements: []
173
172
  rubyforge_project:
174
- rubygems_version: 2.1.10
173
+ rubygems_version: 2.0.6
175
174
  signing_key:
176
175
  specification_version: 4
177
176
  summary: Automatic Localizable file generation for multiple type of files, like Android
data/.DS_Store DELETED
Binary file