Skip to content

Instantly share code, notes, and snippets.

@PanosJee
Forked from jimeh/en.rb
Created April 17, 2011 10:16
Show Gist options
  • Save PanosJee/923915 to your computer and use it in GitHub Desktop.
Save PanosJee/923915 to your computer and use it in GitHub Desktop.
# encoding: utf-8
class FuzzyClock
@@locales ||= {}
@@locales[:en] = {
:about => "Είναι σχεδόν %t",
:hour => {
0 => "δώδεκα",
1 => "μία",
2 => "δύο",
3 => "τρεις",
4 => "τέσσερις",
5 => "πέντε",
6 => "έξη",
7 => "εφτά",
8 => "οχτώ",
9 => "εννιά",
10 => "δέκα",
11 => "έντεκα",
12 => "δώδεκα",
},
:min => {
0..0 => "%0 ακριβώς",
1..2 => "λίγο μετά τις %0",
3..7 => "%0 και πέντα",
8..12 => "%0 και δέκα",
13..17 => "%0 και τέταρτο",
18..22 => "%0 και είκοσι",
23..27 => "%0 και είκοσι πέντε",
28..32 => ["%0 και μισή", "%0-μιση"], # randomly picked
33..37 => "%1 παρά είκοσι πέντε",
38..42 => "%1 παρά είκοσι",
43..47 => "%1 παρά τέταρτο",
48..52 => "%1 παρά δείκα",
53..57 => "%1 παρά 5",
58..59 => ["σχεδόν %1", "%1 παρά κάτι"] # randomly picked
}
}
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment