Skip to content

Commit

Permalink
more i18n
Browse files Browse the repository at this point in the history
  • Loading branch information
ajb committed Apr 7, 2013
1 parent fa1e029 commit bc0810b
Show file tree
Hide file tree
Showing 8 changed files with 58 additions and 20 deletions.
12 changes: 6 additions & 6 deletions app/views/amendments/edit.html.haml
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
= render "projects/officer_nav"

= form_for [@project, @amendment] do |f|
= f.label :posted_at, "Live?"
.switch{"data-on-label" => "Yes", "data-off-label" => "No"}
= f.label :posted_at, t('.live')
.switch
= f.check_box :posted_at

= f.label :title
= f.text_field :title
= f.text_field :title, class: "span6"

= f.label :body
= f.text_area :body
= f.text_area :body, cols: false, rows: 10, class: "span6"

.form-actions
= f.submit "Update Amendment", class: "btn btn-inverse"
= f.submit t('.update_amendment'), class: "btn btn-inverse"

=link_to "Delete Amendment", project_amendment_path(@project, @amendment), method: :delete, confirm: "Are you sure you want to delete this amendment?"
=link_to t('.delete_amendment'), project_amendment_path(@project, @amendment), method: :delete, confirm: t('confirmations.delete', item: 'amendment')
4 changes: 2 additions & 2 deletions app/views/bids/_form.html.haml
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@
value: (r = @bid.bid_responses.where(response_field_id: response_field.id).first) ? r.value : ''

.form-actions
%button.btn.btn-inverse Submit Bid
%a.btn#save-draft-button{"data-loading-text" => "All Changes Saved"} Save Draft
%button.btn.btn-inverse= t('.submit_bid')
%a.btn#save-draft-button{"data-loading-text" => "All Changes Saved"}= t('.save_draft')

- if @bid.id
:javascript
Expand Down
4 changes: 2 additions & 2 deletions app/views/bids/new.html.haml
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@

.row-fluid
.span7
%h4 Project Description
%h4= t('bids.project_description')
%p= simple_format @project.body

.span5
%h4 New Bid
%h4= t('.new_bid')
- if @project.form_description
%span.help-block= @project.form_description
= render "bids/form"
4 changes: 2 additions & 2 deletions app/views/bids/show_officer.html.haml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
= render "projects/officer_nav"

- if can? :destroy, @bid
= link_to "Delete bid", project_bid_path(@project, @bid), method: :delete, confirm: "Are you sure you want to delete this bid?"
= link_to t('actions.delete', item: 'bid'), project_bid_path(@project, @bid), method: :delete, confirm: t('confirmations.delete', item: 'bid')

#bid-page
:javascript
Expand All @@ -12,4 +12,4 @@
:javascript
new ProcureIo.Backbone.CommentPageView({bootstrapData: #{@comments_json}, commentableType: "bid", commentableId: #{@bid.id}});

= link_to @bid.watched_by?(current_user) ? "Watching Bid" : "Watch Bid", watches_path("Bid", @bid), method: :post, class: "btn #{@bid.watched_by?(current_user) ? 'btn-inverse' : ''}"
= link_to @bid.watched_by?(current_user) ? t('.watching_bid') : t('.watch_bid'), watches_path("Bid", @bid), method: :post, class: "btn #{@bid.watched_by?(current_user) ? 'btn-inverse' : ''}"
12 changes: 6 additions & 6 deletions app/views/bids/show_vendor.html.haml
Original file line number Diff line number Diff line change
Expand Up @@ -2,20 +2,20 @@

.row-fluid
.span7
%h4 Project Description
%h4= t('bids.project_description')
%p= simple_format @project.body

.span5
%h4 My Bid
%h4= t('.my_bid')

%div
- if @bid.dismissed?
%span.badge.badge-important Dismissed
%span.badge.badge-important= t('bids.dismissed')
- elsif @bid.awarded?
%span.badge.badge-success Awarded
%span.badge.badge-success= t('bids.awarded')
- else
%span.badge.badge-info Open
%span.badge.badge-info= t('bids.open')

= link_to "← Return to project", @project
= link_to t('.return_to_project_html'), @project

= render "bid"
2 changes: 1 addition & 1 deletion app/views/layouts/application.html.haml
Original file line number Diff line number Diff line change
Expand Up @@ -22,4 +22,4 @@
%footer#footer
.container
Procure.io!
= t('.footer')
2 changes: 1 addition & 1 deletion app/views/officers/edit.html.haml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
= f.text_field :email

= f.label :role
= f.select :role, options_for_select(Officer.roles.except(:god), @officer.role)
= f.select :role, options_for_select((@officer.role == Officer.roles[:god] ? Officer.roles : Officer.roles.except(:god)), @officer.role)

.form-actions
= f.submit "Update Officer", class: "btn btn-inverse"
38 changes: 38 additions & 0 deletions config/locales/en.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,17 @@ en:
email_address: Email Address
password: Password

confirmations:
delete: "Are you sure you want to delete this %{item}?"

actions:
delete: "Delete %{item}"
update: "Update %{item}"

layouts:
application:
footer: Procure.io!

navbar:
my_projects: My Projects
watched_projects: Watched Projects
Expand All @@ -25,3 +35,31 @@ en:
forgot_password:
line_html: Did you %{link}?
link: forget your password

amendments:
edit:
live: Live?
delete_amendment: Delete Amendment
update_amendment: Update Amendment

bids:
dismissed: Dismissed
awarded: Awarded
open: Open

project_description: Project Description

form:
submit_bid: Submit Bid
save_draft: Save Draft

new:
new_bid: New Bid

show_officer:
watching_bid: Watching Bid
watch_bid: Watch Bid

show_vendor:
my_bid: My Bid
return_to_project_html: "← Return to Project"

0 comments on commit bc0810b

Please sign in to comment.