Skip to content

Commit

Permalink
Merge pull request #52 from masciugo/master
Browse files Browse the repository at this point in the history
add italian + specs
  • Loading branch information
radar committed Mar 16, 2015
2 parents 6b2716b + 0b0df28 commit eb3ca38
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 0 deletions.
24 changes: 24 additions & 0 deletions lib/dotiw/locale/it.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
it:
datetime:
dotiw:
seconds:
one: un secondo
other: "%{count} secondi"
minutes:
one: un minuto
other: "%{count} minuti"
hours:
one: una ora
other: "%{count} ore"
days:
one: un giorno
other: "%{count} giorni"
weeks:
one: una settimana
other: "%{count} settimane"
months:
one: un mese
other: "%{count} mesi"
years:
one: un anno
other: "%{count} anni"
5 changes: 5 additions & 0 deletions spec/lib/dotiw_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,11 @@
expect(distance_of_time_in_words(START_TIME, START_TIME + 5.days, true, :locale => :es)).to eq("5 días")
end

it "deve parlare l'italiano" do
expect(distance_of_time_in_words(START_TIME, START_TIME + 1.days, true, :locale => :it)).to eq("un giorno")
expect(distance_of_time_in_words(START_TIME, START_TIME + 5.days, true, :locale => :it)).to eq("5 giorni")
end

fragments = [
[START_TIME, START_TIME + 5.days + 3.minutes, "5 days and 3 minutes"],
[START_TIME, START_TIME + 1.minute, "1 minute"],
Expand Down

0 comments on commit eb3ca38

Please sign in to comment.