padrino-helpers 0.11.3 → 0.11.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/README.rdoc +1 -1
- data/lib/padrino-helpers.rb +3 -5
- data/lib/padrino-helpers/asset_tag_helpers.rb +32 -40
- data/lib/padrino-helpers/breadcrumb_helpers.rb +21 -39
- data/lib/padrino-helpers/form_builder/abstract_form_builder.rb +121 -118
- data/lib/padrino-helpers/form_builder/standard_form_builder.rb +6 -9
- data/lib/padrino-helpers/form_helpers.rb +190 -193
- data/lib/padrino-helpers/format_helpers.rb +29 -42
- data/lib/padrino-helpers/locale/cs.yml +14 -14
- data/lib/padrino-helpers/locale/da.yml +1 -1
- data/lib/padrino-helpers/locale/de.yml +1 -1
- data/lib/padrino-helpers/locale/en.yml +16 -16
- data/lib/padrino-helpers/locale/es.yml +16 -16
- data/lib/padrino-helpers/locale/fr.yml +1 -2
- data/lib/padrino-helpers/locale/hu.yml +16 -16
- data/lib/padrino-helpers/locale/it.yml +2 -2
- data/lib/padrino-helpers/locale/ja.yml +16 -16
- data/lib/padrino-helpers/locale/lv.yml +16 -16
- data/lib/padrino-helpers/locale/nl.yml +1 -1
- data/lib/padrino-helpers/locale/no.yml +1 -1
- data/lib/padrino-helpers/locale/pl.yml +7 -7
- data/lib/padrino-helpers/locale/pt_br.yml +16 -16
- data/lib/padrino-helpers/locale/ro.yml +16 -16
- data/lib/padrino-helpers/locale/ru.yml +16 -16
- data/lib/padrino-helpers/locale/sv.yml +16 -16
- data/lib/padrino-helpers/locale/tr.yml +16 -16
- data/lib/padrino-helpers/locale/uk.yml +16 -16
- data/lib/padrino-helpers/locale/zh_cn.yml +16 -16
- data/lib/padrino-helpers/locale/zh_tw.yml +16 -16
- data/lib/padrino-helpers/number_helpers.rb +10 -15
- data/lib/padrino-helpers/output_helpers.rb +49 -57
- data/lib/padrino-helpers/output_helpers/abstract_handler.rb +16 -18
- data/lib/padrino-helpers/output_helpers/erb_handler.rb +11 -12
- data/lib/padrino-helpers/output_helpers/haml_handler.rb +9 -9
- data/lib/padrino-helpers/output_helpers/slim_handler.rb +11 -13
- data/lib/padrino-helpers/render_helpers.rb +5 -6
- data/lib/padrino-helpers/tag_helpers.rb +18 -21
- data/lib/padrino-helpers/translation_helpers.rb +4 -6
- data/test/fixtures/markup_app/app.rb +7 -3
- data/test/fixtures/render_app/app.rb +1 -0
- data/test/test_asset_tag_helpers.rb +1 -1
- data/test/test_form_builder.rb +5 -6
- data/test/test_form_helpers.rb +24 -12
- data/test/test_format_helpers.rb +3 -3
- data/test/test_number_helpers.rb +4 -0
- data/test/test_output_helpers.rb +1 -1
- data/test/test_render_helpers.rb +1 -1
- data/test/test_tag_helpers.rb +1 -1
- metadata +9 -15
@@ -6,7 +6,7 @@ module Padrino
|
|
6
6
|
#
|
7
7
|
module FormatHelpers
|
8
8
|
##
|
9
|
-
# Returns escaped text to protect against malicious content
|
9
|
+
# Returns escaped text to protect against malicious content.
|
10
10
|
#
|
11
11
|
# @param [String] text
|
12
12
|
# Unsanitized HTML string that needs to be escaped.
|
@@ -17,7 +17,6 @@ module Padrino
|
|
17
17
|
# escape_html("<b>Hey<b>") => "<b>Hey<b;gt;"
|
18
18
|
# h("Me & Bob") => "Me & Bob"
|
19
19
|
#
|
20
|
-
# @api public
|
21
20
|
def escape_html(text)
|
22
21
|
Rack::Utils.escape_html(text).html_safe
|
23
22
|
end
|
@@ -25,8 +24,7 @@ module Padrino
|
|
25
24
|
alias sanitize_html escape_html
|
26
25
|
|
27
26
|
##
|
28
|
-
# Returns escaped text to protect against malicious content
|
29
|
-
# Returns blank if the text is empty
|
27
|
+
# Returns escaped text to protect against malicious content.
|
30
28
|
#
|
31
29
|
# @param [String] text
|
32
30
|
# Unsanitized HTML string that needs to be escaped.
|
@@ -39,14 +37,13 @@ module Padrino
|
|
39
37
|
# h!("Me & Bob") => "Me & Bob"
|
40
38
|
# h!("", "Whoops") => "Whoops"
|
41
39
|
#
|
42
|
-
# @api public
|
43
40
|
def h!(text, blank_text = ' ')
|
44
41
|
return blank_text.html_safe if text.nil? || text.empty?
|
45
42
|
h(text)
|
46
43
|
end
|
47
44
|
|
48
45
|
##
|
49
|
-
# Strips all HTML tags from the html
|
46
|
+
# Strips all HTML tags from the html.
|
50
47
|
#
|
51
48
|
# @param [String] html
|
52
49
|
# The HTML for which to strip tags.
|
@@ -56,7 +53,6 @@ module Padrino
|
|
56
53
|
# @example
|
57
54
|
# strip_tags("<b>Hey</b>") => "Hey"
|
58
55
|
#
|
59
|
-
# @api public
|
60
56
|
def strip_tags(html)
|
61
57
|
html.gsub(/<\/?[^>]*>/, "") if html
|
62
58
|
end
|
@@ -79,14 +75,13 @@ module Padrino
|
|
79
75
|
# simple_format("hello\nworld") # => "<p>hello<br/>world</p>"
|
80
76
|
# simple_format("hello\nworld", :tag => :div, :class => :foo) # => "<div class="foo">hello<br/>world</div>"
|
81
77
|
#
|
82
|
-
# @api public
|
83
78
|
def simple_format(text, options={})
|
84
79
|
t = options.delete(:tag) || :p
|
85
80
|
start_tag = tag(t, options, true)
|
86
81
|
text = escape_html(text.to_s.dup)
|
87
|
-
text.gsub!(/\r\n?/, "\n")
|
88
|
-
text.gsub!(/\n\n+/, "</#{t}>\n\n#{start_tag}")
|
89
|
-
text.gsub!(/([^\n]\n)(?=[^\n])/, '\1<br />')
|
82
|
+
text.gsub!(/\r\n?/, "\n") # \r\n and \r -> \n
|
83
|
+
text.gsub!(/\n\n+/, "</#{t}>\n\n#{start_tag}") # 2+ newline -> paragraph
|
84
|
+
text.gsub!(/([^\n]\n)(?=[^\n])/, '\1<br />') # 1 newline -> br
|
90
85
|
text.insert 0, start_tag
|
91
86
|
text << "</#{t}>"
|
92
87
|
text.html_safe
|
@@ -94,7 +89,7 @@ module Padrino
|
|
94
89
|
|
95
90
|
##
|
96
91
|
# Attempts to pluralize the singular word unless count is 1. If plural is supplied, it will use that when count is > 1,
|
97
|
-
# otherwise it will use
|
92
|
+
# otherwise it will use inflector to determine the plural form.
|
98
93
|
#
|
99
94
|
# @param [Fixnum] count
|
100
95
|
# The count which determines pluralization.
|
@@ -108,7 +103,6 @@ module Padrino
|
|
108
103
|
# @example
|
109
104
|
# pluralize(2, 'person') => '2 people'
|
110
105
|
#
|
111
|
-
# @api public
|
112
106
|
def pluralize(count, singular, plural = nil)
|
113
107
|
"#{count || 0} " + ((count == 1 || count == '1') ? singular : (plural || singular.pluralize))
|
114
108
|
end
|
@@ -131,7 +125,6 @@ module Padrino
|
|
131
125
|
# @example
|
132
126
|
# truncate("Once upon a time in a world far far away", :length => 8) => "Once upon..."
|
133
127
|
#
|
134
|
-
# @api public
|
135
128
|
def truncate(text, options={})
|
136
129
|
options.reverse_merge!(:length => 30, :omission => "...")
|
137
130
|
if text
|
@@ -159,7 +152,6 @@ module Padrino
|
|
159
152
|
# @example
|
160
153
|
# truncate_words("Once upon a time in a world far far away", :length => 8) => "Once upon a time in a world far..."
|
161
154
|
#
|
162
|
-
# @api public
|
163
155
|
def truncate_words(text, options={})
|
164
156
|
options.reverse_merge!(:length => 30, :omission => "...")
|
165
157
|
if text
|
@@ -180,12 +172,11 @@ module Padrino
|
|
180
172
|
# @option options [Fixnum] :line_width (80)
|
181
173
|
# The line width before a wrap should occur.
|
182
174
|
#
|
183
|
-
# @return [String] The text with line wraps for lines longer then +line_width
|
175
|
+
# @return [String] The text with line wraps for lines longer then +line_width+.
|
184
176
|
#
|
185
177
|
# @example
|
186
178
|
# word_wrap('Once upon a time', :line_width => 8) => "Once upon\na time"
|
187
179
|
#
|
188
|
-
# @api public
|
189
180
|
def word_wrap(text, *args)
|
190
181
|
options = args.extract_options!
|
191
182
|
unless args.blank?
|
@@ -223,7 +214,6 @@ module Padrino
|
|
223
214
|
# highlight('Lorem ipsum dolor sit amet', 'dolor', :highlighter => '<span class="custom">\1</span>')
|
224
215
|
# # => Lorem ipsum <strong class="custom">dolor</strong> sit amet
|
225
216
|
#
|
226
|
-
# @api public
|
227
217
|
def highlight(text, words, *args)
|
228
218
|
options = args.extract_options!
|
229
219
|
options.reverse_merge!(:highlighter => '<strong class="highlight">\1</strong>')
|
@@ -241,19 +231,19 @@ module Padrino
|
|
241
231
|
# Set +include_seconds+ to true if you want more detailed approximations when distance < 1 min, 29 secs
|
242
232
|
# Distances are reported based on the following table:
|
243
233
|
#
|
244
|
-
# 0 <-> 29 secs
|
245
|
-
# 30 secs <-> 1 min, 29 secs
|
246
|
-
# 1 min, 30 secs <-> 44 mins, 29 secs
|
247
|
-
# 44 mins, 30 secs <-> 89 mins, 29 secs
|
248
|
-
# 89 mins, 29 secs <-> 23 hrs, 59 mins, 29 secs
|
249
|
-
# 23 hrs, 59 mins, 29 secs <-> 47 hrs, 59 mins, 29 secs
|
250
|
-
# 47 hrs, 59 mins, 29 secs <-> 29 days, 23 hrs, 59 mins, 29 secs
|
251
|
-
# 29 days, 23 hrs, 59 mins, 30 secs <-> 59 days, 23 hrs, 59 mins, 29 secs
|
252
|
-
# 59 days, 23 hrs, 59 mins, 30 secs <-> 1 yr minus 1 sec
|
253
|
-
# 1 yr <-> 1 yr, 3 months
|
254
|
-
# 1 yr, 3 months <-> 1 yr, 9 months
|
255
|
-
# 1 yr, 9 months <-> 2 yr minus 1 sec
|
256
|
-
# 2 yrs <-> max time or date
|
234
|
+
# 0 <-> 29 secs # => less than a minute
|
235
|
+
# 30 secs <-> 1 min, 29 secs # => 1 minute
|
236
|
+
# 1 min, 30 secs <-> 44 mins, 29 secs # => [2..44] minutes
|
237
|
+
# 44 mins, 30 secs <-> 89 mins, 29 secs # => about 1 hour
|
238
|
+
# 89 mins, 29 secs <-> 23 hrs, 59 mins, 29 secs # => about [2..24] hours
|
239
|
+
# 23 hrs, 59 mins, 29 secs <-> 47 hrs, 59 mins, 29 secs # => 1 day
|
240
|
+
# 47 hrs, 59 mins, 29 secs <-> 29 days, 23 hrs, 59 mins, 29 secs # => [2..29] days
|
241
|
+
# 29 days, 23 hrs, 59 mins, 30 secs <-> 59 days, 23 hrs, 59 mins, 29 secs # => about 1 month
|
242
|
+
# 59 days, 23 hrs, 59 mins, 30 secs <-> 1 yr minus 1 sec # => [2..12] months
|
243
|
+
# 1 yr <-> 1 yr, 3 months # => about 1 year
|
244
|
+
# 1 yr, 3 months <-> 1 yr, 9 months # => over 1 year
|
245
|
+
# 1 yr, 9 months <-> 2 yr minus 1 sec # => almost 2 years
|
246
|
+
# 2 yrs <-> max time or date # => (same rules as 1 yr)
|
257
247
|
#
|
258
248
|
# With +include_seconds+ = true and the difference < 1 minute 29 seconds:
|
259
249
|
# 0-4 secs # => less than 5 seconds
|
@@ -295,7 +285,6 @@ module Padrino
|
|
295
285
|
# distance_of_time_in_words(to_time, from_time, true) # => about 6 years
|
296
286
|
# distance_of_time_in_words(Time.now, Time.now) # => less than a minute
|
297
287
|
#
|
298
|
-
# @api public
|
299
288
|
def distance_of_time_in_words(from_time, to_time = 0, include_seconds = false, options = {})
|
300
289
|
from_time = from_time.to_time if from_time.respond_to?(:to_time)
|
301
290
|
to_time = to_time.to_time if to_time.respond_to?(:to_time)
|
@@ -351,27 +340,25 @@ module Padrino
|
|
351
340
|
# @return [String] The time formatted as a relative string.
|
352
341
|
#
|
353
342
|
# @example
|
354
|
-
# time_ago_in_words(3.minutes.from_now)
|
355
|
-
# time_ago_in_words(Time.now - 15.hours)
|
356
|
-
# time_ago_in_words(Time.now)
|
343
|
+
# time_ago_in_words(3.minutes.from_now) # => 3 minutes
|
344
|
+
# time_ago_in_words(Time.now - 15.hours) # => 15 hours
|
345
|
+
# time_ago_in_words(Time.now) # => less than a minute
|
357
346
|
#
|
358
|
-
# @api public
|
359
347
|
def time_ago_in_words(from_time, include_seconds = false)
|
360
348
|
distance_of_time_in_words(from_time, Time.now, include_seconds)
|
361
349
|
end
|
362
350
|
|
363
351
|
##
|
364
|
-
# Used in xxxx.js.erb files to escape html so that it can be passed to javascript from Padrino
|
352
|
+
# Used in xxxx.js.erb files to escape html so that it can be passed to javascript from Padrino.
|
365
353
|
#
|
366
354
|
# @param [String] html
|
367
|
-
# The
|
355
|
+
# The HTML content to be escaped into javascript compatible format.
|
368
356
|
#
|
369
357
|
# @return [String] The html escaped for javascript passing.
|
370
358
|
#
|
371
359
|
# @example
|
372
360
|
# js_escape_html("<h1>Hey</h1>")
|
373
361
|
#
|
374
|
-
# @api public
|
375
362
|
def js_escape_html(html_content)
|
376
363
|
return '' unless html_content
|
377
364
|
javascript_mapping = { '\\' => '\\\\', '</' => '<\/', "\r\n" => '\n', "\n" => '\n', "\r" => '\n', '"' => '\\"', "'" => "\\'" }
|
@@ -380,6 +367,6 @@ module Padrino
|
|
380
367
|
escaped_content
|
381
368
|
end
|
382
369
|
alias :escape_javascript :js_escape_html
|
383
|
-
end
|
384
|
-
end
|
385
|
-
end
|
370
|
+
end
|
371
|
+
end
|
372
|
+
end
|
@@ -1,30 +1,30 @@
|
|
1
1
|
cs:
|
2
2
|
number:
|
3
|
-
# Used in number_with_delimiter()
|
4
|
-
# These are also the defaults for 'currency', 'percentage', 'precision', and 'human'
|
3
|
+
# Used in number_with_delimiter().
|
4
|
+
# These are also the defaults for 'currency', 'percentage', 'precision', and 'human'.
|
5
5
|
format:
|
6
|
-
# Sets the separator between the units, for more precision (e.g. 1.0 / 2.0 == 0.5)
|
6
|
+
# Sets the separator between the units, for more precision (e.g. 1.0 / 2.0 == 0.5).
|
7
7
|
separator: ","
|
8
|
-
#
|
8
|
+
# Delimits thousands (e.g. 1,000,000 is a million) (always in groups of three).
|
9
9
|
delimiter: " "
|
10
|
-
# Number of decimals, behind the separator (the number 1 with a precision of 2 gives: 1.00)
|
10
|
+
# Number of decimals, behind the separator (the number 1 with a precision of 2 gives: 1.00).
|
11
11
|
precision: 3
|
12
12
|
|
13
|
-
# Used in number_to_currency()
|
13
|
+
# Used in number_to_currency().
|
14
14
|
currency:
|
15
15
|
format:
|
16
|
-
# Where is the currency sign? %u is the currency unit, %n the number (default: $5.00)
|
16
|
+
# Where is the currency sign? %u is the currency unit, %n the number (default: $5.00).
|
17
17
|
format: "%n %u"
|
18
18
|
unit: "Kč"
|
19
|
-
# These three are to override number.format and are optional
|
19
|
+
# These three are to override number.format and are optional.
|
20
20
|
separator: ","
|
21
21
|
delimiter: " "
|
22
22
|
precision: 2
|
23
23
|
|
24
|
-
# Used in number_to_percentage()
|
24
|
+
# Used in number_to_percentage().
|
25
25
|
percentage:
|
26
26
|
format:
|
27
|
-
# These three are to override number.format and are optional
|
27
|
+
# These three are to override number.format and are optional.
|
28
28
|
# separator:
|
29
29
|
delimiter: ""
|
30
30
|
# precision:
|
@@ -32,15 +32,15 @@ cs:
|
|
32
32
|
# Used in number_to_precision()
|
33
33
|
precision:
|
34
34
|
format:
|
35
|
-
# These three are to override number.format and are optional
|
35
|
+
# These three are to override number.format and are optional.
|
36
36
|
# separator:
|
37
37
|
delimiter: ""
|
38
38
|
# precision:
|
39
39
|
|
40
|
-
# Used in number_to_human_size()
|
40
|
+
# Used in number_to_human_size().
|
41
41
|
human:
|
42
42
|
format:
|
43
|
-
# These three are to override number.format and are optional
|
43
|
+
# These three are to override number.format and are optional.
|
44
44
|
# separator:
|
45
45
|
delimiter: ""
|
46
46
|
precision: 1
|
@@ -57,7 +57,7 @@ cs:
|
|
57
57
|
gb: "GB"
|
58
58
|
tb: "TB"
|
59
59
|
|
60
|
-
# Used in distance_of_time_in_words(), distance_of_time_in_words_to_now(), time_ago_in_words()
|
60
|
+
# Used in distance_of_time_in_words(), distance_of_time_in_words_to_now(), time_ago_in_words().
|
61
61
|
datetime:
|
62
62
|
distance_in_words:
|
63
63
|
half_a_minute: "půl minutou"
|
@@ -1,52 +1,52 @@
|
|
1
1
|
en:
|
2
2
|
number:
|
3
|
-
# Used in number_with_delimiter()
|
4
|
-
# These are also the defaults for 'currency', 'percentage', 'precision', and 'human'
|
3
|
+
# Used in number_with_delimiter().
|
4
|
+
# These are also the defaults for 'currency', 'percentage', 'precision', and 'human'.
|
5
5
|
format:
|
6
|
-
# Sets the separator between the units, for more precision (e.g. 1.0 / 2.0 == 0.5)
|
6
|
+
# Sets the separator between the units, for more precision (e.g. 1.0 / 2.0 == 0.5).
|
7
7
|
separator: "."
|
8
|
-
#
|
8
|
+
# Delimits thousands (e.g. 1,000,000 is a million) (always in groups of three).
|
9
9
|
delimiter: ","
|
10
|
-
# Number of decimals, behind the separator (the number 1 with a precision of 2 gives: 1.00)
|
10
|
+
# Number of decimals, behind the separator (the number 1 with a precision of 2 gives: 1.00).
|
11
11
|
precision: 3
|
12
12
|
|
13
|
-
# Used in number_to_currency()
|
13
|
+
# Used in number_to_currency().
|
14
14
|
currency:
|
15
15
|
format:
|
16
|
-
# Where is the currency sign? %u is the currency unit, %n the number (default: $5.00)
|
16
|
+
# Where is the currency sign? %u is the currency unit, %n the number (default: $5.00).
|
17
17
|
format: "%u%n"
|
18
18
|
unit: "$"
|
19
|
-
# These three are to override number.format and are optional
|
19
|
+
# These three are to override number.format and are optional.
|
20
20
|
separator: "."
|
21
21
|
delimiter: ","
|
22
22
|
precision: 2
|
23
23
|
|
24
|
-
# Used in number_to_percentage()
|
24
|
+
# Used in number_to_percentage().
|
25
25
|
percentage:
|
26
26
|
format:
|
27
|
-
# These three are to override number.format and are optional
|
27
|
+
# These three are to override number.format and are optional.
|
28
28
|
# separator:
|
29
29
|
delimiter: ""
|
30
30
|
# precision:
|
31
31
|
|
32
|
-
# Used in number_to_precision()
|
32
|
+
# Used in number_to_precision().
|
33
33
|
precision:
|
34
34
|
format:
|
35
|
-
# These three are to override number.format and are optional
|
35
|
+
# These three are to override number.format and are optional.
|
36
36
|
# separator:
|
37
37
|
delimiter: ""
|
38
38
|
# precision:
|
39
39
|
|
40
|
-
# Used in number_to_human_size()
|
40
|
+
# Used in number_to_human_size().
|
41
41
|
human:
|
42
42
|
format:
|
43
|
-
# These three are to override number.format and are optional
|
43
|
+
# These three are to override number.format and are optional.
|
44
44
|
# separator:
|
45
45
|
delimiter: ""
|
46
46
|
precision: 1
|
47
47
|
storage_units:
|
48
48
|
# Storage units output formatting.
|
49
|
-
# %u is the storage unit, %n is the number (default: 2 MB)
|
49
|
+
# %u is the storage unit, %n is the number (default: 2 MB).
|
50
50
|
format: "%n %u"
|
51
51
|
units:
|
52
52
|
byte:
|
@@ -57,7 +57,7 @@ en:
|
|
57
57
|
gb: "GB"
|
58
58
|
tb: "TB"
|
59
59
|
|
60
|
-
# Used in distance_of_time_in_words(), distance_of_time_in_words_to_now(), time_ago_in_words()
|
60
|
+
# Used in distance_of_time_in_words(), distance_of_time_in_words_to_now(), time_ago_in_words().
|
61
61
|
datetime:
|
62
62
|
distance_in_words:
|
63
63
|
half_a_minute: "half a minute"
|
@@ -1,52 +1,52 @@
|
|
1
1
|
es:
|
2
2
|
number:
|
3
|
-
# Used in number_with_delimiter()
|
4
|
-
# These are also the defaults for 'currency', 'percentage', 'precision', and 'human'
|
3
|
+
# Used in number_with_delimiter().
|
4
|
+
# These are also the defaults for 'currency', 'percentage', 'precision', and 'human'.
|
5
5
|
format:
|
6
|
-
# Sets the separator between the units, for more precision (e.g. 1.0 / 2.0 == 0.5)
|
6
|
+
# Sets the separator between the units, for more precision (e.g. 1.0 / 2.0 == 0.5).
|
7
7
|
separator: "."
|
8
|
-
# Delimets thousands (e.g. 1,000,000 is a million) (always in groups of three)
|
8
|
+
# Delimets thousands (e.g. 1,000,000 is a million) (always in groups of three).
|
9
9
|
delimiter: ","
|
10
|
-
# Number of decimals, behind the separator (the number 1 with a precision of 2 gives: 1.00)
|
10
|
+
# Number of decimals, behind the separator (the number 1 with a precision of 2 gives: 1.00).
|
11
11
|
precision: 2
|
12
12
|
|
13
|
-
# Used in number_to_currency()
|
13
|
+
# Used in number_to_currency().
|
14
14
|
currency:
|
15
15
|
format:
|
16
|
-
# Where is the currency sign? %u is the currency unit, %n the number (default: $5.00)
|
16
|
+
# Where is the currency sign? %u is the currency unit, %n the number (default: $5.00).
|
17
17
|
format: "%u%n"
|
18
18
|
unit: "$"
|
19
|
-
# These three are to override number.format and are optional
|
19
|
+
# These three are to override number.format and are optional.
|
20
20
|
separator: "."
|
21
21
|
delimiter: ","
|
22
22
|
precision: 2
|
23
23
|
|
24
|
-
# Used in number_to_percentage()
|
24
|
+
# Used in number_to_percentage().
|
25
25
|
percentage:
|
26
26
|
format:
|
27
|
-
# These three are to override number.format and are optional
|
27
|
+
# These three are to override number.format and are optional.
|
28
28
|
# separator:
|
29
29
|
delimiter: ""
|
30
30
|
# precision:
|
31
31
|
|
32
|
-
# Used in number_to_precision()
|
32
|
+
# Used in number_to_precision().
|
33
33
|
precision:
|
34
34
|
format:
|
35
|
-
# These three are to override number.format and are optional
|
35
|
+
# These three are to override number.format and are optional.
|
36
36
|
# separator:
|
37
37
|
delimiter: ""
|
38
38
|
# precision:
|
39
39
|
|
40
|
-
# Used in number_to_human_size()
|
40
|
+
# Used in number_to_human_size().
|
41
41
|
human:
|
42
42
|
format:
|
43
|
-
# These three are to override number.format and are optional
|
43
|
+
# These three are to override number.format and are optional.
|
44
44
|
# separator:
|
45
45
|
delimiter: ""
|
46
46
|
precision: 1
|
47
47
|
storage_units:
|
48
48
|
# Storage units output formatting.
|
49
|
-
# %u is the storage unit, %n is the number (default: 2 MB)
|
49
|
+
# %u is the storage unit, %n is the number (default: 2 MB).
|
50
50
|
format: "%n %u"
|
51
51
|
units:
|
52
52
|
byte:
|
@@ -57,7 +57,7 @@ es:
|
|
57
57
|
gb: "GB"
|
58
58
|
tb: "TB"
|
59
59
|
|
60
|
-
# Used in distance_of_time_in_words(), distance_of_time_in_words_to_now(), time_ago_in_words()
|
60
|
+
# Used in distance_of_time_in_words(), distance_of_time_in_words_to_now(), time_ago_in_words().
|
61
61
|
datetime:
|
62
62
|
distance_in_words:
|
63
63
|
half_a_minute: "medio minuto"
|
@@ -23,7 +23,7 @@ fr:
|
|
23
23
|
precision: 1
|
24
24
|
storage_units:
|
25
25
|
# Storage units output formatting.
|
26
|
-
# %u is the storage unit, %n is the number (default: 2 MB)
|
26
|
+
# %u is the storage unit, %n is the number (default: 2 MB).
|
27
27
|
format: "%n %u"
|
28
28
|
units:
|
29
29
|
byte:
|
@@ -77,4 +77,3 @@ fr:
|
|
77
77
|
one: "1 erreur a empêché ce %{model} d'être sauvé"
|
78
78
|
other: "%{count} erreurs ont empêché ce %{model} d'être sauvé"
|
79
79
|
body: "Il y avait des problèmes avec les champs suivants:"
|
80
|
-
|