refactor tmd helper, move closet_hangers#index autocomplete to markdown

This commit is contained in:
Emi Matchu 2013-01-09 17:30:40 -06:00
parent b00b9ae45e
commit 87920b4b94
5 changed files with 16 additions and 16 deletions

View file

@ -163,7 +163,7 @@ module ApplicationHelper
end end
def translate_markdown(key, options={}) def translate_markdown(key, options={})
RDiscount.new(translate(key, options)).to_html.html_safe RDiscount.new(translate("#{key}_markdown", options)).to_html.html_safe
end end
alias_method :tmd, :translate_markdown alias_method :tmd, :translate_markdown

View file

@ -76,19 +76,19 @@
- localized_cache :action_suffix => 'autocomplete_tmpls' do - localized_cache :action_suffix => 'autocomplete_tmpls' do
%script#autocomplete-item-tmpl{:type => 'text/x-jquery-tmpl'} %script#autocomplete-item-tmpl{:type => 'text/x-jquery-tmpl'}
%a %a
= t '.autocomplete.add_item_html', :item_name => '${item_name}' = tmd '.autocomplete.add_item', :item_name => '${item_name}'
%script#autocomplete-add-to-list-tmpl{:type => 'text/x-jquery-tmpl'} %script#autocomplete-add-to-list-tmpl{:type => 'text/x-jquery-tmpl'}
%a %a
= t '.autocomplete.add_to_list_html', :list_name => '${list_name}' = tmd '.autocomplete.add_to_list', :list_name => '${list_name}'
%script#autocomplete-add-to-group-tmpl{:type => 'text/x-jquery-tmpl'} %script#autocomplete-add-to-group-tmpl{:type => 'text/x-jquery-tmpl'}
%a %a
= t '.autocomplete.add_to_group_html', :group_name => '${group_name}' = tmd '.autocomplete.add_to_group', :group_name => '${group_name}'
%script#autocomplete-already-in-collection-tmpl{:type => 'text/x-jquery-tmpl'} %script#autocomplete-already-in-collection-tmpl{:type => 'text/x-jquery-tmpl'}
%span %span
= t '.autocomplete.already_in_collection_html', = tmd '.autocomplete.already_in_collection',
:collection_name => '${collection_name}' :collection_name => '${collection_name}'
- content_for :stylesheets do - content_for :stylesheets do

View file

@ -55,7 +55,7 @@
%figure %figure
= image_tag 'outfits_welcome.png' = image_tag 'outfits_welcome.png'
%figcaption= t '.sidebar.outfits.not_signed_in.header' %figcaption= t '.sidebar.outfits.not_signed_in.header'
= tmd '.sidebar.outfits.not_signed_in.pitch_markdown' = tmd '.sidebar.outfits.not_signed_in.pitch'
= link_to t('.sidebar.outfits.not_signed_in.sign_in'), = link_to t('.sidebar.outfits.not_signed_in.sign_in'),
login_path_with_return_to, :id => 'preview-outfits-log-in' login_path_with_return_to, :id => 'preview-outfits-log-in'
#preview-sharing.sidebar-view #preview-sharing.sidebar-view

View file

@ -119,11 +119,11 @@ en-meep:
header: (Not in a meepit) header: (Not in a meepit)
empty: There aren't any meepits here. empty: There aren't any meepits here.
autocomplete: autocomplete:
add_item_html: Meep <strong>%{item_name}</strong> add_item_markdown: Meep **%{item_name}**
add_to_list_html: Meep to <strong>%{list_name}</strong> add_to_list_markdown: Meep to **%{list_name}**
add_to_group_html: Meep to <strong>%{group_name}</strong>, no list add_to_group_markdown: Meep to **%{group_name}**, no list
already_in_collection_html: already_in_collection_markdown:
It's already meeped in <strong>%{collection_name}</strong> It's already meeped in **%{collection_name}**
petpage: petpage:
title: Export to meeppage title: Export to meeppage

View file

@ -120,11 +120,11 @@ en:
header: (Not in a list) header: (Not in a list)
empty: There aren't any items here. empty: There aren't any items here.
autocomplete: autocomplete:
add_item_html: Add <strong>%{item_name}</strong> add_item_markdown: Add **%{item_name}**
add_to_list_html: Add to <strong>%{list_name}</strong> add_to_list_markdown: Add to **%{list_name}**
add_to_group_html: Add to <strong>%{group_name}</strong>, no list add_to_group_markdown: Add to **%{group_name}**, no list
already_in_collection_html: already_in_collection_markdown:
It's already in <strong>%{collection_name}</strong> It's already in **%{collection_name}**
petpage: petpage:
title: Export to petpage title: Export to petpage