diff --git a/app/views/announcement/edit.haml b/app/views/announcement/edit.haml index 840877ed..c19474d7 100644 --- a/app/views/announcement/edit.haml +++ b/app/views/announcement/edit.haml @@ -1,4 +1,4 @@ -- provide(:title, generate_title('Edit announcement')) +- provide(:title, generate_title(t(".title"))) .container-lg.container--main .card .card-body @@ -15,21 +15,19 @@ %li= err .row .col-md-12 - = f.text_area :content, label: 'Content' + = f.text_area :content .row .col-md-6 - = f.url_field :link_href, label: 'Link URL' + = f.url_field :link_href .col-md-6 - = f.text_field :link_text, label: 'Link text' + = f.text_field :link_text .row .col-md-6 = f.datetime_field :starts_at, - label: 'Start time', class: 'datetimepicker-input', data: { toggle: 'datetimepicker', target: '#announcement_starts_at', 'date-format': 'YYYY-MM-DD hh:mm A' } .col-md-6 = f.datetime_field :ends_at, - label: 'End time', class: 'datetimepicker-input', data: { toggle: 'datetimepicker', target: '#announcement_ends_at', 'date-format': 'YYYY-MM-DD hh:mm A' } .row diff --git a/app/views/announcement/new.haml b/app/views/announcement/new.haml index 3363c72b..9eaaf03b 100644 --- a/app/views/announcement/new.haml +++ b/app/views/announcement/new.haml @@ -1,4 +1,4 @@ -- provide(:title, generate_title('Add new announcement')) +- provide(:title, generate_title(t(".title"))) .container-lg.container--main .card .card-body @@ -15,21 +15,19 @@ %li= err .row .col-md-12 - = f.text_area :content, label: 'Content' + = f.text_area :content .row .col-md-6 - = f.url_field :link_href, label: 'Link URL' + = f.url_field :link_href .col-md-6 - = f.text_field :link_text, label: 'Link text' + = f.text_field :link_text .row .col-md-6 = f.datetime_field :starts_at, - label: 'Start time', class: 'datetimepicker-input', data: { toggle: 'datetimepicker', target: '#announcement_starts_at', 'date-format': 'YYYY-MM-DD hh:mm A' } .col-md-6 = f.datetime_field :ends_at, - label: 'End time', class: 'datetimepicker-input', data: { toggle: 'datetimepicker', target: '#announcement_ends_at', 'date-format': 'YYYY-MM-DD hh:mm A' } .row diff --git a/config/locales/activerecord.en.yml b/config/locales/activerecord.en.yml new file mode 100644 index 00000000..f60d125c --- /dev/null +++ b/config/locales/activerecord.en.yml @@ -0,0 +1,13 @@ +en: + activerecord: + models: + announcement: + one: "Announcement" + other: "Announcements" + attributes: + announcement: + content: "Content" + link_href: "Link URL" + link_text: "Link text" + starts_at: "Start time" + ends_at: "End time" \ No newline at end of file