Permalink
Browse files

Contribution translation

  • Loading branch information...
1 parent 6179ab2 commit 1b057c96c3da8a0941907ccc844688524e344848 @kyungbae kyungbae committed Aug 7, 2013
Showing with 41 additions and 28 deletions.
  1. +15 −16 app/views/contributions/index.html.haml
  2. +26 −12 config/locales/en.yml
@@ -1,23 +1,22 @@
.items-index
.intro.contributions-intro
- %h4 Help us enrich the WWQI archives by contributing information to the project.
-
- %p There are numerous ways you can contribute.
+ %h4=t '.contribution_header'
+ %p=t '.contribution_message'
%ul.thread-type.btn-group.contributions-nav
%li{class: "btn #{'active' if params[:type] == "Transcription"} pull-left"}
- = link_to 'Transcribe a document', contributions_path(type: 'Transcription')
+ = link_to t('.transcription_button'), contributions_path(type: 'Transcription')
%li{class: "btn #{'active' if params[:type] == 'Translation'} pull-left"}
- = link_to 'Translate a document', contributions_path(type: 'Translation')
+ = link_to t('.translation_button'), contributions_path(type: 'Translation')
%li{class: "btn #{'active' if params[:type] == 'Biography'} pull-left"}
- = link_to 'Write a biography', contributions_path(type: 'Biography')
+ = link_to t('.biography_button'), contributions_path(type: 'Biography')
%li.btn.pull-left
- = link_to 'Submit a correction', new_correction_path
+ = link_to t('.correction_button'), new_correction_path
#contributions-content
.contribution-list-title
- %h3= "Items in need of #{params[:type]}"
+ %h3=t '.contribution_request_message', type: params[:type]
#contribution-list
- %p.feed-intro= t("contributions.#{params[:type].downcase}.intro")
+ %p.feed-intro= t(".#{params[:type].downcase}.intro")
%ul.items#selected-items
- unless @requests.empty?
- @requests.each do |r|
@@ -28,17 +27,17 @@
.item-title
= r.title
.transcribe.btn.pull-right
- = link_to t("contributions.#{params[:type].downcase}.button"), new_contribution_path(type: params[:type], item: r.item)
+ = link_to t(".#{params[:type].downcase}.button"), new_contribution_path(type: params[:type], item: r.item)
-else
- %p= "No items in need of #{params[:type]}"
+ %p=t '.no_contribution_request_message', type: params[:type]
.transcription-subnav.pull-left
%a.show-more-items{href: '#', id: 'show-more-items'}
.icon-plus-circle#items-icon
- %span Show more documents
+ %span=t '.show_more_documents'
.contribution-list-title
- %h3= "Recently contributed #{params[:type]}s"
+ %h3=t '.recently_contributed_header', type: params[:type].pluralize
#contribution-feed
- %p.feed-intro= "Here are some recent #{params[:type].pluralize} contributed by the WWQI users:"
+ %p.feed-intro=t '.recently_contributed_header', type: params[:type].pluralize
%ul.items#recent-contributions
- unless @contributions.empty?
- @contributions.each do |c|
@@ -60,11 +59,11 @@
- following = current_user.following?(c.object)
= link_to following ? 'Unfollow' : 'Follow', '#', :class => ['btn', 'btn-primary', following && 'followed'], :data => { followable_id: c.id, followable_type: c.model.class.to_s.downcase, follow_id: following.try(:id) }
- else
- %p No recent contributions
+ %p=t '.no_recent_contributions'
.transcription-subnav
%a.show-more-contributions{href: '#', id: 'show-more-contributions'}
.icon-plus-circle#recent-contributions-icon
- = "Show more #{params[:type].downcase.pluralize}"
+ =t '.show_more_contributions', type: params[:type].downcase.pluralize
:coffeescript
$ ->
# Default number of items and contributions to show
View
@@ -22,18 +22,32 @@ en:
sign_up: "Please sign in or sign up below to access all of the research platform's features:"
contributions:
- transcription:
- intro: 'Do you have experience transcribing from Persian to English? If so, help us
- transcribe documents from our archives. Here are some suggested items that need a transcription:'
- button: 'Transcribe'
- translation:
- intro: 'Do you have experience translating from Persian to English? If so, help us
- translate documents from our archives. Here are some suggested items that need a translation:'
- button: 'Translate'
- biography:
- intro: 'Did you notice an item missing a biography? If so, help us by writing a
- biography for our archives. Here are some suggested items that need a biography:'
- button: 'Write a biography'
+ index:
+ contribution_header: 'Help us enrich the WWQI archives by contributing information to the project.'
+ contribution_message: 'There are numerous ways you can contribute.'
+ no_contribution_request_message: 'No items in need of %{type}.'
+ contribution_request_message: 'Items in need of %{type}'
+ transcription_button: 'Transcribe a document'
+ translation_button: 'Translate a document'
+ biography_button: 'Write a biography'
+ correction_button: 'Submit a correction'
+ recently_contributed_header: "Recently contributed %{type}"
+ recently_contributed_intro: "Here are some recent %{type} contributed by the WWQI users:"
+ show_more_documents: 'Show more documents'
+ show_more_contributions: 'Show more %{type}'
+ no_recent_contributions: 'No recent contributions'
+ transcription:
+ intro: 'Do you have experience transcribing from Persian to English? If so, help us
+ transcribe documents from our archives. Here are some suggested items that need a transcription:'
+ button: 'Transcribe'
+ translation:
+ intro: 'Do you have experience translating from Persian to English? If so, help us
+ translate documents from our archives. Here are some suggested items that need a translation:'
+ button: 'Translate'
+ biography:
+ intro: 'Did you notice an item missing a biography? If so, help us by writing a
+ biography for our archives. Here are some suggested items that need a biography:'
+ button: 'Write a biography'
flash:
threads:

0 comments on commit 1b057c9

Please sign in to comment.