fuzzyclock 0.0.2 → 0.0.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
data/README.md CHANGED
@@ -18,5 +18,8 @@ e.g. 10:34 is shown as "twenty five to eleven"
18
18
  $ fuzzyclock --help
19
19
  Usage: fuzzyclock [options]
20
20
  -a, --about Say about?
21
+ -l, --locale [lang] Langage
22
+ -U, --uppercase UPPERCASE OUTPUT
23
+ -C, --capitalize Capitalize Output
21
24
 
22
25
 
@@ -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", "Say about?") do |v|
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, "Langage") do |v|
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 Output") do |v|
39
+ opts.on("-C", "--capitalize", "Capitalize output") do |v|
40
40
  self.options[:capitalize] = v
41
41
  end
42
42
 
@@ -2,6 +2,7 @@
2
2
 
3
3
  require 'fuzzyclock/locale/en'
4
4
  require 'fuzzyclock/locale/se'
5
+ require 'fuzzyclock/locale/el'
5
6
  require 'fuzzyclock/version'
6
7
 
7
8
  class FuzzyClock
@@ -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
@@ -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
@@ -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
@@ -1,3 +1,5 @@
1
+ # encoding: utf-8
2
+
1
3
  class Fuzzyclock
2
- VERSION = '0.0.2'
4
+ VERSION = '0.0.3'
3
5
  end
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: 27
4
+ hash: 25
5
5
  prerelease:
6
6
  segments:
7
7
  - 0
8
8
  - 0
9
- - 2
10
- version: 0.0.2
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-16 00:00:00 +01:00
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