fuzzyclock 0.0.2 → 0.0.3
Sign up to get free protection for your applications and to get access to all the features.
- data/README.md +3 -0
- data/bin/fuzzyclock +3 -3
- data/lib/fuzzyclock.rb +1 -0
- data/lib/fuzzyclock/locale/el.rb +39 -0
- data/lib/fuzzyclock/locale/en.rb +2 -2
- data/lib/fuzzyclock/locale/se.rb +2 -2
- data/lib/fuzzyclock/version.rb +3 -1
- metadata +5 -4
data/README.md
CHANGED
data/bin/fuzzyclock
CHANGED
@@ -24,11 +24,11 @@ class FuzzyClockCommand
|
|
24
24
|
OptionParser.new { |opts|
|
25
25
|
opts.banner = "Usage: #{File.basename(__FILE__)} [options]"
|
26
26
|
|
27
|
-
opts.on("-a", "--about", "
|
27
|
+
opts.on("-a", "--about", "it's about [...]") do |v|
|
28
28
|
self.options[:about] = v
|
29
29
|
end
|
30
30
|
|
31
|
-
opts.on("-l", "--locale [lang]", String, "
|
31
|
+
opts.on("-l", "--locale [lang]", String, "langage") do |v|
|
32
32
|
self.options[:locale] = v
|
33
33
|
end
|
34
34
|
|
@@ -36,7 +36,7 @@ class FuzzyClockCommand
|
|
36
36
|
self.options[:upcase] = v
|
37
37
|
end
|
38
38
|
|
39
|
-
opts.on("-C", "--capitalize", "Capitalize
|
39
|
+
opts.on("-C", "--capitalize", "Capitalize output") do |v|
|
40
40
|
self.options[:capitalize] = v
|
41
41
|
end
|
42
42
|
|
data/lib/fuzzyclock.rb
CHANGED
@@ -0,0 +1,39 @@
|
|
1
|
+
# encoding: utf-8
|
2
|
+
|
3
|
+
class FuzzyClock
|
4
|
+
@@locales ||= {}
|
5
|
+
@@locales[:el] = {
|
6
|
+
:about => "είναι σχεδόν %t",
|
7
|
+
:hour => {
|
8
|
+
0 => "δώδεκα",
|
9
|
+
1 => "μία",
|
10
|
+
2 => "δύο",
|
11
|
+
3 => "τρεις",
|
12
|
+
4 => "τέσσερις",
|
13
|
+
5 => "πέντε",
|
14
|
+
6 => "έξη",
|
15
|
+
7 => "εφτά",
|
16
|
+
8 => "οχτώ",
|
17
|
+
9 => "εννιά",
|
18
|
+
10 => "δέκα",
|
19
|
+
11 => "έντεκα",
|
20
|
+
12 => "δώδεκα",
|
21
|
+
},
|
22
|
+
:min => {
|
23
|
+
0..0 => "%0 ακριβώς",
|
24
|
+
1..2 => "λίγο μετά τις %0",
|
25
|
+
3..7 => "%0 και πέντα",
|
26
|
+
8..12 => "%0 και δέκα",
|
27
|
+
13..17 => "%0 και τέταρτο",
|
28
|
+
18..22 => "%0 και είκοσι",
|
29
|
+
23..27 => "%0 και είκοσι πέντε",
|
30
|
+
28..32 => ["%0 και μισή", "%0-μιση"], # randomly picked
|
31
|
+
33..37 => "%1 παρά είκοσι πέντε",
|
32
|
+
38..42 => "%1 παρά είκοσι",
|
33
|
+
43..47 => "%1 παρά τέταρτο",
|
34
|
+
48..52 => "%1 παρά δείκα",
|
35
|
+
53..57 => "%1 παρά 5",
|
36
|
+
58..59 => ["σχεδόν %1", "%1 παρά κάτι"] # randomly picked
|
37
|
+
}
|
38
|
+
}
|
39
|
+
end
|
data/lib/fuzzyclock/locale/en.rb
CHANGED
@@ -27,13 +27,13 @@ class FuzzyClock
|
|
27
27
|
13..17 => "quarter past %0",
|
28
28
|
18..22 => "twenty past %0",
|
29
29
|
23..27 => "twenty five past %0",
|
30
|
-
28..32 => ["half past %0", "%0 thirty"],
|
30
|
+
28..32 => ["half past %0", "%0 thirty"], # randomly picked
|
31
31
|
33..37 => "twenty five to %1",
|
32
32
|
38..42 => "twenty to %1",
|
33
33
|
43..47 => "quarter to %1",
|
34
34
|
48..52 => "ten to %1",
|
35
35
|
53..57 => "five to %1",
|
36
|
-
58..59 => ["almost %1", "nearly %1"]
|
36
|
+
58..59 => ["almost %1", "nearly %1"] # randomly picked
|
37
37
|
}
|
38
38
|
}
|
39
39
|
end
|
data/lib/fuzzyclock/locale/se.rb
CHANGED
@@ -27,13 +27,13 @@ class FuzzyClock
|
|
27
27
|
13..17 => "kvart över %0",
|
28
28
|
18..22 => "tjugo över %0",
|
29
29
|
23..27 => "tjugofem över %0",
|
30
|
-
28..32 => ["halv %1", "%0 och tretti"],
|
30
|
+
28..32 => ["halv %1", "%0 och tretti"], # randomly picked
|
31
31
|
33..37 => "tjugofem i %1",
|
32
32
|
38..42 => "tjugo i %1",
|
33
33
|
43..47 => "kvart i %1",
|
34
34
|
48..52 => "tio i %1",
|
35
35
|
53..57 => "fem i %1",
|
36
|
-
58..59 => ["nästan %1", "strax före %1"]
|
36
|
+
58..59 => ["nästan %1", "strax före %1"] # randomly picked
|
37
37
|
}
|
38
38
|
}
|
39
39
|
end
|
data/lib/fuzzyclock/version.rb
CHANGED
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: fuzzyclock
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 25
|
5
5
|
prerelease:
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 0
|
9
|
-
-
|
10
|
-
version: 0.0.
|
9
|
+
- 3
|
10
|
+
version: 0.0.3
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Sam Grover
|
@@ -16,7 +16,7 @@ autorequire:
|
|
16
16
|
bindir: bin
|
17
17
|
cert_chain: []
|
18
18
|
|
19
|
-
date: 2011-04-
|
19
|
+
date: 2011-04-17 00:00:00 +01:00
|
20
20
|
default_executable:
|
21
21
|
dependencies:
|
22
22
|
- !ruby/object:Gem::Dependency
|
@@ -51,6 +51,7 @@ files:
|
|
51
51
|
- bin/fuzzyclock
|
52
52
|
- fuzzyclock.gemspec
|
53
53
|
- lib/fuzzyclock.rb
|
54
|
+
- lib/fuzzyclock/locale/el.rb
|
54
55
|
- lib/fuzzyclock/locale/en.rb
|
55
56
|
- lib/fuzzyclock/locale/se.rb
|
56
57
|
- lib/fuzzyclock/version.rb
|