gettext_simple_rails 0.0.4 → 0.0.5

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: d32df11d74af532fb2c84cb336247c20138b87e2
4
- data.tar.gz: 083309a6b599a2e26a9385c765a36cba64ad5dbc
3
+ metadata.gz: b80c8fa3accb5b132d79245c6a1cc8a7958c6d70
4
+ data.tar.gz: 69007f8eb6024efc804d2310306ce5c2700094fb
5
5
  SHA512:
6
- metadata.gz: 6a68feeab623f9daabf34f2590a558cb30fc39e211a560c6836a1a6b2d1223a540f101da42882ae01963b10965d8c064d09256a6c8e50c6571b535c92b902ad5
7
- data.tar.gz: a4f95ac5eba636e6a364fdd62487d0f73ef074337c1940bb15ddca54dd60845f47dc87a20a45efdcc0ec41b7e434a826d326b1a0a3da9874bbc5e13d9b42e6cd
6
+ metadata.gz: 06999539c59436aee90837c5b77e7d30cd36d4701e8cc3eae21efa552269101f3ef753030ababb75e18d5ee68a2537fead3eed18f01b818871fa8e9237f98798
7
+ data.tar.gz: 2024eddfcae242ca09002037902b382ac7f94dad37e8d95741ed381fbd7e6a7e6234fbde8fe04f3de8f63853e952d6f1a56c853b90794e89401537a4ea597772
@@ -0,0 +1,59 @@
1
+ class GettextSimpleRails::Translators::NumberTranslator
2
+ def detected?
3
+ true
4
+ end
5
+
6
+ def translations
7
+ return {
8
+ "number" => {
9
+ "currency" => {
10
+ "format" => {
11
+ "delimiter" => ",",
12
+ "format" => "%n %u",
13
+ "separator" => ".",
14
+ "unit" => "$"
15
+ }
16
+ },
17
+ "format" => {
18
+ "delimiter" => ",",
19
+ "separator" => ".",
20
+
21
+ },
22
+ "human" => {
23
+ "decimal_units" => {
24
+ "format" => "%n %u",
25
+ "units" => {
26
+ "billion" => "Billion",
27
+ "million" => "Million",
28
+ "quadrillion" => "Quadrillion",
29
+ "thousand" => "Thousand",
30
+ "trillion" => "Trillion",
31
+ "unit" => ""
32
+ }
33
+ },
34
+ "format" => {
35
+ "delimiter" => ""
36
+ },
37
+ "storage_units" => {
38
+ "format" => "%n %u",
39
+ "units" => {
40
+ "byte" => {
41
+ "one" => "Byte",
42
+ "other" => "Bytes"
43
+ },
44
+ "gb" => "GB",
45
+ "kb" => "KB",
46
+ "mb" => "MB",
47
+ "tb" => "TB"
48
+ }
49
+ }
50
+ },
51
+ "percentage" => {
52
+ "format" => {
53
+ "delimiter" => ""
54
+ }
55
+ }
56
+ }
57
+ }
58
+ end
59
+ end
@@ -1,3 +1,3 @@
1
1
  module GettextSimpleRails
2
- VERSION = "0.0.4"
2
+ VERSION = "0.0.5"
3
3
  end
@@ -1,4 +1,9 @@
1
1
  namespace :gettext_simple_rails do
2
+ task "all" => :environment do
3
+ Rake::Task["gettext_simple_rails:generate_translator_files"].execute
4
+ Rake::Task["gettext_simple_rails:generate_model_translation_files"].execute
5
+ end
6
+
2
7
  task "generate_translator_files" => :environment do
3
8
  GettextSimpleRails::Translators.load_all.each do |translator_data|
4
9
  translator = translator_data[:class].new
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: gettext_simple_rails
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.4
4
+ version: 0.0.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Kasper Johansen
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-04-20 00:00:00.000000000 Z
11
+ date: 2014-04-22 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails
@@ -101,6 +101,7 @@ files:
101
101
  - lib/gettext_simple_rails/translators/simple_form_translator.rb
102
102
  - lib/gettext_simple_rails/translators/active_admin_translator.rb
103
103
  - lib/gettext_simple_rails/translators/active_record_translator.rb
104
+ - lib/gettext_simple_rails/translators/number_translator.rb
104
105
  - lib/gettext_simple_rails/translators/devise_translator.rb
105
106
  - lib/gettext_simple_rails/translators/date_translator.rb
106
107
  - lib/gettext_simple_rails.rb