padrino-support 0.12.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.document +5 -0
- data/.gitignore +22 -0
- data/.yardopts +1 -0
- data/LICENSE.txt +20 -0
- data/Rakefile +5 -0
- data/lib/padrino-support.rb +34 -0
- data/lib/padrino-support/core_ext/object_space.rb +49 -0
- data/lib/padrino-support/core_ext/string/colorize.rb +40 -0
- data/lib/padrino-support/core_ext/string/inflections.rb +98 -0
- data/lib/padrino-support/core_ext/string/undent.rb +19 -0
- data/lib/padrino-support/file_set.rb +25 -0
- data/lib/padrino-support/locale/cs.yml +33 -0
- data/lib/padrino-support/locale/da.yml +33 -0
- data/lib/padrino-support/locale/de.yml +33 -0
- data/lib/padrino-support/locale/en.yml +33 -0
- data/lib/padrino-support/locale/es.yml +33 -0
- data/lib/padrino-support/locale/fr.yml +33 -0
- data/lib/padrino-support/locale/hu.yml +33 -0
- data/lib/padrino-support/locale/it.yml +39 -0
- data/lib/padrino-support/locale/ja.yml +33 -0
- data/lib/padrino-support/locale/lv.yml +33 -0
- data/lib/padrino-support/locale/nl.yml +33 -0
- data/lib/padrino-support/locale/no.yml +33 -0
- data/lib/padrino-support/locale/pl.yml +33 -0
- data/lib/padrino-support/locale/pt_br.yml +39 -0
- data/lib/padrino-support/locale/ro.yml +33 -0
- data/lib/padrino-support/locale/ru.yml +34 -0
- data/lib/padrino-support/locale/sv.yml +33 -0
- data/lib/padrino-support/locale/tr.yml +33 -0
- data/lib/padrino-support/locale/uk.yml +33 -0
- data/lib/padrino-support/locale/zh_cn.yml +33 -0
- data/lib/padrino-support/locale/zh_tw.yml +33 -0
- data/padrino-support.gemspec +27 -0
- data/test/helper.rb +8 -0
- data/test/test_support_lite.rb +50 -0
- metadata +100 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: bc4d6db979b946264882e0875c6c03d2d44b2f0d
|
4
|
+
data.tar.gz: 971d5c0af718f7203519dda9d16d8051f1b3ae39
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: 368b385238ed28df21735451435432800a886e14e8e7b8cde6a01ed17723f2efd919033b241f9ef005f3a5bdff3798d46bf5404e949903dec2fbcd90145dca1a
|
7
|
+
data.tar.gz: f502084320954430461904de2fbcf68294390eb59c692e6e911c93d5c12aa444416019e9575bd822a26930060f14801bbb55a4926a085e9b50b9c5beec99e3fa
|
data/.document
ADDED
data/.gitignore
ADDED
data/.yardopts
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
--title 'Padrino Support Documentation' --protected
|
data/LICENSE.txt
ADDED
@@ -0,0 +1,20 @@
|
|
1
|
+
Copyright (c) 2011 Padrino
|
2
|
+
|
3
|
+
Permission is hereby granted, free of charge, to any person obtaining
|
4
|
+
a copy of this software and associated documentation files (the
|
5
|
+
"Software"), to deal in the Software without restriction, including
|
6
|
+
without limitation the rights to use, copy, modify, merge, publish,
|
7
|
+
distribute, sublicense, and/or sell copies of the Software, and to
|
8
|
+
permit persons to whom the Software is furnished to do so, subject to
|
9
|
+
the following conditions:
|
10
|
+
|
11
|
+
The above copyright notice and this permission notice shall be
|
12
|
+
included in all copies or substantial portions of the Software.
|
13
|
+
|
14
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
15
|
+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
16
|
+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
17
|
+
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
18
|
+
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
19
|
+
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
20
|
+
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
data/Rakefile
ADDED
@@ -0,0 +1,34 @@
|
|
1
|
+
##
|
2
|
+
# This file loads certain extensions required by Padrino from ActiveSupport.
|
3
|
+
#
|
4
|
+
require 'active_support/core_ext/module/aliasing' # alias_method_chain
|
5
|
+
require 'active_support/core_ext/hash/reverse_merge' # reverse_merge
|
6
|
+
require 'active_support/core_ext/hash/keys' # symbolize_keys
|
7
|
+
require 'active_support/core_ext/hash/indifferent_access' # params[:foo]
|
8
|
+
require 'active_support/core_ext/hash/slice' # slice
|
9
|
+
require 'active_support/core_ext/array/extract_options' # Array#extract_options!
|
10
|
+
require 'active_support/core_ext/object/blank' # present?
|
11
|
+
require 'active_support/core_ext/string/output_safety' # SafeBuffer and html_safe
|
12
|
+
|
13
|
+
require 'padrino-support/core_ext/string/inflections'
|
14
|
+
require 'padrino-support/core_ext/string/colorize'
|
15
|
+
require 'padrino-support/core_ext/string/undent' # deprecated
|
16
|
+
require 'padrino-support/core_ext/object_space'
|
17
|
+
require 'padrino-support/file_set'
|
18
|
+
|
19
|
+
|
20
|
+
##
|
21
|
+
# Loads our locale configuration files
|
22
|
+
#
|
23
|
+
if defined?(I18n) && !defined?(PADRINO_I18N_LOCALE)
|
24
|
+
PADRINO_I18N_LOCALE = true
|
25
|
+
I18n.load_path += Dir["#{File.dirname(__FILE__)}/padrino-support/locale/*.yml"]
|
26
|
+
end
|
27
|
+
|
28
|
+
##
|
29
|
+
# Make sure we can always use the class name
|
30
|
+
# In reloader for accessing class_name Foo._orig_klass_name
|
31
|
+
#
|
32
|
+
class Module
|
33
|
+
alias :_orig_klass_name :to_s
|
34
|
+
end
|
@@ -0,0 +1,49 @@
|
|
1
|
+
module ObjectSpace
|
2
|
+
class << self
|
3
|
+
##
|
4
|
+
# Returns all the classes in the object space.
|
5
|
+
# Optionally, a block can be passed, for example the following code
|
6
|
+
# would return the classes that start with the character "A":
|
7
|
+
#
|
8
|
+
# ObjectSpace.classes do |klass|
|
9
|
+
# if klass.to_s[0] == "A"
|
10
|
+
# klass
|
11
|
+
# end
|
12
|
+
# end
|
13
|
+
#
|
14
|
+
def classes(&block)
|
15
|
+
rs = Set.new
|
16
|
+
|
17
|
+
ObjectSpace.each_object(Class).each do |klass|
|
18
|
+
if block
|
19
|
+
if r = block.call(klass)
|
20
|
+
# add the returned value if the block returns something
|
21
|
+
rs << r
|
22
|
+
end
|
23
|
+
else
|
24
|
+
rs << klass
|
25
|
+
end
|
26
|
+
end
|
27
|
+
|
28
|
+
rs
|
29
|
+
end
|
30
|
+
|
31
|
+
##
|
32
|
+
# Returns a list of existing classes that are not included in "snapshot"
|
33
|
+
# This method is useful to get the list of new classes that were loaded
|
34
|
+
# after an event like requiring a file.
|
35
|
+
# Usage:
|
36
|
+
#
|
37
|
+
# snapshot = ObjectSpace.classes
|
38
|
+
# # require a file
|
39
|
+
# ObjectSpace.new_classes(snapshot)
|
40
|
+
#
|
41
|
+
def new_classes(snapshot)
|
42
|
+
self.classes do |klass|
|
43
|
+
if !snapshot.include?(klass)
|
44
|
+
klass
|
45
|
+
end
|
46
|
+
end
|
47
|
+
end
|
48
|
+
end
|
49
|
+
end
|
@@ -0,0 +1,40 @@
|
|
1
|
+
require 'win32console' if RUBY_PLATFORM =~ /(win|m)32/ # ruby color support for win
|
2
|
+
|
3
|
+
##
|
4
|
+
# Add colors
|
5
|
+
#
|
6
|
+
class String
|
7
|
+
# colorize(:red)
|
8
|
+
def colorize(color)
|
9
|
+
Colorizer.send(color, self)
|
10
|
+
end
|
11
|
+
|
12
|
+
# Used to colorize strings for the shell
|
13
|
+
class Colorizer
|
14
|
+
# Returns colors integer mapping
|
15
|
+
def self.colors
|
16
|
+
@_colors ||= {
|
17
|
+
:clear => 0,
|
18
|
+
:bold => 1,
|
19
|
+
:black => 30,
|
20
|
+
:red => 31,
|
21
|
+
:green => 32,
|
22
|
+
:yellow => 33,
|
23
|
+
:blue => 34,
|
24
|
+
:magenta => 35,
|
25
|
+
:cyan => 36,
|
26
|
+
:white => 37
|
27
|
+
}
|
28
|
+
end
|
29
|
+
|
30
|
+
# Defines class level color methods
|
31
|
+
# i.e Colorizer.red("hello")
|
32
|
+
class << self
|
33
|
+
Colorizer.colors.each do |color, value|
|
34
|
+
define_method(color) do |target|
|
35
|
+
"\e[#{value}m" << target << "\e[0m"
|
36
|
+
end
|
37
|
+
end
|
38
|
+
end
|
39
|
+
end
|
40
|
+
end
|
@@ -0,0 +1,98 @@
|
|
1
|
+
require 'active_support/inflections' # load default inflections
|
2
|
+
require 'active_support/inflector/methods' # constantize
|
3
|
+
require 'active_support/inflector/inflections' # pluralize
|
4
|
+
|
5
|
+
##
|
6
|
+
# This is an adapted version of active_support/core_ext/string/inflections.rb
|
7
|
+
# to prevent loading several dependencies including I18n gem.
|
8
|
+
#
|
9
|
+
# Issue: https://github.com/rails/rails/issues/1526
|
10
|
+
#
|
11
|
+
class String
|
12
|
+
##
|
13
|
+
# Returns the plural form of the word in the string.
|
14
|
+
#
|
15
|
+
# "post".pluralize # => "posts"
|
16
|
+
# "octopus".pluralize # => "octopi"
|
17
|
+
# "sheep".pluralize # => "sheep"
|
18
|
+
# "words".pluralize # => "words"
|
19
|
+
# "the blue mailman".pluralize # => "the blue mailmen"
|
20
|
+
# "CamelOctopus".pluralize # => "CamelOctopi"
|
21
|
+
#
|
22
|
+
def pluralize
|
23
|
+
ActiveSupport::Inflector.pluralize(self)
|
24
|
+
end
|
25
|
+
|
26
|
+
##
|
27
|
+
# Returns the singular form of the word in the string.
|
28
|
+
#
|
29
|
+
# "posts".singularize # => "post"
|
30
|
+
# "octopi".singularize # => "octopus"
|
31
|
+
# "sheep".singularize # => "sheep"
|
32
|
+
# "words".singularize # => "word"
|
33
|
+
# "the blue mailmen".singularize # => "the blue mailman"
|
34
|
+
# "CamelOctopi".singularize # => "CamelOctopus"
|
35
|
+
#
|
36
|
+
def singularize
|
37
|
+
ActiveSupport::Inflector.singularize(self)
|
38
|
+
end
|
39
|
+
|
40
|
+
##
|
41
|
+
# +constantize+ tries to find a declared constant with the name specified
|
42
|
+
# in the string. It raises a NameError when the name is not in CamelCase
|
43
|
+
# or is not initialized.
|
44
|
+
#
|
45
|
+
# "Module".constantize # => Module
|
46
|
+
# "Class".constantize # => Class
|
47
|
+
#
|
48
|
+
def constantize
|
49
|
+
ActiveSupport::Inflector.constantize(self)
|
50
|
+
end
|
51
|
+
|
52
|
+
##
|
53
|
+
# The reverse of +camelize+. Makes an underscored, lowercase form from the expression in the string.
|
54
|
+
#
|
55
|
+
# +underscore+ will also change '::' to '/' to convert namespaces to paths.
|
56
|
+
#
|
57
|
+
# "ActiveRecord".underscore # => "active_record"
|
58
|
+
# "ActiveRecord::Errors".underscore # => active_record/errors
|
59
|
+
#
|
60
|
+
def underscore
|
61
|
+
ActiveSupport::Inflector.underscore(self)
|
62
|
+
end
|
63
|
+
|
64
|
+
##
|
65
|
+
# By default, +camelize+ converts strings to UpperCamelCase. If the argument to camelize
|
66
|
+
# is set to <tt>:lower</tt> then camelize produces lowerCamelCase.
|
67
|
+
#
|
68
|
+
# +camelize+ will also convert '/' to '::' which is useful for converting paths to namespaces.
|
69
|
+
#
|
70
|
+
# "active_record".camelize # => "ActiveRecord"
|
71
|
+
# "active_record".camelize(:lower) # => "activeRecord"
|
72
|
+
# "active_record/errors".camelize # => "ActiveRecord::Errors"
|
73
|
+
# "active_record/errors".camelize(:lower) # => "activeRecord::Errors"
|
74
|
+
#
|
75
|
+
def camelize(first_letter = :upper)
|
76
|
+
case first_letter
|
77
|
+
when :upper then ActiveSupport::Inflector.camelize(self, true)
|
78
|
+
when :lower then ActiveSupport::Inflector.camelize(self, false)
|
79
|
+
end
|
80
|
+
end
|
81
|
+
alias_method :camelcase, :camelize
|
82
|
+
|
83
|
+
##
|
84
|
+
# Create a class name from a plural table name like Rails does for table names to models.
|
85
|
+
# Note that this returns a string and not a class. (To convert to an actual class
|
86
|
+
# follow +classify+ with +constantize+.)
|
87
|
+
#
|
88
|
+
# "egg_and_hams".classify # => "EggAndHam"
|
89
|
+
# "posts".classify # => "Post"
|
90
|
+
#
|
91
|
+
# Singular names are not handled correctly.
|
92
|
+
#
|
93
|
+
# "business".classify # => "Busines"
|
94
|
+
#
|
95
|
+
def classify
|
96
|
+
ActiveSupport::Inflector.classify(self)
|
97
|
+
end
|
98
|
+
end
|
@@ -0,0 +1,19 @@
|
|
1
|
+
##
|
2
|
+
# Removes indentation
|
3
|
+
#
|
4
|
+
# @example
|
5
|
+
# help <<-EOS.undent
|
6
|
+
# Here my help usage
|
7
|
+
# sample_code
|
8
|
+
#
|
9
|
+
# Fix
|
10
|
+
# EOS
|
11
|
+
# puts help.red.bold
|
12
|
+
#
|
13
|
+
class String
|
14
|
+
# Strip unnecessary indentation of the front of a string
|
15
|
+
def undent
|
16
|
+
warn "##{__method__} is deprecated"
|
17
|
+
gsub(/^.{#{slice(/^ +/).size}}/, '')
|
18
|
+
end
|
19
|
+
end
|
@@ -0,0 +1,25 @@
|
|
1
|
+
##
|
2
|
+
# FileSet helper method for iterating and interacting with files inside a directory
|
3
|
+
#
|
4
|
+
module FileSet
|
5
|
+
extend self
|
6
|
+
##
|
7
|
+
# Iterates over every file in the glob pattern and yields to a block
|
8
|
+
# Returns the list of files matching the glob pattern
|
9
|
+
# FileSet.glob('padrino-core/application/*.rb', __FILE__) { |file| load file }
|
10
|
+
#
|
11
|
+
def glob(glob_pattern, file_path=nil, &block)
|
12
|
+
glob_pattern = File.join(File.dirname(file_path), glob_pattern) if file_path
|
13
|
+
file_list = Dir.glob(glob_pattern).sort
|
14
|
+
file_list.each { |file| block.call(file) }
|
15
|
+
file_list
|
16
|
+
end
|
17
|
+
|
18
|
+
##
|
19
|
+
# Requires each file matched in the glob pattern into the application
|
20
|
+
# FileSet.glob_require('padrino-core/application/*.rb', __FILE__)
|
21
|
+
#
|
22
|
+
def glob_require(glob_pattern, file_path=nil)
|
23
|
+
glob(glob_pattern, file_path) { |f| require f }
|
24
|
+
end
|
25
|
+
end
|
@@ -0,0 +1,33 @@
|
|
1
|
+
cs:
|
2
|
+
date:
|
3
|
+
formats:
|
4
|
+
# Use the strftime parameters for formats.
|
5
|
+
# When no format has been given, it uses default.
|
6
|
+
# You can provide other formats here if you like!
|
7
|
+
default: "%d. %m. %Y"
|
8
|
+
short: "%d %b"
|
9
|
+
long: "%d. %B %Y"
|
10
|
+
only_day: "%e"
|
11
|
+
|
12
|
+
day_names: [Neděle, Pondělí, Úterý, Středa, Čtvrtek, Pátek, Sobota]
|
13
|
+
abbr_day_names: [Ne, Po, Út, St, Čt, Pá, So]
|
14
|
+
month_names: [~, Leden, Únor, Březen, Duben, Květen, Červen, Červenec, Srpen, Září, Říjen, Listopad, Prosinec]
|
15
|
+
abbr_month_names: [~, Led, Úno, Bře, Dub, Kvě, Čvn, Čvc, Srp, Zář, Říj, Lis, Pro]
|
16
|
+
order:
|
17
|
+
- day
|
18
|
+
- month
|
19
|
+
- year
|
20
|
+
|
21
|
+
time:
|
22
|
+
formats:
|
23
|
+
default: "%a %d. %B %Y %H:%M %z"
|
24
|
+
short: "%d. %m. %H:%M"
|
25
|
+
long: "%A %d. %B %Y %H:%M"
|
26
|
+
am: "dop"
|
27
|
+
pm: "odp"
|
28
|
+
|
29
|
+
support:
|
30
|
+
array:
|
31
|
+
words_connector: ", "
|
32
|
+
two_words_connector: " a "
|
33
|
+
last_word_connector: " a "
|
@@ -0,0 +1,33 @@
|
|
1
|
+
da:
|
2
|
+
date:
|
3
|
+
formats:
|
4
|
+
# Use the strftime parameters for formats.
|
5
|
+
# When no format has been given, it uses default.
|
6
|
+
# You can provide other formats here if you like!
|
7
|
+
default: "%d.%m.%Y"
|
8
|
+
short: "%e. %b %Y"
|
9
|
+
long: "%e. %B %Y"
|
10
|
+
only_day: "%e"
|
11
|
+
|
12
|
+
day_names: [søndag, mandag, tirsdag, onsdag, torsdag, fredag, lørdag]
|
13
|
+
abbr_day_names: [sø, ma, ti, 'on', to, fr, lø]
|
14
|
+
month_names: [~, januar, februar, marts, april, maj, juni, juli, august, september, oktober, november, december]
|
15
|
+
abbr_month_names: [~, jan, feb, mar, apr, maj, jun, jul, aug, sep, okt, nov, dec]
|
16
|
+
order:
|
17
|
+
- day
|
18
|
+
- month
|
19
|
+
- year
|
20
|
+
|
21
|
+
time:
|
22
|
+
formats:
|
23
|
+
default: "%e. %B %Y, %H:%M"
|
24
|
+
short: "%e. %b %Y, %H:%M"
|
25
|
+
long: "%A, %e. %B %Y, %H:%M"
|
26
|
+
am: ""
|
27
|
+
pm: ""
|
28
|
+
|
29
|
+
support:
|
30
|
+
array:
|
31
|
+
words_connector: ", "
|
32
|
+
two_words_connector: " og "
|
33
|
+
last_word_connector: " og "
|
@@ -0,0 +1,33 @@
|
|
1
|
+
de:
|
2
|
+
date:
|
3
|
+
formats:
|
4
|
+
# Benutze die strftime Parameter für die Formatierung
|
5
|
+
# Wenn keine Formate angegeben werden, wird "default" benutzt.
|
6
|
+
# Du kannst auch weitere Formate hinzufügen, wenn Du möchtest.
|
7
|
+
default: "&d.&m.%Y"
|
8
|
+
short: "%d. %b"
|
9
|
+
long: "%d. %B %Y"
|
10
|
+
only_day: "%e"
|
11
|
+
|
12
|
+
day_names: [Sonntag, Montag, Dienstag, Mittwoch, Donnerstag, Freitag, Samstag]
|
13
|
+
abbr_day_names: [So, Mo, Di, Mi, Do, Fr, Sa]
|
14
|
+
month_names: [~, Januar, Februar, März, April, Mai, Juni, Juli, August, September, Oktober, November, Dezember]
|
15
|
+
abbr_month_names: [~, Jan, Feb, Mär, Apr, Mai, Jun, Jul, Aug, Sep, Okt, Nov, Dez]
|
16
|
+
order:
|
17
|
+
- day
|
18
|
+
- month
|
19
|
+
- year
|
20
|
+
|
21
|
+
time:
|
22
|
+
formats:
|
23
|
+
default: "%a, %d. %b %Y %H:%M:%S %z"
|
24
|
+
short: "%d. %b %H:%M"
|
25
|
+
long: "%d. %B %Y %H:%M"
|
26
|
+
am: "am"
|
27
|
+
pm: "pm"
|
28
|
+
|
29
|
+
support:
|
30
|
+
array:
|
31
|
+
words_connector: ", "
|
32
|
+
two_words_connector: " und "
|
33
|
+
last_word_connector: " und "
|
@@ -0,0 +1,33 @@
|
|
1
|
+
en:
|
2
|
+
date:
|
3
|
+
formats:
|
4
|
+
# Use the strftime parameters for formats.
|
5
|
+
# When no format has been given, it uses default.
|
6
|
+
# You can provide other formats here if you like!
|
7
|
+
default: "%Y-%m-%d"
|
8
|
+
short: "%b %d"
|
9
|
+
long: "%B %d, %Y"
|
10
|
+
only_day: "%e"
|
11
|
+
|
12
|
+
day_names: [Sunday, Monday, Tuesday, Wednesday, Thursday, Friday, Saturday]
|
13
|
+
abbr_day_names: [Sun, Mon, Tue, Wed, Thu, Fri, Sat]
|
14
|
+
month_names: [~, January, February, March, April, May, June, July, August, September, October, November, December]
|
15
|
+
abbr_month_names: [~, Jan, Feb, Mar, Apr, May, Jun, Jul, Aug, Sep, Oct, Nov, Dec]
|
16
|
+
order:
|
17
|
+
- year
|
18
|
+
- month
|
19
|
+
- day
|
20
|
+
|
21
|
+
time:
|
22
|
+
formats:
|
23
|
+
default: "%a, %d %b %Y %H:%M:%S %z"
|
24
|
+
short: "%d %b %H:%M"
|
25
|
+
long: "%B %d, %Y %H:%M"
|
26
|
+
am: "am"
|
27
|
+
pm: "pm"
|
28
|
+
|
29
|
+
support:
|
30
|
+
array:
|
31
|
+
words_connector: ", "
|
32
|
+
two_words_connector: " and "
|
33
|
+
last_word_connector: ", and "
|
@@ -0,0 +1,33 @@
|
|
1
|
+
es:
|
2
|
+
date:
|
3
|
+
formats:
|
4
|
+
# Use the strftime parameters for formats.
|
5
|
+
# When no format has been given, it uses default.
|
6
|
+
# You can provide other formats here if you like!
|
7
|
+
default: "%d-%m-%Y"
|
8
|
+
short: "%b %d"
|
9
|
+
long: "%B %d, %Y"
|
10
|
+
only_day: "%e"
|
11
|
+
|
12
|
+
day_names: [Domingo, Lunes, Martes, Miércoles, Jueves, Viernes, Sábado]
|
13
|
+
abbr_day_names: [Dom, Lun, Mar, Mie, Jue, Vie, Sab]
|
14
|
+
month_names: [~, Enero, Febrero, Marzo, Abril, Mayo, Junio, Julio, Agosto, Septiembre, Octubre, Noviembre, Diciembre]
|
15
|
+
abbr_month_names: [~, Ene, Feb, Mar, Abr, May, Jun, Jul, Ago, Sep, Oct, Nov, Dic]
|
16
|
+
order:
|
17
|
+
- day
|
18
|
+
- month
|
19
|
+
- year
|
20
|
+
|
21
|
+
time:
|
22
|
+
formats:
|
23
|
+
default: "%a, %d %b %Y %H:%M:%S %z"
|
24
|
+
short: "%d %b %H:%M"
|
25
|
+
long: "%B %d, %Y %H:%M"
|
26
|
+
am: "am"
|
27
|
+
pm: "pm"
|
28
|
+
|
29
|
+
support:
|
30
|
+
array:
|
31
|
+
words_connector: ", "
|
32
|
+
two_words_connector: " y "
|
33
|
+
last_word_connector: ", y "
|
@@ -0,0 +1,33 @@
|
|
1
|
+
fr:
|
2
|
+
date:
|
3
|
+
formats:
|
4
|
+
# Use the strftime parameters for formats.
|
5
|
+
# When no format has been given, it uses default.
|
6
|
+
# You can provide other formats here if you like!
|
7
|
+
default: "%d-%m-%Y"
|
8
|
+
short: "%b %d"
|
9
|
+
long: "%B %d, %Y"
|
10
|
+
only_day: "%e"
|
11
|
+
|
12
|
+
day_names: [Dimanche, Lundi, Mardi, Mercredi, Jeudi, Vendredi, Samedi]
|
13
|
+
abbr_day_names: [Dim, Lun, Mar, Mer, Jeu, Ven, Sam]
|
14
|
+
month_names: [~, Janvier, Février, Mars, Avril, Mai, Juin, Juillet, Août, Septembre, Octobre, Novembre, Décembre]
|
15
|
+
abbr_month_names: [~, Jan, Fev, Mar, Avr, Mai, Jun, Jul, Aou, Sep, Oct, Nov, Dec]
|
16
|
+
order:
|
17
|
+
- day
|
18
|
+
- month
|
19
|
+
- year
|
20
|
+
|
21
|
+
time:
|
22
|
+
formats:
|
23
|
+
default: "%a, %d %b %Y %H:%M:%S %z"
|
24
|
+
short: "%d %b %H:%M"
|
25
|
+
long: "%B %d, %Y %H:%M"
|
26
|
+
am: "am"
|
27
|
+
pm: "pm"
|
28
|
+
|
29
|
+
support:
|
30
|
+
array:
|
31
|
+
words_connector: ", "
|
32
|
+
two_words_connector: " et "
|
33
|
+
last_word_connector: ", et "
|
@@ -0,0 +1,33 @@
|
|
1
|
+
hu:
|
2
|
+
date:
|
3
|
+
formats:
|
4
|
+
# Use the strftime parameters for formats.
|
5
|
+
# When no format has been given, it uses default.
|
6
|
+
# You can provide other formats here if you like!
|
7
|
+
default: "%Y-%m-%d"
|
8
|
+
short: "%b. %d."
|
9
|
+
long: "%Y. %B %d."
|
10
|
+
only_day: "%e"
|
11
|
+
|
12
|
+
day_names: [vasárnap, hétfő, kedd, szerda, csütörtök, péntek, szombat]
|
13
|
+
abbr_day_names: [vas, hét, kedd, sze, csüt, pén, szo]
|
14
|
+
month_names: [~, január, február, március, április, május, június, július, augusztus, szeptember, oktober, november, december]
|
15
|
+
abbr_month_names: [~, jan, febr, márc, ápr, máj, jún, júl, aug, szept, okt, nov, dec]
|
16
|
+
order:
|
17
|
+
- year
|
18
|
+
- month
|
19
|
+
- day
|
20
|
+
|
21
|
+
time:
|
22
|
+
formats:
|
23
|
+
default: "%Y. %B %d. %H:%M:%S %z, %A"
|
24
|
+
short: "%B %d. %H:%M"
|
25
|
+
long: "%Y. %B %d. %H:%M"
|
26
|
+
am: "de"
|
27
|
+
pm: "du"
|
28
|
+
|
29
|
+
support:
|
30
|
+
array:
|
31
|
+
words_connector: ", "
|
32
|
+
two_words_connector: " és "
|
33
|
+
last_word_connector: " és "
|
@@ -0,0 +1,39 @@
|
|
1
|
+
it:
|
2
|
+
date:
|
3
|
+
formats:
|
4
|
+
# Use the strftime parameters for formats.
|
5
|
+
# When no format has been given, it uses default.
|
6
|
+
# You can provide other formats here if you like!
|
7
|
+
default: "%d-%m-%Y"
|
8
|
+
short: "%d %b"
|
9
|
+
long: "%d %B %Y"
|
10
|
+
only_day: "%e"
|
11
|
+
|
12
|
+
day_names: [Domenica, Lunedì, Martedì, Mercoledì, Giovedì, Venerdì, Sabato]
|
13
|
+
abbr_day_names: [Dom, Lun, Mar, Mer, Gio, Ven, Sab]
|
14
|
+
month_names: [~, Gennaio, Febbraio, Marzo, Aprile, Maggio, Giugno, Luglio, Agosto, Settembre, Ottobre, Novembre, Dicembre]
|
15
|
+
abbr_month_names: [~, Gen, Feb, Mar, Apr, Mag, Giu, Lug, Ago, Set, Ott, Nov, Dic]
|
16
|
+
order:
|
17
|
+
- day
|
18
|
+
- month
|
19
|
+
- year
|
20
|
+
|
21
|
+
time:
|
22
|
+
formats:
|
23
|
+
default: "%a %d %b %Y, %H:%M:%S %z"
|
24
|
+
time: "%H:%M"
|
25
|
+
short: "%d %b %H:%M"
|
26
|
+
long: "%d %B %Y %H:%M"
|
27
|
+
only_second: "%S"
|
28
|
+
|
29
|
+
datetime:
|
30
|
+
formats:
|
31
|
+
default: "%d-%m-%YT%H:%M:%S%Z"
|
32
|
+
|
33
|
+
am: 'am'
|
34
|
+
pm: 'pm'
|
35
|
+
|
36
|
+
support:
|
37
|
+
array:
|
38
|
+
sentence_connector: "e"
|
39
|
+
skip_last_comma: false
|
@@ -0,0 +1,33 @@
|
|
1
|
+
ja:
|
2
|
+
date:
|
3
|
+
formats:
|
4
|
+
# Use the strftime parameters for formats.
|
5
|
+
# When no format has been given, it uses default.
|
6
|
+
# You can provide other formats here if you like!
|
7
|
+
default: "%Y/%m/%d"
|
8
|
+
short: "%m/%d"
|
9
|
+
long: "%Y年%m月%d日"
|
10
|
+
only_day: "%e"
|
11
|
+
|
12
|
+
day_names: [日曜日, 月曜日, 火曜日, 水曜日, 木曜日, 金曜日, 土曜日]
|
13
|
+
abbr_day_names: [日, 月, 火, 水, 木, 金, 土]
|
14
|
+
month_names: [~, 一月, 二月, 三月, 四月, 五月, 六月, 七月, 八月, 九月, 十月, 十一月, 十二月]
|
15
|
+
abbr_month_names: [~, 一月, 二月, 三月, 四月, 五月, 六月, 七月, 八月, 九月, 十月, 十一月, 十二月]
|
16
|
+
order:
|
17
|
+
- year
|
18
|
+
- month
|
19
|
+
- day
|
20
|
+
|
21
|
+
time:
|
22
|
+
formats:
|
23
|
+
default: "%Y/%m/%d %H:%M:%S"
|
24
|
+
short: "%m/%d %H:%M"
|
25
|
+
long: "%Y年%m月%d日 %H時%M分%S秒"
|
26
|
+
am: "午前"
|
27
|
+
pm: "午後"
|
28
|
+
|
29
|
+
support:
|
30
|
+
array:
|
31
|
+
words_connector: ", "
|
32
|
+
two_words_connector: " と "
|
33
|
+
last_word_connector: ", と "
|
@@ -0,0 +1,33 @@
|
|
1
|
+
lv:
|
2
|
+
date:
|
3
|
+
formats:
|
4
|
+
# Use the strftime parameters for formats.
|
5
|
+
# When no format has been given, it uses default.
|
6
|
+
# You can provide other formats here if you like!
|
7
|
+
default: "%d.%m.%Y"
|
8
|
+
short: "%e. %B"
|
9
|
+
long: "%Y. gada %e. %B"
|
10
|
+
only_day: "%e"
|
11
|
+
|
12
|
+
day_names: [Svētdiena, Pirmdiena, Otrdiena, Trešdiena, Ceturtdiena, Piektdiena, Sestdiena]
|
13
|
+
abbr_day_names: [Sv, P, O, T, C, P, S]
|
14
|
+
month_names: [~, Janvāris, Februāris, Marts, Aprīlis, Maijs, Jūnijs, Jūlijs, Augusts, Septembris, Oktobris, Novembris, Decembris]
|
15
|
+
abbr_month_names: [~, Janv, Febr, Marts, Apr, Maijs, Jūn, Jūl, Aug, Sept, Okt, Nov, Dec]
|
16
|
+
order:
|
17
|
+
- day
|
18
|
+
- month
|
19
|
+
- year
|
20
|
+
|
21
|
+
time:
|
22
|
+
formats:
|
23
|
+
default: "%Y. gada %e. %B, %H:%M"
|
24
|
+
short: "%d.%m.%Y, %H:%M"
|
25
|
+
long: "%Y. gada %e. %B, %H:%M:%S"
|
26
|
+
am: "priekšpusdiena"
|
27
|
+
pm: "pēcpusdiena"
|
28
|
+
|
29
|
+
support:
|
30
|
+
array:
|
31
|
+
words_connector: ", "
|
32
|
+
two_words_connector: " un "
|
33
|
+
last_word_connector: ", un "
|
@@ -0,0 +1,33 @@
|
|
1
|
+
nl:
|
2
|
+
date:
|
3
|
+
formats:
|
4
|
+
# Use the strftime parameters for formats.
|
5
|
+
# When no format has been given, it uses default.
|
6
|
+
# You can provide other formats here if you like!
|
7
|
+
default: "%d-%m-%Y"
|
8
|
+
short: "%d %b"
|
9
|
+
long: "%d %B %Y"
|
10
|
+
only_day: "%e"
|
11
|
+
|
12
|
+
day_names: [zondag, maandag, dinsdag, woensdag, donderdag, vrijdag, zaterdag]
|
13
|
+
abbr_day_names: [zo, ma, di, wo, do, vr, za]
|
14
|
+
month_names: [~, januari, februari, maart, april, mei, juni, juli, augustus, september, oktober, november, december]
|
15
|
+
abbr_month_names: [~, jan, feb, maa, apr, mei, jun, jul, aug, sep, okt, nov, dec]
|
16
|
+
order:
|
17
|
+
- day
|
18
|
+
- month
|
19
|
+
- year
|
20
|
+
|
21
|
+
time:
|
22
|
+
formats:
|
23
|
+
default: "%a %d %b %Y %H:%M:%S %z"
|
24
|
+
short: "%d %b %H:%M"
|
25
|
+
long: "%d %B %Y %H:%M"
|
26
|
+
am: "am"
|
27
|
+
pm: "pm"
|
28
|
+
|
29
|
+
support:
|
30
|
+
array:
|
31
|
+
words_connector: ", "
|
32
|
+
two_words_connector: " en "
|
33
|
+
last_word_connector: " en "
|
@@ -0,0 +1,33 @@
|
|
1
|
+
"no":
|
2
|
+
date:
|
3
|
+
formats:
|
4
|
+
# Use the strftime parameters for formats.
|
5
|
+
# When no format has been given, it uses default.
|
6
|
+
# You can provide other formats here if you like!
|
7
|
+
default: "%d.%m.%Y"
|
8
|
+
short: "%e. %b %Y"
|
9
|
+
long: "%e. %B %Y"
|
10
|
+
only_day: "%e"
|
11
|
+
|
12
|
+
day_names: [søndag, mandag, tirsdag, onsdag, torsdag, fredag, lørdag]
|
13
|
+
abbr_day_names: [sø, ma, ti, 'on', to, fr, lø]
|
14
|
+
month_names: [~, januar, februar, mars, april, mai, juni, juli, august, september, oktober, november, desember]
|
15
|
+
abbr_month_names: [~, jan, feb, mar, apr, maj, jun, jul, aug, sep, okt, nov, des]
|
16
|
+
order:
|
17
|
+
- day
|
18
|
+
- month
|
19
|
+
- year
|
20
|
+
|
21
|
+
time:
|
22
|
+
formats:
|
23
|
+
default: "%e. %B %Y, %H:%M"
|
24
|
+
short: "%e. %b %Y, %H:%M"
|
25
|
+
long: "%A, %e. %B %Y, %H:%M"
|
26
|
+
am: ""
|
27
|
+
pm: ""
|
28
|
+
|
29
|
+
support:
|
30
|
+
array:
|
31
|
+
words_connector: ", "
|
32
|
+
two_words_connector: " og "
|
33
|
+
last_word_connector: " og "
|
@@ -0,0 +1,33 @@
|
|
1
|
+
pl:
|
2
|
+
date:
|
3
|
+
formats:
|
4
|
+
# Use the strftime parameters for formats.
|
5
|
+
# When no format has been given, it uses default.
|
6
|
+
# You can provide other formats here if you like!
|
7
|
+
default: "%Y-%m-%d"
|
8
|
+
short: "%d %b"
|
9
|
+
long: "%d %B %Y"
|
10
|
+
only_day: "%e"
|
11
|
+
|
12
|
+
day_names: [Niedziela, Poniedziałek, Wtorek, Środa, Czwartek, Piątek, Sobota]
|
13
|
+
abbr_day_names: [nie, pon, wto, śro, czw, pia, sob]
|
14
|
+
month_names: [~, Styczeń, Luty, Marzec, Kwiecień, Maj, Czerwiec, Lipiec, Sierpień, Wrzesień, Październik, Listopad, Grudzień]
|
15
|
+
abbr_month_names: [~, sty, lut, mar, kwi, maj, cze, lip, sie, wrz, paź, lis, gru]
|
16
|
+
order:
|
17
|
+
- year
|
18
|
+
- month
|
19
|
+
- day
|
20
|
+
|
21
|
+
time:
|
22
|
+
formats:
|
23
|
+
default: "%a, %d %b %Y, %H:%M:%S %z"
|
24
|
+
short: "%d %b, %H:%M"
|
25
|
+
long: "%d %B %Y, %H:%M"
|
26
|
+
am: "przed południem"
|
27
|
+
pm: "po południu"
|
28
|
+
|
29
|
+
support:
|
30
|
+
array:
|
31
|
+
words_connector: ", "
|
32
|
+
two_words_connector: " i "
|
33
|
+
last_word_connector: " i "
|
@@ -0,0 +1,39 @@
|
|
1
|
+
pt_br:
|
2
|
+
date:
|
3
|
+
formats:
|
4
|
+
# Use the strftime parameters for formats.
|
5
|
+
# When no format has been given, it uses default.
|
6
|
+
# You can provide other formats here if you like!
|
7
|
+
default: "%d-%m-%Y"
|
8
|
+
short: "%d %b"
|
9
|
+
long: "%d %B %Y"
|
10
|
+
only_day: "%e"
|
11
|
+
|
12
|
+
day_names: [Domingo, Segunda-feira, Terça-feira, Quarta-feira, Quinta-feira, Sexta-feira, Sábado]
|
13
|
+
abbr_day_names: [Dom, Seg, Ter, Qua, Qui, Sex, Sab]
|
14
|
+
month_names: [~, Janeiro, Fevereiro, Março, Abril, Maio, Junho, Julho, Agosto, Setembro, Outubro, Novembro, Dezembro]
|
15
|
+
abbr_month_names: [~, Jan, Fev, Mar, Abr, Maio, Jun, Jul, Ago, Set, Out, Nov, Dez]
|
16
|
+
order:
|
17
|
+
- day
|
18
|
+
- month
|
19
|
+
- year
|
20
|
+
|
21
|
+
time:
|
22
|
+
formats:
|
23
|
+
default: "%a %d %b %Y, %H:%M:%S %z"
|
24
|
+
time: "%H:%M"
|
25
|
+
short: "%d %b %H:%M"
|
26
|
+
long: "%d %B %Y %H:%M"
|
27
|
+
only_second: "%S"
|
28
|
+
|
29
|
+
datetime:
|
30
|
+
formats:
|
31
|
+
default: "%d-%m-%YT%H:%M:%S%Z"
|
32
|
+
|
33
|
+
am: 'am'
|
34
|
+
pm: 'pm'
|
35
|
+
|
36
|
+
support:
|
37
|
+
array:
|
38
|
+
sentence_connector: "e"
|
39
|
+
skip_last_comma: false
|
@@ -0,0 +1,33 @@
|
|
1
|
+
ro:
|
2
|
+
date:
|
3
|
+
formats:
|
4
|
+
# Use the strftime parameters for formats.
|
5
|
+
# When no format has been given, it uses default.
|
6
|
+
# You can provide other formats here if you like!
|
7
|
+
default: "%d.%m.%Y"
|
8
|
+
short: "%d %b"
|
9
|
+
long: "%d %B %Y"
|
10
|
+
only_day: "%e"
|
11
|
+
|
12
|
+
day_names: [Duminică, Luni, Marți, Miercuri, Joi, Vineri, Sâmbătă]
|
13
|
+
abbr_day_names: [Dum, Lun, Mar, Mie, Joi, Vin, Sâm]
|
14
|
+
month_names: [~, Ianuarie, Februarie, Martie, Aprilie, Mai, Iunie, Iulie, August, Septembrie, Octombrie, Noiembrie, Decembrie]
|
15
|
+
abbr_month_names: [~, Ian, Feb, Mar, Apr, Mai, Iun, Iul, Aug, Sep, Oct, Noi, Dec]
|
16
|
+
order:
|
17
|
+
- day
|
18
|
+
- month
|
19
|
+
- year
|
20
|
+
|
21
|
+
time:
|
22
|
+
formats:
|
23
|
+
default: "%a, %d %b %Y %H:%M:%S %z"
|
24
|
+
short: "%d %b %H:%M"
|
25
|
+
long: "%d, %B %Y %H:%M"
|
26
|
+
am: "am"
|
27
|
+
pm: "pm"
|
28
|
+
|
29
|
+
support:
|
30
|
+
array:
|
31
|
+
words_connector: ", "
|
32
|
+
two_words_connector: " și "
|
33
|
+
last_word_connector: " și "
|
@@ -0,0 +1,34 @@
|
|
1
|
+
ru:
|
2
|
+
date:
|
3
|
+
formats:
|
4
|
+
# Use the strftime parameters for formats.
|
5
|
+
# When no format has been given, it uses default.
|
6
|
+
# You can provide other formats here if you like!
|
7
|
+
default: "%d.%m.%Y"
|
8
|
+
short: "%d %b"
|
9
|
+
long: "%e %B, %Y"
|
10
|
+
only_day: "%e"
|
11
|
+
|
12
|
+
day_names: [Воскресенье, Понедельник, Вторник, Среда, Четверг, Пятница, Суббота]
|
13
|
+
abbr_day_names: [Вс, Пн, Вт, Ср, Чт, Пт, Сб]
|
14
|
+
month_names: [~, Январь, Февраль, Март, Апрель, Май, Июнь, Июль, Август, Сентябрь, Октябрь, Ноябрь, Декабрь]
|
15
|
+
abbr_month_names: [~, Янв, Фев, Мар, Апр, Май, Июн, Июл, Авг, Сен, Окт, Ноя, Дек]
|
16
|
+
order:
|
17
|
+
- year
|
18
|
+
- month
|
19
|
+
- day
|
20
|
+
|
21
|
+
time:
|
22
|
+
formats:
|
23
|
+
default: "%a, %d %b %Y %H:%M:%S %z"
|
24
|
+
short: "%d %b %H:%M"
|
25
|
+
long: "%e %B, %Y %H:%M"
|
26
|
+
am: "д.п."
|
27
|
+
pm: "п.п."
|
28
|
+
|
29
|
+
support:
|
30
|
+
array:
|
31
|
+
words_connector: ", "
|
32
|
+
two_words_connector: " и "
|
33
|
+
last_word_connector: " и "
|
34
|
+
|
@@ -0,0 +1,33 @@
|
|
1
|
+
sv:
|
2
|
+
date:
|
3
|
+
formats:
|
4
|
+
# Use the strftime parameters for formats.
|
5
|
+
# When no format has been given, it uses default.
|
6
|
+
# You can provide other formats here if you like!
|
7
|
+
default: "%Y-%m-%d"
|
8
|
+
short: "%b %d"
|
9
|
+
long: "%B %d, %Y"
|
10
|
+
only_day: "%e"
|
11
|
+
|
12
|
+
day_names: [söndag, måndag, tisdag, onsdag, torsdag, fredag, lördag]
|
13
|
+
abbr_day_names: [sön, mån, tis, ons, tors, fre, lör]
|
14
|
+
month_names: [~, januari, februari, mars, april, maj, juni, juli, augusti, september, oktober, november, december]
|
15
|
+
abbr_month_names: [~, jan, feb, mar, apr, may, jun, jul, aug, sep, okt, nov, dec]
|
16
|
+
order:
|
17
|
+
- år
|
18
|
+
- månad
|
19
|
+
- dag
|
20
|
+
|
21
|
+
time:
|
22
|
+
formats:
|
23
|
+
default: "%a, %d %b %Y %H:%M:%S %z"
|
24
|
+
short: "%d %b %H:%M"
|
25
|
+
long: "%B %d, %Y %H:%M"
|
26
|
+
am: "fm"
|
27
|
+
pm: "em"
|
28
|
+
|
29
|
+
support:
|
30
|
+
array:
|
31
|
+
words_connector: ", "
|
32
|
+
two_words_connector: " och "
|
33
|
+
last_word_connector: ", och "
|
@@ -0,0 +1,33 @@
|
|
1
|
+
tr:
|
2
|
+
date:
|
3
|
+
formats:
|
4
|
+
# Use the strftime parameters for formats.
|
5
|
+
# When no format has been given, it uses default.
|
6
|
+
# You can provide other formats here if you like!
|
7
|
+
default: "%d/%m/%Y"
|
8
|
+
short: "%d %b"
|
9
|
+
long: "%d %B %Y"
|
10
|
+
only_day: "%e"
|
11
|
+
|
12
|
+
day_names: [Pazar, Pazartesi, Salı, Çarşamba, Perşembe, Cuma, Cumartesi]
|
13
|
+
abbr_day_names: [Paz, Pts, Sal, Çar, Per, Cum, Cts]
|
14
|
+
month_names: [~, Ocak, Şubat, Mart, Nisan, Mayıs, Haziran, Temmuz, Ağustos, Eylül, Ekim, Kasım, Aralık]
|
15
|
+
abbr_month_names: [~, Oca, Şub, Mar, Nis, May, Haz, Tem, Ağu, Eyl, Eki, Kas, Ara]
|
16
|
+
order:
|
17
|
+
- day
|
18
|
+
- month
|
19
|
+
- year
|
20
|
+
|
21
|
+
time:
|
22
|
+
formats:
|
23
|
+
default: "%a, %b %b %Y %H:%M:%S %z"
|
24
|
+
short: "%b %d %H:%M"
|
25
|
+
long: "%d %B, %Y %H:%M"
|
26
|
+
am: "öö"
|
27
|
+
pm: "ös"
|
28
|
+
|
29
|
+
support:
|
30
|
+
array:
|
31
|
+
words_connector: ", "
|
32
|
+
two_words_connector: " ve "
|
33
|
+
last_word_connector: " ve "
|
@@ -0,0 +1,33 @@
|
|
1
|
+
uk:
|
2
|
+
date:
|
3
|
+
formats:
|
4
|
+
# Use the strftime parameters for formats.
|
5
|
+
# When no format has been given, it uses default.
|
6
|
+
# You can provide other formats here if you like!
|
7
|
+
default: "%d.%m.%Y"
|
8
|
+
short: "%d %b"
|
9
|
+
long: "%e %B, %Y"
|
10
|
+
only_day: "%e"
|
11
|
+
|
12
|
+
day_names: [Неділя, Понеділок, Вівторок, Середа, Четвер, Пятница, Субота]
|
13
|
+
abbr_day_names: [Нд, Пн, Вт, Ср, Чт, Пт, Сб]
|
14
|
+
month_names: [~, Січено, Лютий, Березень, Квітень, Травень, Червень, Липень, Серпень, Вересень, Жовтень, Листопад, Грудень]
|
15
|
+
abbr_month_names: [~, Січ, Лют, Бер, Кві, Тра, Чер, Лип, Сер, Вер, Жов, Лис, Гру]
|
16
|
+
order:
|
17
|
+
- year
|
18
|
+
- month
|
19
|
+
- day
|
20
|
+
|
21
|
+
time:
|
22
|
+
formats:
|
23
|
+
default: "%a, %d %b %Y %H:%M:%S %z"
|
24
|
+
short: "%d %b %H:%M"
|
25
|
+
long: "%e %B, %Y %H:%M"
|
26
|
+
am: "д.п."
|
27
|
+
pm: "п.п"
|
28
|
+
|
29
|
+
support:
|
30
|
+
array:
|
31
|
+
words_connector: ", "
|
32
|
+
two_words_connector: " і "
|
33
|
+
last_word_connector: ", і "
|
@@ -0,0 +1,33 @@
|
|
1
|
+
zh_cn:
|
2
|
+
date:
|
3
|
+
formats:
|
4
|
+
# Use the strftime parameters for formats.
|
5
|
+
# When no format has been given, it uses default.
|
6
|
+
# You can provide other formats here if you like!
|
7
|
+
default: "%Y年%m月%d日"
|
8
|
+
short: "%b月%d日"
|
9
|
+
long: "%Y年%B月%d日"
|
10
|
+
only_day: "%e"
|
11
|
+
|
12
|
+
day_names: [星期日, 星期一, 星期二, 星期三, 星期四, 星期五, 星期六]
|
13
|
+
abbr_day_names: [日, 一, 二, 三, 四, 五, 六]
|
14
|
+
month_names: [~, 1月, 2月, 3月, 4月, 5月, 6月, 7月, 8月, 9月, 10月, 11月, 12月]
|
15
|
+
abbr_month_names: [~, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12]
|
16
|
+
order:
|
17
|
+
- year
|
18
|
+
- month
|
19
|
+
- day
|
20
|
+
|
21
|
+
time:
|
22
|
+
formats:
|
23
|
+
default: "%Y年%b月%d日 %H:%M:%S %z"
|
24
|
+
short: "%b月%d日 %H:%M"
|
25
|
+
long: "%Y年%B%d日 %H时%M分"
|
26
|
+
am: "上午"
|
27
|
+
pm: "下午"
|
28
|
+
|
29
|
+
support:
|
30
|
+
array:
|
31
|
+
words_connector: ","
|
32
|
+
two_words_connector: "和"
|
33
|
+
last_word_connector: ",还有"
|
@@ -0,0 +1,33 @@
|
|
1
|
+
zh_tw:
|
2
|
+
date:
|
3
|
+
formats:
|
4
|
+
# Use the strftime parameters for formats.
|
5
|
+
# When no format has been given, it uses default.
|
6
|
+
# You can provide other formats here if you like!
|
7
|
+
default: "%Y-%m-%d"
|
8
|
+
short: "%b%d日"
|
9
|
+
long: "%Y年%b%d日"
|
10
|
+
only_day: "%e"
|
11
|
+
|
12
|
+
day_names: [星期日, 星期一, 星期二, 星期三, 星期四, 星期五, 星期六]
|
13
|
+
abbr_day_names: [日, 一, 二, 三, 四, 五, 六]
|
14
|
+
month_names: [~, 一月, 二月, 三月, 四月, 五月, 六月, 七月, 八月, 九月, 十月, 十一月, 十二月]
|
15
|
+
abbr_month_names: [~, 1月, 2月, 3月, 4月, 5月, 6月, 7月, 8月, 9月, 10月, 11月, 12月]
|
16
|
+
order:
|
17
|
+
- year
|
18
|
+
- month
|
19
|
+
- day
|
20
|
+
|
21
|
+
time:
|
22
|
+
formats:
|
23
|
+
default: "%Y年%b%d日 %A %H:%M:%S %Z"
|
24
|
+
short: "%b%d日 %H:%M"
|
25
|
+
long: "%Y年%b%d日 %H:%M"
|
26
|
+
am: "上午"
|
27
|
+
pm: "下午"
|
28
|
+
|
29
|
+
support:
|
30
|
+
array:
|
31
|
+
words_connector: ", "
|
32
|
+
two_words_connector: " 和 "
|
33
|
+
last_word_connector: ", 和 "
|
@@ -0,0 +1,27 @@
|
|
1
|
+
#!/usr/bin/env gem build
|
2
|
+
# encoding: utf-8
|
3
|
+
|
4
|
+
require File.expand_path("../../padrino-core/lib/padrino-core/version.rb", __FILE__)
|
5
|
+
|
6
|
+
Gem::Specification.new do |s|
|
7
|
+
s.name = "padrino-support"
|
8
|
+
s.rubyforge_project = "padrino-support"
|
9
|
+
s.authors = ["Padrino Team", "Nathan Esquenazi", "Davide D'Agostino", "Arthur Chiu", "Igor Bochkariov"]
|
10
|
+
s.email = "padrinorb@gmail.com"
|
11
|
+
s.summary = "Support for padrino"
|
12
|
+
s.homepage = "http://www.padrinorb.com"
|
13
|
+
s.description = "A number of support methods and extensions for Padrino framework"
|
14
|
+
s.required_rubygems_version = ">= 1.3.6"
|
15
|
+
s.version = Padrino.version
|
16
|
+
s.date = Time.now.strftime("%Y-%m-%d")
|
17
|
+
s.license = "MIT"
|
18
|
+
|
19
|
+
s.extra_rdoc_files = Dir["*.rdoc"]
|
20
|
+
s.files = `git ls-files`.split("\n")
|
21
|
+
s.test_files = `git ls-files -- {test,spec,features}/*`.split("\n")
|
22
|
+
s.executables = `git ls-files -- bin/*`.split("\n").map{ |f| File.basename(f) }
|
23
|
+
s.require_paths = ["lib"]
|
24
|
+
s.rdoc_options = ["--charset=UTF-8"]
|
25
|
+
|
26
|
+
s.add_dependency("activesupport", ">= 3.1")
|
27
|
+
end
|
data/test/helper.rb
ADDED
@@ -0,0 +1,8 @@
|
|
1
|
+
ENV['RACK_ENV'] = 'test'
|
2
|
+
PADRINO_ROOT = File.dirname(__FILE__) unless defined?(PADRINO_ROOT)
|
3
|
+
|
4
|
+
require File.expand_path('../../../load_paths', __FILE__)
|
5
|
+
require 'minitest/autorun'
|
6
|
+
require 'minitest/pride'
|
7
|
+
require 'padrino-support'
|
8
|
+
require 'padrino-core/logger'
|
@@ -0,0 +1,50 @@
|
|
1
|
+
require File.expand_path(File.dirname(__FILE__) + '/helper')
|
2
|
+
|
3
|
+
describe "ObjectSpace" do
|
4
|
+
describe "#classes" do
|
5
|
+
it 'should take an snapshot of the current loaded classes' do
|
6
|
+
snapshot = ObjectSpace.classes
|
7
|
+
assert_equal snapshot.include?(Padrino::Logger), true
|
8
|
+
end
|
9
|
+
|
10
|
+
it 'should return a Set object' do
|
11
|
+
snapshot = ObjectSpace.classes
|
12
|
+
assert_equal snapshot.kind_of?(Set), true
|
13
|
+
end
|
14
|
+
|
15
|
+
it 'should be able to process a the class name given a block' do
|
16
|
+
klasses = ObjectSpace.classes do |klass|
|
17
|
+
if klass.name =~ /^Padrino::/
|
18
|
+
klass
|
19
|
+
end
|
20
|
+
end
|
21
|
+
|
22
|
+
assert_equal (klasses.size > 1), true
|
23
|
+
klasses.each do |klass|
|
24
|
+
assert_match /^Padrino::/, klass.to_s
|
25
|
+
end
|
26
|
+
end
|
27
|
+
end
|
28
|
+
|
29
|
+
describe "#new_classes" do
|
30
|
+
before do
|
31
|
+
@snapshot = ObjectSpace.classes
|
32
|
+
end
|
33
|
+
|
34
|
+
it 'should return list of new classes' do
|
35
|
+
class OSTest; end
|
36
|
+
module OSTestModule; class B; end; end
|
37
|
+
|
38
|
+
new_classes = ObjectSpace.new_classes(@snapshot)
|
39
|
+
|
40
|
+
assert_equal new_classes.size, 2
|
41
|
+
assert_equal new_classes.include?(OSTest), true
|
42
|
+
assert_equal new_classes.include?(OSTestModule::B), true
|
43
|
+
end
|
44
|
+
|
45
|
+
it 'should return a Set object' do
|
46
|
+
new_classes = ObjectSpace.new_classes(@snapshot)
|
47
|
+
assert_equal new_classes.kind_of?(Set), true
|
48
|
+
end
|
49
|
+
end
|
50
|
+
end
|
metadata
ADDED
@@ -0,0 +1,100 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: padrino-support
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.12.1
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- Padrino Team
|
8
|
+
- Nathan Esquenazi
|
9
|
+
- Davide D'Agostino
|
10
|
+
- Arthur Chiu
|
11
|
+
- Igor Bochkariov
|
12
|
+
autorequire:
|
13
|
+
bindir: bin
|
14
|
+
cert_chain: []
|
15
|
+
date: 2014-04-04 00:00:00.000000000 Z
|
16
|
+
dependencies:
|
17
|
+
- !ruby/object:Gem::Dependency
|
18
|
+
name: activesupport
|
19
|
+
requirement: !ruby/object:Gem::Requirement
|
20
|
+
requirements:
|
21
|
+
- - '>='
|
22
|
+
- !ruby/object:Gem::Version
|
23
|
+
version: '3.1'
|
24
|
+
type: :runtime
|
25
|
+
prerelease: false
|
26
|
+
version_requirements: !ruby/object:Gem::Requirement
|
27
|
+
requirements:
|
28
|
+
- - '>='
|
29
|
+
- !ruby/object:Gem::Version
|
30
|
+
version: '3.1'
|
31
|
+
description: A number of support methods and extensions for Padrino framework
|
32
|
+
email: padrinorb@gmail.com
|
33
|
+
executables: []
|
34
|
+
extensions: []
|
35
|
+
extra_rdoc_files: []
|
36
|
+
files:
|
37
|
+
- .document
|
38
|
+
- .gitignore
|
39
|
+
- .yardopts
|
40
|
+
- LICENSE.txt
|
41
|
+
- Rakefile
|
42
|
+
- lib/padrino-support.rb
|
43
|
+
- lib/padrino-support/core_ext/object_space.rb
|
44
|
+
- lib/padrino-support/core_ext/string/colorize.rb
|
45
|
+
- lib/padrino-support/core_ext/string/inflections.rb
|
46
|
+
- lib/padrino-support/core_ext/string/undent.rb
|
47
|
+
- lib/padrino-support/file_set.rb
|
48
|
+
- lib/padrino-support/locale/cs.yml
|
49
|
+
- lib/padrino-support/locale/da.yml
|
50
|
+
- lib/padrino-support/locale/de.yml
|
51
|
+
- lib/padrino-support/locale/en.yml
|
52
|
+
- lib/padrino-support/locale/es.yml
|
53
|
+
- lib/padrino-support/locale/fr.yml
|
54
|
+
- lib/padrino-support/locale/hu.yml
|
55
|
+
- lib/padrino-support/locale/it.yml
|
56
|
+
- lib/padrino-support/locale/ja.yml
|
57
|
+
- lib/padrino-support/locale/lv.yml
|
58
|
+
- lib/padrino-support/locale/nl.yml
|
59
|
+
- lib/padrino-support/locale/no.yml
|
60
|
+
- lib/padrino-support/locale/pl.yml
|
61
|
+
- lib/padrino-support/locale/pt_br.yml
|
62
|
+
- lib/padrino-support/locale/ro.yml
|
63
|
+
- lib/padrino-support/locale/ru.yml
|
64
|
+
- lib/padrino-support/locale/sv.yml
|
65
|
+
- lib/padrino-support/locale/tr.yml
|
66
|
+
- lib/padrino-support/locale/uk.yml
|
67
|
+
- lib/padrino-support/locale/zh_cn.yml
|
68
|
+
- lib/padrino-support/locale/zh_tw.yml
|
69
|
+
- padrino-support.gemspec
|
70
|
+
- test/helper.rb
|
71
|
+
- test/test_support_lite.rb
|
72
|
+
homepage: http://www.padrinorb.com
|
73
|
+
licenses:
|
74
|
+
- MIT
|
75
|
+
metadata: {}
|
76
|
+
post_install_message:
|
77
|
+
rdoc_options:
|
78
|
+
- --charset=UTF-8
|
79
|
+
require_paths:
|
80
|
+
- lib
|
81
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
82
|
+
requirements:
|
83
|
+
- - '>='
|
84
|
+
- !ruby/object:Gem::Version
|
85
|
+
version: '0'
|
86
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
87
|
+
requirements:
|
88
|
+
- - '>='
|
89
|
+
- !ruby/object:Gem::Version
|
90
|
+
version: 1.3.6
|
91
|
+
requirements: []
|
92
|
+
rubyforge_project: padrino-support
|
93
|
+
rubygems_version: 2.0.6
|
94
|
+
signing_key:
|
95
|
+
specification_version: 4
|
96
|
+
summary: Support for padrino
|
97
|
+
test_files:
|
98
|
+
- test/helper.rb
|
99
|
+
- test/test_support_lite.rb
|
100
|
+
has_rdoc:
|