Permalink
Browse files

lots o' i18n

  • Loading branch information...
1 parent 00a5c80 commit 134502e3c29c58beca68e445661aa1407dcc647a @ajb ajb committed Apr 7, 2013
@@ -5,7 +5,7 @@
%thead
%tr
%th= t('.name')
- %th= t('actions')
+ %th= t('globals.actions')
%tbody#collaborators-tbody
:javascript
@@ -14,6 +14,6 @@
%h5 Add Collaborator
= form_for [@project, @project.collaborators.build] do |f|
= f.fields_for :officer do |f|
- = f.text_field :email, autocomplete: "off", placeholder: t('email_address')
+ = f.text_field :email, autocomplete: "off", placeholder: t('globals.email_address')
%br
= f.submit t('actions.collaborator.create'), class: "btn btn-inverse", "data-loading-text" => t('actions.collaborator.create_loading')
@@ -1,10 +1,10 @@
.dropdown-menu
= form_tag users_signin_path, method: :post, class: "dropdown-login-form" do
- %h4= t('.sign_in', site_name: t('site_name'))
- = text_field_tag :email, nil, placeholder: t('email_address')
- = password_field_tag :password, nil, placeholder: t('password')
+ %h4= t('.sign_in', site_name: t('globals.site_name'))
+ = text_field_tag :email, nil, placeholder: t('globals.email_address')
+ = password_field_tag :password, nil, placeholder: t('globals.password')
.login-button-wrapper
- %button.btn.btn-primary= t('sign_in')
+ %button.btn.btn-primary= t('globals.sign_in')
= t('.or_sign_up.line_html', link: link_to(t('.or_sign_up.link'), new_vendor_registration_path))
@@ -5,7 +5,7 @@
%i.icon-bar
%i.icon-bar
%i.icon-bar
- %a.brand{"href" => root_path}= t('site_name')
+ %a.brand{"href" => root_path}= t('globals.site_name')
.nav-collapse.collapse
%ul.nav
%li
@@ -52,7 +52,7 @@
- else
%li.dropdown
- %a.dropdown-toggle.js-dropdown-login-toggle{"href" => "#", "data-toggle" => "dropdown"} #{t('sign_in')} <strong class="caret"></strong>
+ %a.dropdown-toggle.js-dropdown-login-toggle{"href" => "#", "data-toggle" => "dropdown"} #{t('globals.sign_in')} <strong class="caret"></strong>
= render "layouts/dropdown_login_form"
@@ -1,12 +1,12 @@
= render "projects/officer_nav"
-%form.edit_project
+= form_for @project do |f|
.row-fluid
.span6
- %label Body
+ = f.label :body
%textarea#project_body{"readonly" => true}= @project_revision.body
- %h5 Revisions
+ %h5= t('projects.revisions')
%ul
- @project.project_revisions.each do |project_revision|
- if project_revision.id == @project_revision.id
@@ -16,11 +16,10 @@
.span6
.alert.alert-info
- <strong>Hey there!</strong> You're viewing a revision that was saved on #{@project_revision.created_at.to_formatted_s(:readable)} by #{@project_revision.saved_by_officer ? @project_revision.saved_by_officer.display_name : 'Unknown'}.
-
+ = t('.alert_html', date: @project_revision.created_at.to_formatted_s(:readable), officer: @project_revision.saved_by_officer ? @project_revision.saved_by_officer.display_name : t('globals.unknown_officer'))
%p
- = link_to raw("&larr; Back to current version"), edit_project_path(@project)
+ = link_to t('.back_to_current_html'), edit_project_path(@project)
%p
- = link_to "Restore this version", restore_project_project_revision_path(@project, @project_revision), method: :post
+ = link_to t('.restore'), restore_project_project_revision_path(@project, @project_revision), method: :post
@@ -2,16 +2,16 @@
.span3
%ul.nav.nav-pills.nav-stacked
%li{"class" => active?("collaborators#index")}
- =link_to "Collaborators", project_collaborators_path(@project)
+ =link_to t('.collaborators'), project_collaborators_path(@project)
%li{"class" => active?("projects#import_csv")}
- =link_to "Import bids from CSV", import_csv_project_path(@project)
+ =link_to t('.import_bids'), import_csv_project_path(@project)
%li{"class" => active?("projects#export_csv")}
- =link_to "Export bids", export_csv_project_path(@project)
+ =link_to t('.export_bids'), export_csv_project_path(@project)
%li{"class" => active?("projects#wufoo")}
- =link_to "Wufoo Integration", wufoo_project_path(@project)
+ =link_to t('.wufoo_integration'), wufoo_project_path(@project)
.span9
= yield
@@ -3,7 +3,7 @@
%h3
= @project.title
- = link_to raw(@project.watched_by?(current_user) ? "Watching Project <i class='icon-star'></i>" : "Watch Project <i class='icon-star-empty'></i>"), |
+ = link_to raw(@project.watched_by?(current_user) ? t('projects.watching_project_html') : t('projects.watch_project_html')), |
watches_path("Project", @project), method: :post, |
class: "btn #{@project.watched_by?(current_user) ? 'btn-inverse' : ''}"
@@ -14,43 +14,42 @@
%li{"class" => active?("bids")}
%a{"href" => project_bids_path(@project)}
%span
- %span.visible-desktop Review Bids
- %span.hidden-desktop Bids
+ %span.visible-desktop= t('.bids.long')
+ %span.hidden-desktop= t('.bids.short')
- if @project.bids.submitted.open.count > 0
%span.badge.badge-info= @project.bids.submitted.open.count
- if GlobalConfig.instance[:questions_enabled]
%li{"class" => active?("questions#index")}
%a{"href" => project_questions_path(@project)}
%span
- %span.visible-desktop Answer Questions
- %span.hidden-desktop Questions
+ %span.visible-desktop= t('.questions.long')
+ %span.hidden-desktop= t('.questions.short')
- if @project.questions.unanswered.count > 0
%span.badge.badge-info= @project.questions.unanswered.count
%li{"class" => active?("projects#edit") || active?("amendments") || active?("project_revisions")}
%a{"href" => edit_project_path(@project)}
%span
- %span.visible-desktop Project Description
- %span.hidden-desktop Description
+ %span.visible-desktop= t('.description.long')
+ %span.hidden-desktop= t('.description.short')
%li{"class" => active?("response_fields")}
- =link_to "Response Fields", project_response_fields_path(@project)
+ =link_to t('.response_fields'), project_response_fields_path(@project)
- if GlobalConfig.instance[:comments_enabled]
%li{"class" => active?("projects#comments")}
- =link_to "Comments", comments_project_path(@project)
+ =link_to t('.comments'), comments_project_path(@project)
- if @project.posted?
%li{"class" => active?("reports")}
- =link_to "Reports", bids_over_time_project_reports_path(@project)
+ =link_to t('.reports'), bids_over_time_project_reports_path(@project)
%li{"class" => active?("collaborators") || active?("projects#import_csv") || active?("projects#export_csv") || active?("projects#wufoo")}
- =link_to "Admin", project_collaborators_path(@project)
+ =link_to t('.admin'), project_collaborators_path(@project)
%li.pull-right
%a{"href" => project_path(@project)}
%span
- %span.visible-desktop
- View
+ %span.visible-desktop= t('.view')
%i.icon-share-alt
@@ -6,16 +6,16 @@
= f.label :body
= f.text_area :body
- %h5 Revisions
+ %h5= t('projects.revisions')
%ul
- @project.project_revisions.each do |project_revision|
%li
%a{"href" => project_project_revision_path(@project, project_revision)}
- #{project_revision.created_at.to_formatted_s(:readable)} by #{project_revision.saved_by_officer ? project_revision.saved_by_officer.display_name : 'Unknown'}
+ = t('.revision_link_text', date: project_revision.created_at.to_formatted_s(:readable), officer: project_revision.saved_by_officer ? project_revision.saved_by_officer.display_name : t('globals.unknown_officer'))
.span6
- = f.label :posted_at, "Live"
+ = f.label :posted_at, t('postable_by_officer.live')
.switch
= f.check_box :posted_at
@@ -43,21 +43,21 @@
- if GlobalConfig.instance[:amendments_enabled]
%div
%label
- Amendments
- = link_to "New Amendment", project_amendments_path(@project), method: :post, class: "btn btn-mini"
+ = t('projects.amendments')
+ = link_to t('actions.amendment.new'), project_amendments_path(@project), method: :post, class: "btn btn-mini"
- if @project.amendments.length > 0
%ul
- @project.amendments.each do |amendment|
%li
%a{"href" => edit_project_amendment_path(@project, amendment)}= amendment.title || amendment.id
- else
- %div No amendments.
+ %div= t('.no_amendments')
= f.label :abstract
= f.text_area :abstract, class: "span10"
.form-actions
- = f.submit "Update Project", class: "btn btn-inverse"
+ = f.submit t('actions.project.update'), class: "btn btn-inverse"
@@ -1,7 +1,7 @@
= render "projects/officer_nav"
= render layout: "projects/admin_sidebar" do
- %p Want your data without the bells and whistles of Procure.io? We understand. You can download an Excel-compatible CSV export of your bids below.
+ %p= t('projects.export_csv.description', site_name: t('globals.site_name'))
%div
- = link_to "Download #{pluralize(@project.bids.submitted.count, 'bid')} as CSV", export_csv_project_path(@project), class: "btn btn-inverse", method: :post
+ = link_to t('projects.export_csv.link_text', count: @project.bids.submitted.count), export_csv_project_path(@project), class: "btn btn-inverse", method: :post
@@ -1,27 +1,29 @@
= render "projects/officer_nav"
= render layout: "projects/admin_sidebar" do
- .alert.alert-warning
- <strong>Howdy!</strong> This feature is pretty experimental, so if you do choose to proceed, be sure to follow the steps below.
+ .alert.alert-warning= t('globals.experimental_follow_steps_html')
.readable-width
%p
- <strong>1.</strong> Set up the <a href="#{project_response_fields_path(@project)}">response fields</a> to match the fields you've collected from your bidders
+ <strong>1.</strong>
+ = t('projects.import_csv.step_1.line_html', link: link_to(t('projects.import_csv.step_1.link'), project_response_fields_path(@project)))
%p
- <strong>2.</strong> Gather your bids into a spreadsheet (or CSV format), with columns for email, name, and each of the response fields you configured above. Your columns should look like this:
+ <strong>2.</strong>
+ = t('projects.import_csv.step_2.line_1')
%p
<code>Name</code>, <code>Email</code>,
!= @project.response_fields.map {|rf| "<code>#{rf.label}</code>"}.join(", ")
- %p
- If you have any duplicated column names you will run into issues. Any additional columns will be ignored.
+ %p= t('projects.import_csv.step_2.line_2')
- %p <strong>3.</strong> Save the spreadsheet as a CSV file and upload it here.
+ %p
+ <strong>3.</strong>
+ = t('projects.import_csv.step_3')
= form_tag import_csv_project_path(@project), multipart: true do
- %label{"for" => "file"} File to upload
+ %label{"for" => "file"}= t('projects.import_csv.file_to_import')
= file_field_tag "file"
%div
- %button.btn.btn-inverse Import
+ %button.btn.btn-inverse= t('projects.import_csv.upload')
@@ -1,8 +1,8 @@
xml.instruct! :xml, version: "1.0"
xml.rss version: "2.0" do
xml.channel do
- xml.title "Project Listings"
- xml.description "Project listings on Procure.io."
+ xml.title t('.title')
+ xml.description t('.description', site_name: t('globals.site_name'))
xml.link projects_url(@filter_params)
for project in @projects
@@ -1,4 +1,4 @@
-!=page_header "Browse Projects"
+!=page_header t('.header')
#project-page
:javascript
@@ -1,4 +1,4 @@
-!= page_header "Projects"
+!= page_header t('.header')
.basic-projects-list
- @projects.each do |project|
@@ -8,9 +8,9 @@
%i.icon-star
.abstract
= project.abstract_or_truncated_body
- = link_to "Read more", project
+ = link_to t('.read_more'), project
.bids-due
- if project.bids_due_at
- Bids due on #{project.bids_due_at.to_formatted_s(:readable_dateonly)}
+ = t('projects.bids_due_on', date: project.bids_due_at.to_formatted_s(:readable_dateonly))
- else
- Open for bids
+ = t('projects.open_for_bids')
@@ -1,14 +1,14 @@
-!=page_header "My Projects"
+!=page_header t('.header')
-%a.btn.btn-small{"href" => new_project_path} New Project
+%a.btn.btn-small{"href" => new_project_path}= t('actions.project.new')
%table.table.table-boredered
%thead
%tr
- %th Type
- %th Project Title
- %th # Bids
- %th Bids Due
+ %th= t('.type')
+ %th= t('.project_title')
+ %th= t('.number_bids')
+ %th= t('.bids_due')
%tbody
- @projects.each do |project|
@@ -20,6 +20,6 @@
- if project.bids_due_at
= project.bids_due_at.to_formatted_s(:readable)
- else
- Open for bids
+ = t('projects.open_for_bids')
= will_paginate @projects, class: "pagination pagination-centered"
@@ -1,10 +1,10 @@
-!=page_header "New Project"
+!=page_header t('.header')
-%p First, tell us some basic info about your project.
+%p= t('.instructions')
= form_for @project do |f|
= f.label :title
= f.text_field :title
.form-actions
- = f.submit "Next →", class: "btn btn-inverse"
+ = f.submit t('.next_html'), class: "btn btn-inverse"
Oops, something went wrong.

0 comments on commit 134502e

Please sign in to comment.