phrase 0.4.21 → 0.4.22
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/phrase/formats.rb +2 -0
- data/lib/phrase/formats/angular_translate.rb +19 -0
- data/lib/phrase/version.rb +1 -1
- metadata +3 -2
data/lib/phrase/formats.rb
CHANGED
@@ -27,6 +27,7 @@ module Phrase
|
|
27
27
|
autoload :YamlSymfony2, 'phrase/formats/yaml_symfony2'
|
28
28
|
autoload :PhpArray, 'phrase/formats/php_array'
|
29
29
|
autoload :Laravel, 'phrase/formats/laravel'
|
30
|
+
autoload :AngularTranslate, 'phrase/formats/angular_translate'
|
30
31
|
|
31
32
|
class Base
|
32
33
|
def self.supports_extension?(extension)
|
@@ -93,6 +94,7 @@ module Phrase
|
|
93
94
|
yml_symfony2: Phrase::Formats::YamlSymfony2,
|
94
95
|
php_array: Phrase::Formats::PhpArray,
|
95
96
|
laravel: Phrase::Formats::Laravel,
|
97
|
+
angular_translate: Phrase::Formats::AngularTranslate,
|
96
98
|
}
|
97
99
|
|
98
100
|
def self.config
|
@@ -0,0 +1,19 @@
|
|
1
|
+
# -*- encoding : utf-8 -*-
|
2
|
+
|
3
|
+
module Phrase
|
4
|
+
module Formats
|
5
|
+
class AngularTranslate < Phrase::Formats::Base
|
6
|
+
def self.filename_for_locale(locale)
|
7
|
+
"phrase.#{locale.name}.json"
|
8
|
+
end
|
9
|
+
|
10
|
+
def self.locale_aware?
|
11
|
+
false
|
12
|
+
end
|
13
|
+
|
14
|
+
def self.extensions
|
15
|
+
[:json]
|
16
|
+
end
|
17
|
+
end
|
18
|
+
end
|
19
|
+
end
|
data/lib/phrase/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: phrase
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.4.
|
4
|
+
version: 0.4.22
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2014-03-
|
12
|
+
date: 2014-03-20 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: colorize
|
@@ -215,6 +215,7 @@ files:
|
|
215
215
|
- lib/phrase/delegate/i18n.rb
|
216
216
|
- lib/phrase/engine.rb
|
217
217
|
- lib/phrase/formats.rb
|
218
|
+
- lib/phrase/formats/angular_translate.rb
|
218
219
|
- lib/phrase/formats/csv.rb
|
219
220
|
- lib/phrase/formats/custom.rb
|
220
221
|
- lib/phrase/formats/gettext.rb
|