xcmultilingual 0.2.2 → 0.2.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +1 -1
- data/README.md +5 -2
- data/bin/rspec +16 -0
- data/{bin → exe}/xcmultilingual +0 -0
- data/lib/xcmultilingual/version.rb +1 -1
- data/xcmultilingual.gemspec +2 -1
- metadata +5 -6
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d902db51daac9d760ac81be7fabcd3c062b52a01
|
4
|
+
data.tar.gz: 96a0db28af23dbd9ff7d9f6bda5735e84501f965
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 9af0edd430e9a40bdbe670056d34ef412794b02d458ba2bae2410838b9e28bbd1a138945b137cd2f7d6be2e17ab9d9807d55711f0bd03197b576a10ac14bcbca
|
7
|
+
data.tar.gz: a9b15493efa486210c7ab99bbc06406d28057b76a714c201d9450d2b6c06fea35bba027e473c36a5ad4d28f709bd47f165c299c859900cf74d85a3b6e1be2ce3
|
data/Gemfile.lock
CHANGED
data/README.md
CHANGED
@@ -75,7 +75,7 @@ struct Multilingual {
|
|
75
75
|
case MONKEY = "MONKEY"
|
76
76
|
|
77
77
|
func string() -> String {
|
78
|
-
return NSLocalizedString(rawValue, tableName:
|
78
|
+
return NSLocalizedString(rawValue, tableName: Animal.name, bundle: NSBundle.mainBundle(), value: rawValue, comment: "")
|
79
79
|
}
|
80
80
|
|
81
81
|
static let name = "Animal"
|
@@ -83,6 +83,7 @@ struct Multilingual {
|
|
83
83
|
static var keys: [String] {
|
84
84
|
return ["CAT", "DOG", "BEAR", "DEER", "SQUIRREL", "ELEPHANT", "GIRAFFE", "TIGER", "LION", "RABBIT", "RHINOCEROS", "GORILLA", "MONKEY"]
|
85
85
|
}
|
86
|
+
|
86
87
|
static var localizations: [String] {
|
87
88
|
return Animal.keys.map { Animal(rawValue: $0)!.string() }
|
88
89
|
}
|
@@ -92,7 +93,7 @@ struct Multilingual {
|
|
92
93
|
case SAMPLE = "SAMPLE"
|
93
94
|
|
94
95
|
func string() -> String {
|
95
|
-
return NSLocalizedString(rawValue, tableName:
|
96
|
+
return NSLocalizedString(rawValue, tableName: SampleSample.name, bundle: Multilingual.bundle("sample.bundle"), value: rawValue, comment: "")
|
96
97
|
}
|
97
98
|
|
98
99
|
static let name = "Sample"
|
@@ -100,11 +101,13 @@ struct Multilingual {
|
|
100
101
|
static var keys: [String] {
|
101
102
|
return ["SAMPLE"]
|
102
103
|
}
|
104
|
+
|
103
105
|
static var localizations: [String] {
|
104
106
|
return SampleSample.keys.map { SampleSample(rawValue: $0)!.string() }
|
105
107
|
}
|
106
108
|
}
|
107
109
|
|
110
|
+
|
108
111
|
private static func bundle(relativePath: String) -> NSBundle {
|
109
112
|
var components = (__FILE__ as String).pathComponents
|
110
113
|
components.removeLast()
|
data/bin/rspec
ADDED
@@ -0,0 +1,16 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
#
|
3
|
+
# This file was generated by Bundler.
|
4
|
+
#
|
5
|
+
# The application 'rspec' is installed as part of a gem, and
|
6
|
+
# this file is here to facilitate running it.
|
7
|
+
#
|
8
|
+
|
9
|
+
require 'pathname'
|
10
|
+
ENV['BUNDLE_GEMFILE'] ||= File.expand_path("../../Gemfile",
|
11
|
+
Pathname.new(__FILE__).realpath)
|
12
|
+
|
13
|
+
require 'rubygems'
|
14
|
+
require 'bundler/setup'
|
15
|
+
|
16
|
+
load Gem.bin_path('rspec-core', 'rspec')
|
data/{bin → exe}/xcmultilingual
RENAMED
File without changes
|
data/xcmultilingual.gemspec
CHANGED
@@ -15,7 +15,8 @@ Gem::Specification.new do |spec|
|
|
15
15
|
spec.license = "MIT"
|
16
16
|
|
17
17
|
spec.files = `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
|
18
|
-
spec.
|
18
|
+
spec.bindir = "exe"
|
19
|
+
spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
|
19
20
|
spec.require_paths = ["lib"]
|
20
21
|
|
21
22
|
spec.add_dependency 'thor'
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: xcmultilingual
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Naoki Morita
|
8
8
|
autorequire:
|
9
|
-
bindir:
|
9
|
+
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-07-
|
11
|
+
date: 2015-07-15 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: thor
|
@@ -71,8 +71,6 @@ description: 'Command line tool for Swift localizations: It parses localization
|
|
71
71
|
email:
|
72
72
|
- namorit@gmail.com
|
73
73
|
executables:
|
74
|
-
- console
|
75
|
-
- setup
|
76
74
|
- xcmultilingual
|
77
75
|
extensions: []
|
78
76
|
extra_rdoc_files: []
|
@@ -141,8 +139,9 @@ files:
|
|
141
139
|
- README.md
|
142
140
|
- Rakefile
|
143
141
|
- bin/console
|
142
|
+
- bin/rspec
|
144
143
|
- bin/setup
|
145
|
-
-
|
144
|
+
- exe/xcmultilingual
|
146
145
|
- lib/xcmultilingual.rb
|
147
146
|
- lib/xcmultilingual/bundle.rb
|
148
147
|
- lib/xcmultilingual/cli.rb
|