Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

frontend i18n!

  • Loading branch information...
commit 46564aeea8d56726518977375c5e00ccdc87ac0f 1 parent db1f661
@ajb ajb authored
Showing with 143 additions and 78 deletions.
  1. +12 −12 app/assets/templates/bid/bid.jst.hamlc
  2. +5 −5 app/assets/templates/bid_review/actions.jst.hamlc
  3. +3 −3 app/assets/templates/bid_review/bid.jst.hamlc
  4. +1 −1  app/assets/templates/bid_review/label_admin.jst.hamlc
  5. +2 −2 app/assets/templates/bid_review/label_admin_list.jst.hamlc
  6. +4 −4 app/assets/templates/bid_review/label_edit.jst.hamlc
  7. +3 −3 app/assets/templates/bid_review/label_filter.jst.hamlc
  8. +3 −3 app/assets/templates/bid_review/page.jst.hamlc
  9. +2 −2 app/assets/templates/bid_review/sidebar_filter.jst.hamlc
  10. +5 −5 app/assets/templates/bid_review/top_filter.jst.hamlc
  11. +1 −1  app/assets/templates/collaborator/collaborator.jst.hamlc
  12. +1 −1  app/assets/templates/comment/comment.jst.hamlc
  13. +2 −2 app/assets/templates/comment/comment_bid_awarded.jst.hamlc
  14. +2 −2 app/assets/templates/comment/comment_bid_dismissed.jst.hamlc
  15. +2 −2 app/assets/templates/comment/comment_bid_unawarded.jst.hamlc
  16. +2 −2 app/assets/templates/comment/comment_bid_undismissed.jst.hamlc
  17. +2 −2 app/assets/templates/comment/comment_project_bid_awarded.jst.hamlc
  18. +2 −2 app/assets/templates/comment/comment_project_bid_unawarded.jst.hamlc
  19. +2 −2 app/assets/templates/comment/comment_project_posted.jst.hamlc
  20. +1 −1  app/assets/templates/comment/comment_project_unposted.jst.hamlc
  21. +4 −4 app/assets/templates/comment/page.jst.hamlc
  22. +6 −6 app/assets/templates/project/page.jst.hamlc
  23. +5 −5 app/assets/templates/project/project.jst.hamlc
  24. +3 −3 app/assets/templates/project/rss_links.jst.hamlc
  25. +3 −3 app/assets/templates/question/question.jst.hamlc
  26. +65 −0 config/locales/client.en.yml
View
24 app/assets/templates/bid/bid.jst.hamlc
@@ -1,11 +1,11 @@
.action-header
- %h4.pull-left Bid from #{@vendor.display_name}
+ %h4.pull-left #{I18n.js('bid_from')} #{@vendor.display_name}
.pull-right
.btn-group
%a.btn.dropdown-toggle{"href" => "#", "data-toggle" => "dropdown"}
- Label
+ = I18n.js('label')
%b.caret
%ul.dropdown-menu
- for label in @projectLabels
@@ -17,15 +17,15 @@
%button.btn.btn-danger{"data-backbone-dismiss" => "true"}
- if @dismissed_at
- Undismiss
+ = I18n.js('undismiss')
- else
- Dismiss
+ = I18n.js('dismiss')
%button.btn.btn-success{"data-backbone-award" => "true"}
- if @awarded_at
- Unaward
+ = I18n.js('unaward')
- else
- Award
+ = I18n.js('award')
 
%i{"data-backbone-read" => "true", "class" => (if @my_bid_review.read then "icon-circle-blank" else "icon-circle")}
@@ -42,14 +42,14 @@
%span.badge{"style" => "background-color: ##{label.color || ProcureIo.Backbone.DEFAULT_LABEL_COLOR};", "class" => "label-text-#{label.text_color}"}= label.name
- if @dismissed_at
- %span.badge.badge-important Dismissed
+ %span.badge.badge-important= I18n.js('dismissed')
- else if @awarded_at
- %span.badge.badge-success Awarded
+ %span.badge.badge-success= I18n.js('awarded')
- else
- %span.badge.badge-info Open
+ %span.badge.badge-info= I18n.js('open')
%p
- %span Submitted on #{@submitted_at_readable}
+ %span #{I18n.js('submitted_on')} #{@submitted_at_readable}
%p
%a{"href" => "#comment-page"}
@@ -57,9 +57,9 @@
= if @total_comments is 1 then "comment" else "comments"
%dl
- %dt Contact Name
+ %dt= I18n.js('contact_name')
%dd= @vendor.display_name
- %dt Email Address
+ %dt= I18n.js('email_address')
%dd= @vendor.email
.span9
View
10 app/assets/templates/bid_review/actions.jst.hamlc
@@ -1,20 +1,20 @@
- unless @filterOptions.f2 is "awarded"
%button.btn.btn-small{"data-backbone-dismiss" => "true", "class" => if !@bidsChecked then "disabled"}
- if @filterOptions.f2 is "dismissed"
- Undismiss
+ = I18n.js('undismiss')
- else
- Dismiss
+ = I18n.js('dismiss')
- unless @filterOptions.f2 is "dismissed"
%button.btn.btn-small{"data-backbone-award" => "true", "class" => if !@bidsChecked then "disabled"}
- if @filterOptions.f2 is "awarded"
- Unaward
+ = I18n.js('unaward')
- else
- Award
+ = I18n.js('award')
.btn-group
%a.btn.btn-small.dropdown-toggle{"href" => "#", "data-toggle" => "dropdown", "class" => if !@bidsChecked then "disabled"}
- Label
+ = I18n.js('label')
%b.caret
%ul.dropdown-menu
- @labels.each (label) ->
View
6 app/assets/templates/bid_review/bid.jst.hamlc
@@ -14,8 +14,8 @@
%td
- if @dismissed_at
- %span.badge.badge-important Dismissed
+ %span.badge.badge-important= I18n.js('dismissed')
- else if @awarded_at
- %span.badge.badge-success Awarded
+ %span.badge.badge-success= I18n.js('awarded')
- else
- %span.badge Open
+ %span.badge= I18n.js('open')
View
2  app/assets/templates/bid_review/label_admin.jst.hamlc
@@ -1,4 +1,4 @@
%a
%span.rectangular-color-swatch{"style" => "background-color: ##{@color || ProcureIo.Backbone.DEFAULT_LABEL_COLOR};"}  
#{@name}
- %span.click-to-edit Click to edit
+ %span.click-to-edit= I18n.js('click_to_edit')
View
4 app/assets/templates/bid_review/label_admin_list.jst.hamlc
@@ -1,5 +1,5 @@
-%h5 Edit Labels
+%h5= I18n.js('edit_labels')
%ul.nav.nav-pills.nav-stacked.filter-nav#labels-admin-list
-%a.smaller{"data-backbone-togglelabeladmin" => "true"} Done Editing Labels
+%a.smaller{"data-backbone-togglelabeladmin" => "true"}= I18n.js('done_editing_labels')
View
8 app/assets/templates/bid_review/label_edit.jst.hamlc
@@ -1,17 +1,17 @@
%form#edit-label-form
- %label Label Name
+ %label= I18n.js('label_name')
%input{"type" => "text", "data-rv-value" => "label.name"}
!= JST['bid_review/_color_swatches']()
- %a.smaller{"data-toggle" => "showhide", "data-target" => ".custom-color-input"} Custom Color
+ %a.smaller{"data-toggle" => "showhide", "data-target" => ".custom-color-input"}= I18n.js('custom_color')
%input.custom-color-input.hide{"type" => "text", "placeholder" => "FFFFFF"}
%input{"type" => "hidden", "data-rv-value" => "label.color"}
.clearfix  
- %button.btn.btn-inverse Save Changes
+ %button.btn.btn-inverse= I18n.js('save_changes')
%p
- %a.smaller{"data-backbone-destroy-label" => "true"} Destroy Label
+ %a.smaller{"data-backbone-destroy-label" => "true"}= I18n.js('destroy_label')
View
6 app/assets/templates/bid_review/label_filter.jst.hamlc
@@ -8,9 +8,9 @@
.color-wrapper.hide
!= JST['bid_review/_color_swatches']()
- %a.smaller{"data-toggle" => "showhide", "data-target" => ".custom-color-input"} Custom Color
+ %a.smaller{"data-toggle" => "showhide", "data-target" => ".custom-color-input"}= I18n.js('custom_color')
%input.custom-color-input.hide{"type" => "text", "placeholder" => "FFFFFF"}
- %button.btn.btn-inverse Create Label
+ %button.btn.btn-inverse= I18n.js('create_label')
-%a.smaller{"data-backbone-togglelabeladmin" => "true"} Edit Labels
+%a.smaller{"data-backbone-togglelabeladmin" => "true"}= I18n.js('edit_labels')
View
6 app/assets/templates/bid_review/page.jst.hamlc
@@ -11,7 +11,7 @@
#loading-indicator
%i.icon-refresh.icon-spin
- Loading...
+ = I18n.js('loading')
#top-filter-wrapper
@@ -25,9 +25,9 @@
%thead
%tr
%th{"style" => "width: 50px;"}  
- %th Vendor Name
+ %th= I18n.js('vendor_name')
- for index, keyField of @keyFields
%th= keyField.label
- %th Status
+ %th= I18n.js('status')
%tbody#bids-tbody
View
4 app/assets/templates/bid_review/sidebar_filter.jst.hamlc
@@ -1,9 +1,9 @@
%ul.nav.nav-pills.nav-stacked
%li{"class" => if @filterOptions.f1 is "all" then "active" else ""}
%a{"href" => @filteredHref({f1: 'all', page: false}), "data-backbone-updatefilter" => "true"}
- All Bids
+ = I18n.js('all_bids')
%span.badge= @counts["all"]
%li{"class" => if @filterOptions.f1 is "starred" then "active" else ""}
%a{"href" => @filteredHref({f1: 'starred', page: false}), "data-backbone-updatefilter" => "true"}
- Starred Bids
+ = I18n.js('starred_bids')
%span.badge= @counts["starred"]
View
10 app/assets/templates/bid_review/top_filter.jst.hamlc
@@ -1,22 +1,22 @@
%ul.nav.nav-tabs
%li{"class" => if @filterOptions.f2 is "open" then "active" else ""}
%a{"href" => @filteredHref({f2: 'open', page: false}), "data-backbone-updatefilter" => "true"}
- Open Bids
+ = I18n.js('open_bids')
%span.badge= @counts["open"]
%li{"class" => if @filterOptions.f2 is "dismissed" then "active" else ""}
%a{"href" => @filteredHref({f2: 'dismissed', page: false}), "data-backbone-updatefilter" => "true"}
- Dismissed Bids
+ = I18n.js('dismissed_bids')
%span.badge= @counts["dismissed"]
%li{"class" => if @filterOptions.f2 is "awarded" then "active" else ""}
%a{"href" => @filteredHref({f2: 'awarded', page: false}), "data-backbone-updatefilter" => "true"}
- Awarded Bids
+ = I18n.js('awarded_bids')
%span.badge= @counts["awarded"]
.query-wrapper
%form.bid-search-form.form-search
.input-append
- %input.search-query{"type" => "text", "placeholder" => "Search bids...", "value" => @filterOptions.q}
- %button.btn.btn-inverse Search
+ %input.search-query{"type" => "text", "placeholder" => I18n.js('search_bids'), "value" => @filterOptions.q}
+ %button.btn.btn-inverse= I18n.js('search')
.clear-search
%a{"href" => @filteredHref({q: false, page: false}), "data-backbone-updatefilter" => "true", "data-rv-show" => "filterOptions.q"}
%i.icon-remove-sign
View
2  app/assets/templates/collaborator/collaborator.jst.hamlc
@@ -6,4 +6,4 @@
%i.icon-envelope
%td
- if @isOwner && !@owner
- %button.btn.btn-danger{"data-backbone-clear" => "true"} Remove
+ %button.btn.btn-danger{"data-backbone-clear" => "true"}= I18n.js('remove')
View
2  app/assets/templates/comment/comment.jst.hamlc
@@ -4,6 +4,6 @@
%span.posted-at #{moment(@created_at).fromNow()}
- if @currentOfficerId == @officer.id
- %a.delete{"data-backbone-clear" => "true"} Delete
+ %a.delete{"data-backbone-clear" => "true"}= I18n.js('delete')
%p= @body
View
4 app/assets/templates/comment/comment_bid_awarded.jst.hamlc
@@ -1,3 +1,3 @@
-%span #{@officer.name} awarded the bid.
-%span.badge.badge-success Awarded
+%span #{@officer.name} #{I18n.js('comment.awarded')}
+%span.badge.badge-success= I18n.js('awarded')
%span.timestamp= moment(@created_at).fromNow()
View
4 app/assets/templates/comment/comment_bid_dismissed.jst.hamlc
@@ -1,3 +1,3 @@
-%span #{@officer.name} dismissed the bid.
-%span.badge.badge-important Dismissed
+%span #{@officer.name} #{I18n.js('comment.dismissed')}
+%span.badge.badge-important= I18n.js('dismissed')
%span.timestamp= moment(@created_at).fromNow()
View
4 app/assets/templates/comment/comment_bid_unawarded.jst.hamlc
@@ -1,3 +1,3 @@
-%span #{@officer.name} unawarded the bid.
-%span.badge.badge-info Unawarded
+%span #{@officer.name} #{I18n.js('comment.unawarded')}
+%span.badge.badge-info= I18n.js('unawarded')
%span.timestamp= moment(@created_at).fromNow()
View
4 app/assets/templates/comment/comment_bid_undismissed.jst.hamlc
@@ -1,3 +1,3 @@
-%span #{@officer.name} undismissed the bid.
-%span.badge.badge-info Undismissed
+%span #{@officer.name} #{I18n.js('comment.undismissed')}
+%span.badge.badge-info= I18n.js('undismissed')
%span.timestamp= moment(@created_at).fromNow()
View
4 app/assets/templates/comment/comment_project_bid_awarded.jst.hamlc
@@ -1,3 +1,3 @@
-%span #{@officer.name} awarded the bid from <a href="/projects/#{@commentable_id}/bids/#{@data.id}">#{@data.vendor.name}</a>.
-%span.badge.badge-success Awarded
+%span #{@officer.name} #{I18n.js('comment.awarded_from')} <a href="/projects/#{@commentable_id}/bids/#{@data.id}">#{@data.vendor.name}</a>.
+%span.badge.badge-success #{I18n.js('awarded')}
%span.timestamp= moment(@created_at).fromNow()
View
4 app/assets/templates/comment/comment_project_bid_unawarded.jst.hamlc
@@ -1,3 +1,3 @@
-%span #{@officer.name} unawarded the bid from <a href="/projects/#{@commentable_id}/bids/#{@data.id}">#{@data.vendor.name}</a>.
-%span.badge.badge-info Unawarded
+%span #{@officer.name} #{I18n.js('comment.unawarded_from')} <a href="/projects/#{@commentable_id}/bids/#{@data.id}">#{@data.vendor.name}</a>.
+%span.badge.badge-info= I18n.js('unawarded')
%span.timestamp= moment(@created_at).fromNow()
View
4 app/assets/templates/comment/comment_project_posted.jst.hamlc
@@ -1,3 +1,3 @@
-%span #{@officer.name} posted the project.
-%span.badge.badge-success Posted
+%span #{@officer.name} #{I18n.js('comment.posted')}
+%span.badge.badge-success= I18n.js('posted')
%span.timestamp= moment(@created_at).fromNow()
View
2  app/assets/templates/comment/comment_project_unposted.jst.hamlc
@@ -1,3 +1,3 @@
-%span #{@officer.name} unposted the project.
+%span #{@officer.name} #{I18n.js('comment.unposted')}
%span.badge.badge-important Unposted
%span.timestamp= moment(@created_at).fromNow()
View
8 app/assets/templates/comment/page.jst.hamlc
@@ -1,12 +1,12 @@
-%h4 Comments
+%h4= I18n.js('comments')
.readable-width-large
.loading-comments
%i.icon-refresh.icon-spin
- Loading
+ = I18n.js('loading')
#comments-wrapper
- %h5 New Comment
+ %h5= I18n.js('new_comment')
%form#new-comment-form
%textarea
- %button.btn.btn-inverse.pull-right{"data-loading-text" => "Posting..."} Post Comment
+ %button.btn.btn-inverse.pull-right{"data-loading-text" => I18n.js('posting')}= I18n.js('post_comment')
View
12 app/assets/templates/project/page.jst.hamlc
@@ -2,17 +2,17 @@
.span3
%form#project-filter-form.well
.control-group
- %label Filter
- %input.search-query{"type" => "text", "placeholder" => "Searches all fields", "name" => "q", "data-rv-value" => "filterOptions.q"}
+ %label= I18n.js('filter')
+ %input.search-query{"type" => "text", "placeholder" => I18n.js('searches_all_fields'), "name" => "q", "data-rv-value" => "filterOptions.q"}
.control-group
- %label Category
+ %label= I18n.js('category')
%select#category-filter{"data-backbone-filter-tag" => "true", "name" => "category", "data-rv-value" => "filterOptions.category"}
- %option{"value" => ""} All Categories
+ %option{"value" => ""}= I18n.js('all_categories')
- for category in @allCategories
%option{"value" => category}= category
- %button.btn.btn-inverse.pull-right Filter Projects
+ %button.btn.btn-inverse.pull-right= I18n.js('filter_projects')
.clearfix &nbsp;
@@ -21,7 +21,7 @@
.span9.right-side-span
#loading-indicator
%i.icon-refresh.icon-spin
- Loading...
+ = I18n.js('loading')
#sort-wrapper.pull-left
View
10 app/assets/templates/project/project.jst.hamlc
@@ -1,13 +1,13 @@
%div
%span.project-name
%a{"href" => "/projects/#{@id}"}= @title
- %span.project-department Office of Cultural Affairs
+ / %span.project-department
.project-abtract= @abstract
.bottom-info
%span.project-tags
- Categories:
+ #{I18n.js('categories')}:
- for tag, i in @tags
<a href="#{@filteredHref({category: tag.name, page: false})}" data-backbone-updatefilter="true">#{tag.name}</a>#{if i != @tags.length - 1 then ', ' else ''}
@@ -15,11 +15,11 @@
%span.project-bids-due-at
- if @bids_due_at
- Bids due on #{@bids_due_at_readable_dateonly}
+ #{I18n.js('bids_due_on')} #{@bids_due_at_readable_dateonly}
- else
- Open for bids
+ = I18n.js('open_for_bids')
&middot;
%span.posted-at
- Posted on #{@posted_at_readable_dateonly}
+ #{I18n.js('posted_on')} #{@posted_at_readable_dateonly}
View
6 app/assets/templates/project/rss_links.jst.hamlc
@@ -1,10 +1,10 @@
%p
- %a{"href" => @filteredHref({page: false, sort: false, direction: false}, 'rss')} RSS feed for this search
+ %a{"href" => @filteredHref({page: false, sort: false, direction: false}, 'rss')}= I18n.js('rss_for_search')
- if ProcureIo.CurrentVendorId
%p
- %button.btn.btn-primary#save-search-button{"data-loading-text" => "Saving...", "data-saved-text" => "Search Saved"} Save Search
+ %button.btn.btn-primary#save-search-button{"data-loading-text" => "Saving...", "data-saved-text" => "Search Saved"}= I18n.js('save_search')
- if !ProcureIo.CurrentVendorId && !ProcureIo.CurrentOfficerId
%p
- <a href="/users/sign_in">Sign in</a> to get notified of new projects like these.
+ <a href="/users/sign_in">#{I18n.js('sign_in')}</a> #{I18n.js('to_get_notified')}
View
6 app/assets/templates/question/question.jst.hamlc
@@ -3,7 +3,7 @@
- if @answer_body
%div.answer-body.collapse{"id" => "answer-body-#{@id}"}
%p= @answer_body
- %span.answered-by Answered by #{@officer_name} on #{@updated_at}
- %a{"data-toggle" => "collapse", "data-target" => "#answer-body-#{@id}", "data-toggle-text" => "hide answer"} show answer
+ %span.answered-by #{I18n.js('answered_by')} #{@officer_name} #{I18n.js('on')} #{@updated_at}
+ %a{"data-toggle" => "collapse", "data-target" => "#answer-body-#{@id}", "data-toggle-text" => I18n.js('hide_answer')}= I18n.js('show_answer')
- else
- .no-answer-body Not yet answered.
+ .no-answer-body= I18n.js('no_answer')
View
65 config/locales/client.en.yml
@@ -1,14 +1,70 @@
en:
js:
+ "on": "on"
+ sign_in: Sign in
save: "Save"
saving: "Saving..."
loading: "Loading..."
characters: characters
editing: "Editing"
+ posting: "Posting..."
remove: "Remove"
+ delete: "Delete"
save_form: Save Form
all_changes_saved: All Changes Saved
bid_form: Bid Form
+ bid_from: Bid from
+ label: Label
+ undismiss: Undismiss
+ dismiss: Dismiss
+ unaward: Unaward
+ award: Award
+ dismissed: Dismissed
+ undismissed: Undismissed
+ awarded: Awarded
+ unawarded: Unawarded
+ open: Open
+ submitted_on: Submitted on
+ contact_name: Contact Name
+ email_address: Email Address
+ click_to_edit: Click to edit
+ edit_labels: Edit Labels
+ done_editing_labels: Done Editing Labels
+ label_name: Label Name
+ custom_color: Custom Color
+ save_changes: Save Changes
+ destroy_label: Destroy Label
+ create_label: Create Label
+ all_bids: All Bids
+ starred_bids: Starred Bids
+ vendor_name: Vendor Name
+ status: Status
+ open_bids: Open Bids
+ dismissed_bids: Dismissed Bids
+ awarded_bids: Awarded Bids
+ search: Search
+ search_bids: Search bids...
+ searches_all_fields: Searches all fields...
+ posted: Posted
+ unposted: Unposted
+ comments: Comments
+ new_comment: New Comment
+ post_comment: Post Comment
+ filter: Filter
+ category: Category
+ categories: Categories
+ all_categories: All Categories
+ filter_projects: Filter Projects
+ bids_due_on: Bids due on
+ open_for_bids: Open for bids
+ posted_on: Posted on
+ to_get_notified: to get notified of new projects like these.
+ rss_for_search: RSS feed for this search
+ save_search: Save Search
+ show_answer: Show Answer
+ hide_answer: Hide Answer
+ no_answer: Not yet answered
+ answered_by: Answered by
response_field:
description: description
@@ -59,3 +115,12 @@ en:
file: file
+ comment:
+ awarded: awarded the bid.
+ awarded_from: awarded the bid from
+ dismissed: dismissed the bid.
+ unawarded: unawarded the bid.
+ unawarded_from: unawarded the bid from
+ undismissed: undismissed the bid.
+ posted: posted the project.
+ unposted: unposted the project.
Please sign in to comment.
Something went wrong with that request. Please try again.