padrino-helpers 0.9.29 → 0.10.0
Sign up to get free protection for your applications and to get access to all the features.
data/lib/padrino-helpers.rb
CHANGED
@@ -2,6 +2,11 @@ require 'padrino-core/support_lite' unless defined?(SupportLite)
|
|
2
2
|
require 'cgi'
|
3
3
|
require 'i18n'
|
4
4
|
require 'enumerator'
|
5
|
+
require 'active_support/core_ext/string/conversions' # to_date
|
6
|
+
require 'active_support/core_ext/float/rounding' # round
|
7
|
+
require 'active_support/option_merger' # with_options
|
8
|
+
require 'active_support/core_ext/object/with_options' # with_options
|
9
|
+
require 'active_support/inflector' # humanize
|
5
10
|
|
6
11
|
FileSet.glob_require('padrino-helpers/**/*.rb', __FILE__)
|
7
12
|
|
@@ -0,0 +1,103 @@
|
|
1
|
+
hu:
|
2
|
+
number:
|
3
|
+
# Used in number_with_delimiter()
|
4
|
+
# These are also the defaults for 'currency', 'percentage', 'precision', and 'human'
|
5
|
+
format:
|
6
|
+
# Sets the separator between the units, for more precision (e.g. 1.0 / 2.0 == 0.5)
|
7
|
+
separator: ","
|
8
|
+
# Delimets thousands (e.g. 1,000,000 is a million) (always in groups of three)
|
9
|
+
delimiter: "."
|
10
|
+
# Number of decimals, behind the separator (the number 1 with a precision of 2 gives: 1.00)
|
11
|
+
precision: 2
|
12
|
+
|
13
|
+
# Used in number_to_currency()
|
14
|
+
currency:
|
15
|
+
format:
|
16
|
+
# Where is the currency sign? %u is the currency unit, %n the number (default: $5.00)
|
17
|
+
format: "%n %u"
|
18
|
+
unit: "Ft"
|
19
|
+
# These three are to override number.format and are optional
|
20
|
+
separator: ","
|
21
|
+
delimiter: "."
|
22
|
+
precision: 2
|
23
|
+
|
24
|
+
# Used in number_to_percentage()
|
25
|
+
percentage:
|
26
|
+
format:
|
27
|
+
# These three are to override number.format and are optional
|
28
|
+
# separator:
|
29
|
+
delimiter: ""
|
30
|
+
# precision:
|
31
|
+
|
32
|
+
# Used in number_to_precision()
|
33
|
+
precision:
|
34
|
+
format:
|
35
|
+
# These three are to override number.format and are optional
|
36
|
+
# separator:
|
37
|
+
delimiter: ""
|
38
|
+
# precision:
|
39
|
+
|
40
|
+
# Used in number_to_human_size()
|
41
|
+
human:
|
42
|
+
format:
|
43
|
+
# These three are to override number.format and are optional
|
44
|
+
# separator:
|
45
|
+
delimiter: ""
|
46
|
+
precision: 1
|
47
|
+
storage_units:
|
48
|
+
# Storage units output formatting.
|
49
|
+
# %u is the storage unit, %n is the number (default: 2 MB)
|
50
|
+
format: "%n %u"
|
51
|
+
units:
|
52
|
+
byte:
|
53
|
+
one: "byte"
|
54
|
+
other: "byte"
|
55
|
+
kb: "KB"
|
56
|
+
mb: "MB"
|
57
|
+
gb: "GB"
|
58
|
+
tb: "TB"
|
59
|
+
|
60
|
+
# Used in distance_of_time_in_words(), distance_of_time_in_words_to_now(), time_ago_in_words()
|
61
|
+
datetime:
|
62
|
+
distance_in_words:
|
63
|
+
half_a_minute: "fél perc"
|
64
|
+
less_than_x_seconds:
|
65
|
+
one: "kevesebb, mint egy másodperc"
|
66
|
+
other: "kevesebb, mint %{count} másodperc"
|
67
|
+
x_seconds:
|
68
|
+
one: "1 másodperc"
|
69
|
+
other: "%{count} másodperc"
|
70
|
+
less_than_x_minutes:
|
71
|
+
one: "kevesebb, mint egy perc"
|
72
|
+
other: "kevesebb, mint %{count} perc"
|
73
|
+
x_minutes:
|
74
|
+
one: "1 perc"
|
75
|
+
other: "%{count} perc"
|
76
|
+
about_x_hours:
|
77
|
+
one: "nagyjából 1 óra"
|
78
|
+
other: "nagyjából %{count} óra"
|
79
|
+
x_days:
|
80
|
+
one: "1 nap"
|
81
|
+
other: "%{count} nap"
|
82
|
+
about_x_months:
|
83
|
+
one: "nagyjából 1 hónap"
|
84
|
+
other: "nagyjából %{count} hónap"
|
85
|
+
x_months:
|
86
|
+
one: "1 hónap"
|
87
|
+
other: "%{count} hónap"
|
88
|
+
about_x_years:
|
89
|
+
one: "nagyjából 1 év"
|
90
|
+
other: "nagyjából %{count} év"
|
91
|
+
over_x_years:
|
92
|
+
one: "több, mint 1 év"
|
93
|
+
other: "több, mint %{count} év"
|
94
|
+
almost_x_years:
|
95
|
+
one: "majdnem 1 év"
|
96
|
+
other: "majdnem %{count} év"
|
97
|
+
models:
|
98
|
+
errors:
|
99
|
+
template:
|
100
|
+
header:
|
101
|
+
one: "1 hiba akadályozza a(z) %{model} mentését"
|
102
|
+
other: "%{count} hiba akadályozza a(z) %{model} mentését"
|
103
|
+
body: "A következő mezőkkel van baj:"
|
data/padrino-helpers.gemspec
CHANGED
@@ -1,4 +1,6 @@
|
|
1
|
-
|
1
|
+
#!/usr/bin/env gem build
|
2
|
+
# encoding: utf-8
|
3
|
+
|
2
4
|
require File.expand_path("../../padrino-core/lib/padrino-core/version.rb", __FILE__)
|
3
5
|
|
4
6
|
Gem::Specification.new do |s|
|
@@ -21,5 +23,5 @@ Gem::Specification.new do |s|
|
|
21
23
|
s.rdoc_options = ["--charset=UTF-8"]
|
22
24
|
|
23
25
|
s.add_dependency("padrino-core", Padrino.version)
|
24
|
-
s.add_dependency("i18n", "
|
26
|
+
s.add_dependency("i18n", "~> 0.5.0")
|
25
27
|
end
|
metadata
CHANGED
@@ -2,7 +2,7 @@
|
|
2
2
|
name: padrino-helpers
|
3
3
|
version: !ruby/object:Gem::Version
|
4
4
|
prerelease:
|
5
|
-
version: 0.
|
5
|
+
version: 0.10.0
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
8
8
|
- Padrino Team
|
@@ -13,7 +13,8 @@ autorequire:
|
|
13
13
|
bindir: bin
|
14
14
|
cert_chain: []
|
15
15
|
|
16
|
-
date: 2011-
|
16
|
+
date: 2011-07-07 00:00:00 -07:00
|
17
|
+
default_executable:
|
17
18
|
dependencies:
|
18
19
|
- !ruby/object:Gem::Dependency
|
19
20
|
name: padrino-core
|
@@ -23,7 +24,7 @@ dependencies:
|
|
23
24
|
requirements:
|
24
25
|
- - "="
|
25
26
|
- !ruby/object:Gem::Version
|
26
|
-
version: 0.
|
27
|
+
version: 0.10.0
|
27
28
|
type: :runtime
|
28
29
|
version_requirements: *id001
|
29
30
|
- !ruby/object:Gem::Dependency
|
@@ -32,9 +33,9 @@ dependencies:
|
|
32
33
|
requirement: &id002 !ruby/object:Gem::Requirement
|
33
34
|
none: false
|
34
35
|
requirements:
|
35
|
-
- -
|
36
|
+
- - ~>
|
36
37
|
- !ruby/object:Gem::Version
|
37
|
-
version: 0.
|
38
|
+
version: 0.5.0
|
38
39
|
type: :runtime
|
39
40
|
version_requirements: *id002
|
40
41
|
description: Tag helpers, asset helpers, form helpers, form builders and many more helpers for padrino
|
@@ -63,6 +64,7 @@ files:
|
|
63
64
|
- lib/padrino-helpers/locale/en.yml
|
64
65
|
- lib/padrino-helpers/locale/es.yml
|
65
66
|
- lib/padrino-helpers/locale/fr.yml
|
67
|
+
- lib/padrino-helpers/locale/hu.yml
|
66
68
|
- lib/padrino-helpers/locale/it.yml
|
67
69
|
- lib/padrino-helpers/locale/ja.yml
|
68
70
|
- lib/padrino-helpers/locale/nl.yml
|
@@ -141,6 +143,7 @@ files:
|
|
141
143
|
- test/test_output_helpers.rb
|
142
144
|
- test/test_render_helpers.rb
|
143
145
|
- test/test_tag_helpers.rb
|
146
|
+
has_rdoc: true
|
144
147
|
homepage: http://www.padrinorb.com
|
145
148
|
licenses: []
|
146
149
|
|
@@ -164,7 +167,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
164
167
|
requirements: []
|
165
168
|
|
166
169
|
rubyforge_project: padrino-helpers
|
167
|
-
rubygems_version: 1.
|
170
|
+
rubygems_version: 1.6.2
|
168
171
|
signing_key:
|
169
172
|
specification_version: 3
|
170
173
|
summary: Helpers for padrino
|