Changeset 464

Show
Ignore:
Timestamp:
07/21/07 10:13:00 (1 year ago)
Author:
jlong
Message:

jargon: added support for Gibberish [Kieth Bingham]

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • branches/jargon/radiant/app/controllers/admin/abstract_model_controller.rb

    r405 r464  
    9090     
    9191    def announce_saved(message = nil) 
    92       flash[:notice] = message || "#{humanized_model_name} saved below." 
     92      flash[:notice] = message || "{name} saved below."[:notice_model_saved, { :name => humanized_model_name }] 
    9393    end 
    9494     
    9595    def announce_validation_errors 
    96       flash[:error] = "Validation errors occurred while processing this form. Please take a moment to review the form and correct any input errors before continuing." 
     96      flash[:error] = "Validation errors occurred while processing this form. Please take a moment to review the form and correct any input errors before continuing."[:error_validation_errors] 
    9797    end 
    9898     
    9999    def announce_removed 
    100       flash[:notice] = "#{humanized_model_name} has been deleted." 
     100      flash[:notice] = "{name} has been deleted."[:notice_model_deleted, { :name => humanized_model_name }] 
    101101    end 
    102102     
    103103    def announce_update_conflict 
    104       flash[:error] = "#{humanized_model_name} has been modified since it was last loaded. Changes cannot be saved without potentially losing data." 
     104      flash[:error] = "{name} has been modified since it was last loaded. Changes cannot be saved without potentially losing data."[:error_model_update_conflict, { :name => humanized_model_name }] 
    105105    end 
    106106     
  • branches/jargon/radiant/app/controllers/admin/layout_controller.rb

    r405 r464  
    77    :when => [:developer, :admin], 
    88    :denied_url => { :controller => 'page', :action => 'index' }, 
    9     :denied_message => 'You must have developer privileges to perform this action.' 
     9    :denied_message => 'You must have developer privileges to perform this action.'[:developer_permissions] 
    1010 
    1111  def initialize 
  • branches/jargon/radiant/app/controllers/admin/page_controller.rb

    r427 r464  
    4141      redirect_to page_index_url 
    4242    else 
    43       render :text => 'Do not access this URL directly.' 
     43      render :text => 'Do not access this URL directly.'[:do_not_access] 
    4444    end 
    4545  end 
     
    7070   
    7171    def announce_saved(message = nil) 
    72       flash[:notice] = message || "Your page has been saved below." 
     72      flash[:notice] = message || "Your page has been saved below."[:notice_page_saved] 
    7373    end 
    7474     
    7575    def announce_pages_removed(count) 
    7676      flash[:notice] = if count > 1 
    77         "The pages were successfully removed from the site." 
     77        "The pages were successfully removed from the site."[:notice_pages_removed] 
    7878      else 
    79         "The page was successfully removed from the site." 
     79        "The page was successfully removed from the site."[:notice_page_removed] 
    8080      end 
    8181    end 
    8282     
    8383    def announce_cache_cleared 
    84       flash[:notice] = "The page cache was successfully cleared." 
     84      flash[:notice] = "The page cache was successfully cleared."[:notice_cache_cleared] 
    8585    end 
    8686     
  • branches/jargon/radiant/app/controllers/admin/user_controller.rb

    r405 r464  
    44  only_allow_access_to :index, :new, :edit, :remove, :when => :admin, 
    55    :denied_url => {:controller => 'page', :action => :index}, 
    6     :denied_message => 'You must have administrative privileges to perform this action.' 
     6    :denied_message => 'You must have administrative privileges to perform this action.'[:admin_permissions] 
    77   
    88  def preferences 
     
    1111      handle_new_or_edit_post( 
    1212        :redirect_to => page_index_url, 
    13         :saved_message => 'Your preferences have been saved.' 
     13        :saved_message => 'Your preferences have been saved.'[:preferences_saved] 
    1414      ) 
    1515    else 
     
    3030   
    3131    def announce_cannot_delete_self 
    32       flash[:error] = 'You cannot delete yourself.' 
     32      flash[:error] = 'You cannot delete yourself.'[:error_delete_self] 
    3333    end 
    3434   
    3535    def announce_bad_data 
    36       flash[:error] = 'Bad form data.' 
     36      flash[:error] = 'Bad form data.'[:error_bad_data] 
    3737    end 
    3838     
  • branches/jargon/radiant/app/controllers/admin/welcome_controller.rb

    r405 r464  
    2828   
    2929    def announce_logged_out 
    30       flash[:notice] = 'You are now logged out.' 
     30      flash[:notice] = 'You are now logged out.'[:notice_logout] 
    3131    end 
    3232     
    3333    def announce_invalid_user 
    34       flash[:error] = 'Invalid username or password.' 
     34      flash[:error] = 'Invalid username or password.'[:error_login] 
    3535    end 
    3636     
  • branches/jargon/radiant/app/helpers/admin/page_helper.rb

    r428 r464  
    3232    unless filter_name.blank? 
    3333      filter_class = (filter_name + "Filter").constantize 
    34       filter_class.description.blank? ? "There is no documentation on this filter." : filter_class.description 
     34      filter_class.description.blank? ? "There is no documentation on this filter."[:no_filter_docs] : filter_class.description 
    3535    else 
    36       "There is no filter on the current page part." 
     36      "There is no filter on the current page part."[:no_filter] 
    3737    end 
    3838  end 
  • branches/jargon/radiant/app/helpers/application_helper.rb

    r405 r464  
    2222  def save_model_button(model) 
    2323    label = if model.new_record? 
    24       "Create #{model.class.name}" 
     24      "Create {name}"[:create_model, { :name => model.class.name }] 
    2525    else 
    26       'Save Changes' 
     26      'Save Changes'[:save_changes] 
    2727    end 
    2828    submit_tag label, :class => 'button' 
     
    3030   
    3131  def save_model_and_continue_editing_button(model) 
    32     submit_tag 'Save and Continue Editing', :name => 'continue', :class => 'button' 
     32    submit_tag 'Save and Continue Editing'[:save_and_continue], :name => 'continue', :class => 'button' 
    3333  end 
    3434 
     
    109109      time = (model.updated_at || model.created_at) 
    110110      if login or time 
    111         html = %{<p style="clear: left"><small>Last updated }  
    112         html << %{by #{login} } if login 
    113         html << %{at #{ time.strftime("%I:%M <small>%p</small> on %B %d, %Y") }} if time 
     111        html = %{<p style="clear: left"><small>#{"Last updated"[:last_updated]} }  
     112        html << %{#{"by"[:by]} #{login} } if login 
     113        html << %{#{"at"[:at]} #{ time.strftime("%I:%M <small>%p</small> on %B %d, %Y"[:datetime_format]) }} if time 
    114114        html << %{</small></p>} 
    115115        html 
  • branches/jargon/radiant/app/models/layout.rb

    r405 r464  
    1010 
    1111  # Validations 
    12   validates_presence_of :name, :message => 'required' 
    13   validates_uniqueness_of :name, :message => 'name already in use' 
    14   validates_length_of :name, :maximum => 100, :message => '%d-character limit' 
     12  validates_presence_of :name, :message => 'required'[:required] 
     13  validates_uniqueness_of :name, :message => 'name already in use'[:name_in_use] 
     14  validates_length_of :name, :maximum => 100, :message => '%d-character limit'[:character_limit] 
    1515 
    1616end 
  • branches/jargon/radiant/app/views/admin/extension/index.rhtml

    r405 r464  
    1111<% end -%> 
    1212 
    13 <h1>Extensions</h1> 
     13<h1><%= "Extensions"[:extensions] %></h1> 
    1414 
    1515<form name="extensions-form" action="<%= extension_update_url %>" method="post"> 
     
    1717    <thead> 
    1818      <tr> 
    19         <th class="extension">Extension</th> 
    20         <th class="website">Website</td> 
    21         <th class="version">Version</th> 
    22         <th class="enabled">Enabled</th> 
     19        <th class="extension"><%= "Extension"[:extension] %></th> 
     20        <th class="website"><%= "Website"[:website] %></td> 
     21        <th class="version"><%= "Version"[:version] %></th> 
     22        <th class="enabled"><%= "Enabled"[:enabled] %></th> 
    2323      </tr> 
    2424    </thead> 
     
    3030          <p><%=h extension.description %></p> 
    3131        </td> 
    32         <td class="website"><%= link_to "Website", extension.url, :target => "_blank" unless extension.url.blank? %></td> 
     32        <td class="website"><%= link_to "Website"[:website], extension.url, :target => "_blank" unless extension.url.blank? %></td> 
    3333        <td class="version"><%=h extension.version %></td> 
    3434        <td class="enabled"><input type="checkbox" name="enabled_extensions[]" value="<%= extension.extension_name %>" <%= 'checked="checked"' if extension.enabled? %> /></td> 
  • branches/jargon/radiant/app/views/admin/layout/edit.rhtml

    r405 r464  
    11<% if @layout.new_record? -%> 
    2 <h1>New Layout</h1> 
     2<h1><%= "New Layout"[:new_layout] %></h1> 
    33<% else -%> 
    4 <h1>Edit Layout</h1> 
     4<h1><%= "Edit Layout"[:edit_layout] %></h1> 
    55<% end -%> 
    66 
     
    99  <div class="form-area"> 
    1010    <p class="title"> 
    11       <label for="layout_name">Name</label> 
     11      <label for="layout_name"><%= "Name"[:name] %></label> 
    1212      <%= text_field "layout", "name", :class => 'textbox', :maxlength => 100 %> 
    1313    </p> 
     
    1515      <table class="fieldset" cellpadding="0" cellspacing="0" border="0"> 
    1616        <tr> 
    17           <td class="label"><label for="layout_content_type">Content&#8209;Type</label></td> 
     17          <td class="label"><label for="layout_content_type"><%= "Content&#8209;Type"[:content_type] %></label></td> 
    1818          <td class="field"><%= text_field "layout", "content_type", :class => 'textbox', :maxlength => 40 %></td> 
    1919        </tr> 
     
    2222    <p> 
    2323      <small> 
    24         <a id="more-extended-metadata" href="#" onclick="<%= toggle_javascript_for('extended-metadata') %>"<%= meta_visible(:meta_more) %>>More</a> 
    25         <a id="less-extended-metadata" href="#" onclick="<%= toggle_javascript_for('extended-metadata') %>"<%= meta_visible(:meta_less) %>>Less</a> 
     24        <a id="more-extended-metadata" href="#" onclick="<%= toggle_javascript_for('extended-metadata') %>"<%= meta_visible(:meta_more) %>><%= "More"[:more] %></a> 
     25        <a id="less-extended-metadata" href="#" onclick="<%= toggle_javascript_for('extended-metadata') %>"<%= meta_visible(:meta_less) %>><%= "Less"[:less] %></a> 
    2626      </small> 
    2727    </p> 
    2828    <p class="content"> 
    29       <label for="layout_content">Body</label> 
     29      <label for="layout_content"><%= "Body"[:body] %></label> 
    3030      <%= text_area "layout", "content", :class => "textarea", :style => "width: 100%" %> 
    3131    </p> 
     
    3333  </div> 
    3434  <p class="buttons"> 
    35     <%= save_model_button(@layout) %> <%= save_model_and_continue_editing_button(@layout) %> or <%= link_to "Cancel", layout_index_url %> 
     35    <%= save_model_button(@layout) %> <%= save_model_and_continue_editing_button(@layout) %> or <%= link_to "Cancel"[:cancel], layout_index_url %> 
    3636  </p> 
    3737</form> 
  • branches/jargon/radiant/app/views/admin/layout/index.rhtml

    r405 r464  
    1 <h1>Layouts</h1> 
     1<h1><%= "Layouts"[:layouts] %></h1> 
    22 
    3 <p>Use layouts to apply a visual look to a  Web page. Layouts can contain special tags to include 
     3<p><%= "Use layouts to apply a visual look to a  Web page. Layouts can contain special tags to include 
    44  page content and other elements such as the header or footer. Click on a layout name below to 
    5   edit it or click <code>Remove</code> to delete it.</p> 
     5  edit it or click <code>Remove</code> to delete it."[:note_layouts] %></p> 
    66 
    77<table id="layouts" class="index" cellpadding="0" cellspacing="0" border="0"> 
    88  <thead> 
    99    <tr> 
    10       <th class="layout">Layout</th> 
    11       <th class="modify">Modify</th> 
     10      <th class="layout"><%= "Layout"[:layout] %></th> 
     11      <th class="modify"><%= "Modify"[:modify] %></th> 
    1212    </tr> 
    1313  </thead> 
     
    2020        <%= link_to layout.name, layout_edit_url(:id => layout) %> 
    2121      </td> 
    22       <td class="remove"><%= link_to image('remove', :alt => 'Remove Layout'), layout_remove_url(:id => layout) %></td> 
     22      <td class="remove"><%= link_to image('remove', :alt => 'Remove Layout'[:remove_layout]), layout_remove_url(:id => layout) %></td> 
    2323    </tr> 
    2424<% end -%> 
    2525<% else -%> 
    2626    <tr> 
    27       <td colspan="2" class="note">No Layouts</td> 
     27      <td colspan="2" class="note"><%= "No Layouts"[:no_layouts] %></td> 
    2828    </tr> 
    2929<% end -%> 
     
    3636</script> 
    3737 
    38 <p><%= link_to image('new-layout', :alt => 'New Layout'), layout_new_url %></p> 
     38<p><%= link_to image('new-layout', :alt => 'New Layout'[:new_layout]), layout_new_url %></p> 
  • branches/jargon/radiant/app/views/admin/layout/remove.rhtml

    r405 r464  
    1 <h1>Remove Layout</h1> 
    2 <p>Are you sure you want to <strong class="warning">permanently remove</strong> the following layout?</p> 
     1<h1><%= "Remove Layout"[:remove_layout] %></h1> 
     2<p><%= 'Are you sure you want to <strong class="warning">permanently remove</strong> the following layout?'[:note_remove_layout] %></p> 
    33 
    44<table id="site-map" class="index" cellpadding="0" cellspacing="0" border="0"> 
     
    1414 
    1515<form method="post"> 
    16   <p class="buttons"><%= submit_tag "Delete Layout", :class => 'button' %> or <%= link_to 'Cancel', layout_index_url %></p> 
     16  <p class="buttons"><%= submit_tag "Delete Layout"[:delete_layout], :class => 'button' %> or <%= link_to 'Cancel'[:cancel], layout_index_url %></p> 
    1717</form> 
  • branches/jargon/radiant/app/views/admin/page/_part.rhtml

    r405 r464  
    77    <%= hidden_field_tag "part[#{@index - 1}][name]", @part.name %> 
    88    <p> 
    9       <label for="part[<%= @index - 1 %>][filter_id]">Filter</label> 
    10       <%= select_tag "part[#{@index - 1}][filter_id]", options_for_select([['<none>', '']] + TextFilter.descendants.map { |s| s.filter_name }.sort, @part.filter_id) %> 
    11       <span id="reference-links">Reference: <span id="filter-reference-link-<%= @index-1 %>"><%= link_to_function "Filter", "load_filter_reference(#{@index - 1})" %></span> <span id="tag-reference-link-<%= @index -1 %>"><%= link_to_function 'Available Tags', "load_tag_reference(#{@index-1});" %></span></span> 
     9      <label for="part[<%= @index - 1 %>][filter_id]"><%= "Filter:"[:filter] %></label> 
     10      <%= select_tag "part[#{@index - 1}][filter_id]", options_for_select([['<none>'[:none], '']] + TextFilter.descendants.map { |s| s.filter_name }.sort, @part.filter_id) %> 
     11      <span id="reference-links"><%= "Reference:"[:reference] %> <span id="filter-reference-link-<%= @index-1 %>"><%= link_to_function "Filter", "load_filter_reference(#{@index - 1})" %></span> <span id="tag-reference-link-<%= @index -1 %>"><%= link_to_function 'Available Tags', "load_tag_reference(#{@index-1});" %></span></span> 
    1212    </p> 
    1313    <div><%= text_area_tag "part[#{@index - 1}][content]", h(@part.content), :class => "textarea", :style => "width: 100%" %></div> 
  • branches/jargon/radiant/app/views/admin/page/edit.rhtml

    r432 r464  
    103103<% include_javascript "tag_reference_search" %> 
    104104<% if @page.new_record? -%> 
    105 <h1 id="new_page">New Page</h1> 
     105<h1 id="new_page"><%= "New Page"[:new_page] %></h1> 
    106106<% else -%> 
    107 <h1 id="edit_page">Edit Page</h1> 
     107<h1 id="edit_page"><%= "Edit Page"[:edit_page] %></h1> 
    108108<% end -%> 
    109109 
     
    138138    <p class="more-or-less"> 
    139139      <small> 
    140         <a href="#" onclick="<%= toggle_javascript_for('extended-metadata') %>"<%= meta_visible(:meta_more) %> id="more-extended-metadata">More</a> 
    141         <a href="#" onclick="<%= toggle_javascript_for('extended-metadata') %>"<%= meta_visible(:meta_less) %> id="less-extended-metadata">Less</a> 
     140        <a href="#" onclick="<%= toggle_javascript_for('extended-metadata') %>"<%= meta_visible(:meta_more) %> id="more-extended-metadata"><%= "More"[:more] %></a> 
     141        <a href="#" onclick="<%= toggle_javascript_for('extended-metadata') %>"<%= meta_visible(:meta_less) %> id="less-extended-metadata"><%= "Less"[:less] %></a> 
    142142      </small> 
    143143    </p> 
     
    145145      <div id="tabs" class="tabs"> 
    146146        <div id="tab-toolbar"> 
    147           <%= link_to_function image('plus'), 'toggle_add_part_popup()', :title => 'Add Tab' %> 
     147          <%= link_to_function image('plus'), 'toggle_add_part_popup()', :title => 'Add Tab'[:add_tab] %> 
    148148          <%= link_to_function image('minus'), 'if(confirm(\'Delete the current tab?\')) { tabControl.removeTab(tabControl.selected) }', :title => 'Remove Tab' %> 
    149149        </div> 
     
    169169    </script> 
    170170    <div class="row"> 
    171       <p><label for="page_layout_id">Layout</label> 
    172         <%= select "page", "layout_id", [['<inherit>', '']] + Layout.find(:all).map { |s| [s.name, s.id] } %></p> 
    173       <p><label for="page_class_name">Page Type</label> 
    174         <%= select "page", "class_name", [['<normal>', 'Page']] + Page.descendants.map { |p| [p.display_name, p.name] }.sort_by { |p| p.first } %></p> 
    175       <p><label for="page_status_id">Status</label> 
     171      <p><label for="page_layout_id"><%= "Layout"[:layout] %></label> 
     172        <%= select "page", "layout_id", [['<inherit>'[:inherit], '']] + Layout.find(:all).map { |s| [s.name, s.id] } %></p> 
     173      <p><label for="page_class_name"><%= "Page Type"[:page_type] %></label> 
     174        <%= select "page", "class_name", [['<normal>'[:normal], 'Page'[:page]]] + Page.descendants.map { |p| [p.display_name, p.name] }.sort_by { |p| p.first } %></p> 
     175      <p><label for="page_status_id"><%= "Status"[:status] %></label> 
    176176        <%= select "page", "status_id", Status.find_all.map { |s| [s.name, s.id] } %></p> 
    177177    </div> 
     
    202202        <%= hidden_field_tag 'index', @index + 1, :id => 'part-index-field' %> 
    203203        <%= text_field_tag "part[name]", "", :id => 'part-name-field', :maxlength => 100 %>  
    204         <%= submit_tag "Add Part", :id => 'add-part-button' %> 
     204        <%= submit_tag "Add Part"[:add_part], :id => 'add-part-button' %> 
    205205      </div> 
    206       <p><%= link_to_function 'Close', "Element.hide('add-part-popup')", :class => 'close-link' %></p> 
     206      <p><%= link_to_function 'Close'[:close], "Element.hide('add-part-popup')", :class => 'close-link' %></p> 
    207207    <% end %> 
    208208  </div> 
    209209  <div class="popup" id="tag-reference-popup" style="display:none;"> 
    210     <div style="float:right">Search Tags: <input type="text" id="search-tag-reference"></div> 
     210    <div style="float:right"><%= "Search Tags"[:search_tags] %>: <input type="text" id="search-tag-reference"></div> 
    211211    <%= javascript_tag "new Form.Element.Observer('search-tag-reference', 0.5, observeTagSearch);" %> 
    212212    <h3>Available Tags for <span id="page-type"><%= @page.class.display_name %></span></h3> 
    213213    <div id="tag-reference"><%= tag_reference(@page.class.name) %></div> 
    214     <p><%= link_to_function 'Close', "Element.hide('tag-reference-popup')", :class => 'close-link' %></p> 
     214    <p><%= link_to_function 'Close'[:close], "Element.hide('tag-reference-popup')", :class => 'close-link' %></p> 
    215215  </div> 
    216216  <div class="popup" id="filter-reference-popup" style="display:none;"> 
    217217    <h3><span id="filter-type"><%= default_filter_name %></span> Reference</h3> 
    218218    <div id="filter-reference"><%= filter_reference(default_filter_name) %></div> 
    219     <p><%= link_to_function 'Close', "Element.hide('filter-reference-popup')", :class => 'close-link' %></p> 
     219    <p><%= link_to_function 'Close'[:close], "Element.hide('filter-reference-popup')", :class => 'close-link' %></p> 
    220220  </div> 
    221221<% end -%> 
  • branches/jargon/radiant/app/views/admin/page/index.rhtml

    r427 r464  
    11<% include_javascript 'sitemap' -%> 
    22 
    3 <h1>Pages</h1> 
     3<h1><%= "Pages"[:pages] %></h1> 
    44 
    55<table id="site-map" class="index" cellpadding="0" cellspacing="0" border="0"> 
    66  <thead> 
    77    <tr> 
    8       <th class="page">Page</th> 
    9       <th class="status">Status</th> 
    10       <th class="modify" colspan="2">Modify</th> 
     8      <th class="page"><%= "Page"[:page] %></th> 
     9      <th class="status"><%= "Status"[:pages] %></th> 
     10      <th class="modify" colspan="2"><%= "Modify"[:modify] %></th> 
    1111    </tr> 
    1212  </thead> 
     
    1616<% else -%> 
    1717  <tr> 
    18     <td colspan="4" class="note">No Pages</td> 
     18    <td colspan="4" class="note"><%= "No Pages"[:no_pages] %></td> 
    1919  </tr> 
    2020<% end -%> 
  • branches/jargon/radiant/app/views/admin/page/remove.rhtml

    r84 r464  
    11<% pages = pluralize(@page.children.count + 1, 'Page') -%> 
    22 
    3 <h1 id="remove_article">Remove <%= pages %></h1> 
     3<h1 id="remove_article"><%= "Remove"[:remove] %> <%= pages %></h1> 
    44<p>Are you sure you want to <strong class="warning">permanently remove</strong> the following <%= pages.downcase %>?</p> 
    55 
     
    1111 
    1212<form method="post"> 
    13   <p class="buttons"><%= submit_tag "Delete #{pages}", :class => 'button' %> or <%= link_to 'Cancel', page_index_url %></p> 
     13  <p class="buttons"><%= submit_tag "Delete {pages}"[:delete_pages, { :pages => pages }], :class => 'button' %> or <%= link_to 'Cancel'[:cancel], page_index_url %></p> 
    1414</form> 
  • branches/jargon/radiant/app/views/admin/snippet/edit.rhtml

    r405 r464  
    11<% if @snippet.new_record? -%> 
    2 <h1>New Snippet</h1> 
     2<h1><%= "New Snippet"[:new_snippet] %></h1> 
    33<% else -%> 
    4 <h1>Edit Snippet</h1> 
     4<h1><%= "Edit Snippet"[:edit_snippet] %></h1> 
    55<% end -%> 
    66 
     
    1818    <p> 
    1919      <label for="snippet_filter">Filter</label> 
    20       <%= select_tag "snippet[filter_id]", options_for_select([['none', '']] + TextFilter.descendants.map { |f| f.filter_name }.sort, @snippet.filter_id) %> 
     20      <%= select_tag "snippet[filter_id]", options_for_select([['<none>'[:none], '']] + TextFilter.descendants.map { |f| f.filter_name }.sort, @snippet.filter_id) %> 
    2121    </p> 
    2222    <%= updated_stamp @snippet %> 
    2323  </div> 
    2424  <p class="buttons"> 
    25     <%= save_model_button(@snippet) %> <%= save_model_and_continue_editing_button(@snippet) %> or <%= link_to "Cancel", snippet_index_url %> 
     25    <%= save_model_button(@snippet) %> <%= save_model_and_continue_editing_button(@snippet) %> or <%= link_to "Cancel"[:cancel], snippet_index_url %> 
    2626  </p> 
    2727</form> 
  • branches/jargon/radiant/app/views/admin/snippet/index.rhtml

    r405 r464  
    1 <h1>Snippets</h1> 
     1<h1><%= "Snippets"[:snippets] %></h1> 
    22 
    3 <p>Snippets are generally small pieces of content which are included in other pages or layouts.</p> 
     3<p><%= "Snippets are generally small pieces of content which are included in other pages or layouts."[:note_snippets] %></p> 
    44 
    55<table id="snippets" class="index" cellpadding="0" cellspacing="0" border="0"> 
    66  <thead> 
    77    <tr> 
    8       <th class="snippet">Snippet</th> 
    9       <th class="modify">Modify</th> 
     8      <th class="snippet"><%= "Snippet"[:snippet] %></th> 
     9      <th class="modify"><%= "Modify"[:modify] %></th> 
    1010    </tr> 
    1111  </thead> 
     
    1818        <%= link_to snippet.name, snippet_edit_url(:id => snippet) %></span> 
    1919      </td> 
    20       <td class="remove"><%= link_to image('remove', :alt => 'Remove Snippet'), snippet_remove_url(:id => snippet) %></td> 
     20      <td class="remove"><%= link_to image('remove', :alt => 'Remove Snippet'[:remove_snippet]), snippet_remove_url(:id => snippet) %></td> 
    2121    </tr> 
    2222<% end -%> 
    2323<% else -%> 
    2424    <tr> 
    25       <td colspan="2" class="note">No Snippets</td> 
     25      <td colspan="2" class="note"><%= "No Snippets"[:no_snippets] %></td> 
    2626    </tr> 
    2727<% end -%> 
  • branches/jargon/radiant/app/views/admin/snippet/remove.rhtml

    r84 r464  
    1 <h1>Remove Snippet</h1> 
    2 <p>Are you sure you want to <strong class="warning">permanently remove</strong> the following snippet?</p> 
     1<h1><%= "Remove Snippet"[:delete_snippet] %></h1> 
     2<p><%= 'Are you sure you want to <strong class="warning">permanently remove</strong> the following snippet?'[:note_remove_snippet] %></p> 
    33 
    44<table id="snippets" class="index" cellpadding="0" cellspacing="0" border="0"> 
     
    1313 
    1414<form method="post"> 
    15   <p class="buttons"><%= submit_tag "Delete Snippet", :class => 'button' %> or <%= link_to 'Cancel', snippet_index_url %></p> 
     15  <p class="buttons"><%= submit_tag "Delete Snippet"[:delete_snippet], :class => 'button' %> or <%= link_to 'Cancel'[:cancel], snippet_index_url %></p> 
    1616</form> 
  • branches/jargon/radiant/app/views/admin/user/edit.rhtml

    r405 r464  
    11<% if @user.new_record? -%> 
    2 <h1>New User</h1> 
     2<h1><%= "New User"[:new_user] %></h1> 
    33<% else -%> 
    4 <h1>Edit User</h1> 
     4<h1><%= "Edit User"[:edit_user] %></h1> 
    55<% end -%> 
    66 
     
    99  <table class="fieldset" cellpadding="0" cellspacing="0" border="0"> 
    1010    <tr> 
    11       <td class="label"><label for="user_name">Name</label></td> 
     11      <td class="label"><label for="user_name"><%= "Name"[:name] %></label></td> 
    1212      <td class="field"><%= text_field "user", "name", :class => 'textbox', :maxlength => 100 %></td> 
    1313      <td class="help">Required.</td> 
    1414    </tr> 
    1515    <tr> 
    16       <td class="label"><label class="optional" for="user_email">E-mail</label></td> 
     16      <td class="label"><label class="optional" for="user_email"><%= "E-mail"[:email] %></label></td> 
    1717      <td class="field"><%= text_field "user", "email", :class => 'textbox', :maxlength => 255 %></td> 
    18       <td class="help">Optional. Please use a valid e-mail address.</td> 
     18      <td class="help"><%= "Optional. Please use a valid e-mail address."[:note_valid_email] %></td> 
    1919    </tr> 
    2020    <tr> 
    21       <td class="label"><label for="user_login">Username</label></td> 
     21      <td class="label"><label for="user_login"><%= "Username"[:username] %></label></td> 
    2222      <td class="field"><%= text_field "user", "login", :class => 'textbox', :maxlength => 40 %></td> 
    23       <td class="help">At least 3 characters. Must be unique.</td> 
     23      <td class="help"><%= "At least 3 characters. Must be unique."[:note_valid_username] %></td> 
    2424    </tr> 
    2525    <tr> 
    26       <td class="label"><label for="user_password">Password</label></td> 
     26      <td class="label"><label for="user_password"><%= "Password"[:password] %></label></td> 
    2727      <td class="field"><%= password_field "user", "password", :class => 'textbox', :value => '', :maxlength => 40 %></td> 
    28       <td class="help" rowspan="2">At least 5 characters. <% unless @user.new_record? %>Leave password blank for it to remain unchanged.<% end %></td> 
     28      <td class="help" rowspan="2"><%= "At least 5 characters."[:note_valid_password] %> <% unless @user.new_record? %><%= "Leave password blank for it to remain unchanged."[:note_change_password] %><% end %></td> 
    2929    </tr> 
    3030    <tr> 
    31       <td class="label"><label for="user_password_confirmation">Confirm&nbsp;Password</label></td> 
     31      <td class="label"><label for="user_password_confirmation"><%= "Confirm Password"[:confirm_password] %></label></td> 
    3232      <td class="field"><%= password_field "user", "password_confirmation", :class => 'textbox', :value => '', :maxlength => 40 %></td> 
    3333    </tr> 
     
    3535      <td class="label"><label for="user_admin">Roles</label></td> 
    3636      <td class="field"> 
    37         <span class="checkbox"><%= check_box "user", "admin" %>&nbsp;Administrator</span> 
    38         <span class="checkbox"><%= check_box "user", "developer" %>&nbsp;Developer</span> 
     37        <span class="checkbox"><%= check_box "user", "admin" %>&nbsp;<%= "Administrator"[:administrator] %></span> 
     38        <span class="checkbox"><%= check_box "user", "developer" %>&nbsp;<%= "Developer"[:developer] %></span> 
    3939      </td> 
    40       <td class="help">Roles restrict user privileges and turn parts of the administrative interface on or off.</td> 
     40      <td class="help"><%= "Roles restrict user privileges and turn parts of the administrative interface on or off."[:note_roles] %></td> 
    4141    </tr> 
    4242    <tr> 
    43       <td class="label"><label class="optional" for="user_notes">Notes</label></td> 
     43      <td class="label"><label class="optional" for="user_notes"><%= "Notes"[:notes] %></label></td> 
    4444      <td class="field"><%= text_area "user", "notes", :size => '40x4' %></td> 
    45       <td class="help">Optional.</td> 
     45      <td class="help"><%= "Optional."[:optional] %></td> 
    4646    </tr> 
    4747  </table> 
    4848  <%= updated_stamp @user %> 
    4949  <p class="buttons"> 
    50     <%= save_model_button(@user) %> <%= save_model_and_continue_editing_button(@user) %> or <%= link_to "Cancel", user_index_url %> 
     50    <%= save_model_button(@user) %> <%= save_model_and_continue_editing_button(@user) %> or <%= link_to "Cancel"[:cancel], user_index_url %> 
    5151  </p> 
    5252</form> 
  • branches/jargon/radiant/app/views/admin/user/index.rhtml

    r405 r464  
    1 <h1>Users</h1> 
     1<h1><%= "Users"[:users] %></h1> 
    22 
    33<table id="users" class="index" cellpadding="0" cellspacing="0" border="0"> 
    44  <thead> 
    55    <tr> 
    6       <th class="user">Name / Login</th> 
    7       <th class="roles">Roles</th> 
    8       <th class="modify">Modify</th> 
     6      <th class="user"><%= "Name"[:name] %> / <%= "Login"[:login] %></th> 
     7      <th class="roles"><%= "Roles"[:roles] %></th> 
     8      <th class="modify"><%= "Modify"[:modify] %></th> 
    99    </tr> 
    1010  </thead> 
     
    2525        %> 
    2626      </td> 
    27       <td class="remove"><%=  user.id != session['user'].id ? link_to(image('remove', :alt => 'Remove User'), user_remove_url(:id => user)) : image('remove-disabled', :alt => 'Remove') %></td> 
     27      <td class="remove"><%=  user.id != session['user'].id ? link_to(image('remove', :alt => 'Remove User'), user_remove_url(:id => user)) : image('remove-disabled', :alt => 'Remove'[:remove]) %></td> 
    2828    </tr> 
    2929<% end -%> 
    3030<% else -%> 
    3131    <tr> 
    32       <td colspan="3" class="note">No Users</td> 
     32      <td colspan="3" class="note"><%= "No Users"[:no_users] %></td> 
    3333    </tr> 
    3434<% end -%> 
  • branches/jargon/radiant/app/views/admin/user/preferences.rhtml

    r84 r464  
    44  <table class="fieldset" cellpadding="0" cellspacing="0" border="0"> 
    55    <tr> 
    6       <td class="label"><label for="user_password">Password</label></td> 
     6      <td class="label"><label for="user_password"><%= "Password"[:password] %></label></td> 
    77      <td class="field"><%= password_field "user", "password", :class => 'textbox', :value => '', :maxlength => 40 %></td> 
    8       <td class="help" rowspan="2">At least 5 characters. <% unless @user.new_record? %>Leave password blank for it to remain unchanged.<% end %></td> 
     8      <td class="help" rowspan="2"><%= "At least 5 characters."[:note_valid_password] %> <% unless @user.new_record? %><% "Leave password blank for it to remain unchanged."[:note_change_password] %><% end %></td> 
    99    </tr> 
    1010    <tr> 
    11       <td class="label"><label for="user_password_confirmation">Confirm Password</label></td> 
     11      <td class="label"><label for="user_password_confirmation"><%= "Confirm Password"[:confirm_password] %></label></td> 
    1212      <td class="field"><%= password_field "user", "password_confirmation", :class => 'textbox', :value => '', :maxlength => 40 %></td> 
    1313    </tr> 
    1414    <tr> 
    15       <td class="label"><label for="user_email">E-mail</label></td> 
     15      <td class="label"><label for="user_email"><%= "E-mail"[:email] %></label></td> 
    1616      <td class="field"><%= text_field "user", "email", :class => 'textbox', :maxlength => 255 %></td> 
    17       <td class="help">Optional.</td> 
     17      <td class="help"><%= "Optional"[:optional] %>.</td> 
    1818    </tr> 
    1919  </table> 
    2020  <p class="buttons"> 
    21     <%= submit_tag 'Save Changes' %> or <%= link_to "Cancel", admin_url %> 
     21    <%= submit_tag 'Save Changes'[:save_changes] %> or <%= link_to "Cancel"[:cancel], admin_url %> 
    2222  </p> 
    2323</form> 
  • branches/jargon/radiant/app/views/admin/user/remove.rhtml

    r84 r464  
    1 <h1>Remove User</h1> 
    2 <p>Are you sure you want to <strong class="warning">permanently remove</strong> the following user?</p> 
     1<h1><%= "Remove User"[:remove_user] %></h1> 
     2<p><%= 'Are you sure you want to <strong class="warning">permanently remove</strong> the following user?'[:note_remove_user] %></p> 
    33 
    44<table id="users" class="index" cellpadding="0" cellspacing="0" border="0"> 
     
    1313 
    1414<form method="post"> 
    15   <p class="buttons"><%= submit_tag "Delete User", :class => 'button' %> or <%= link_to 'Cancel', user_index_url %></p> 
     15  <p class="buttons"><%= submit_tag "Delete User"[:delete