Skip to content

Commit

Permalink
Merge pull request #33 from offthread/development
Browse files Browse the repository at this point in the history
Fixing events and including show time
  • Loading branch information
filipecosta01 committed Jun 11, 2016
2 parents 78cd9a3 + d1980e1 commit dd74d63
Show file tree
Hide file tree
Showing 6 changed files with 217 additions and 131 deletions.
3 changes: 3 additions & 0 deletions app/controllers/telegram_webhooks_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -167,6 +167,9 @@ def getShowsFormatted(shows, dateFormatted)
eventConfirmed = show.is_confirmed ? t(:confirmed) : t(:not_confirmed)
responseMessage += t(:event_confirmed, :eventConfirmed => eventConfirmed)
responseMessage += t(:event_band_info, :moreInfo => show.link_band)

showTime = show.date.strftime("%H:%M")
responseMessage += t(:event_time, :eventTime => showTime)
end
responseMessage += END_STREAM_STRING

Expand Down
1 change: 1 addition & 0 deletions config/locales/en.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ en:
event_title : "-> %{eventTitle}\n"
event_confirmed : "- Event confirmed: %{eventConfirmed}\n"
event_band_info : "- Band info: %{moreInfo}\n"
event_time : "- Estimated time: %{eventTime}\n\n"

confirmed : "Yes"
not_confirmed : "No"
Expand Down
3 changes: 2 additions & 1 deletion config/locales/pt-BR.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@ pt-BR:

event_title : "-> %{eventTitle}\n"
event_confirmed : "- Evento confirmado: %{eventConfirmed}\n"
event_band_info : "- Informações da banda: %{moreInfo}\n\n"
event_band_info : "- Informações da banda: %{moreInfo}\n"
event_time : "- Início estimado: %{eventTime}\n\n"

confirmed : "Sim"
not_confirmed : "Não"
Expand Down
2 changes: 1 addition & 1 deletion db/migrate/20160515171902_create_shows.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ class CreateShows < ActiveRecord::Migration
def change
create_table :shows do |t|
t.string :name
t.date :date
t.datetime :date
t.boolean :is_confirmed
t.string :link_band

Expand Down
2 changes: 1 addition & 1 deletion db/schema.rb
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@

create_table "shows", force: :cascade do |t|
t.string "name"
t.date "date"
t.datetime "date"
t.boolean "is_confirmed"
t.string "link_band"
t.datetime "created_at", null: false
Expand Down
Loading

0 comments on commit dd74d63

Please sign in to comment.