Skip to content

Commit

Permalink
First pass at adding captions and summaries to tables; also add ts
Browse files Browse the repository at this point in the history
  • Loading branch information
sarken committed Aug 9, 2012
1 parent 12ab27c commit d57f351
Show file tree
Hide file tree
Showing 28 changed files with 301 additions and 277 deletions.
4 changes: 2 additions & 2 deletions app/views/abuse_reports/index.html.erb
Expand Up @@ -7,8 +7,8 @@


<!--main content--> <!--main content-->
<div class="wrapper"> <div class="wrapper">
<table id="abuse_reports_table" summary=""> <table id="abuse_reports_table" summary="<%= ts("The ID, sender, date, and reported URL for abuse reports made on the archive, as well as links to view the detailed report.") %>">
<caption><%=ts("Listing all the abuse reports made on the archive.") %></caption> <caption><%=ts("All Abuse Reports Made on the Archive") %></caption>
<colgroup> <colgroup>
<col class="name" /> <col class="name" />
<col /> <col />
Expand Down
6 changes: 3 additions & 3 deletions app/views/abuse_reports/show.html.erb
@@ -1,4 +1,4 @@
<!--Descriptive page name, messages and instructions--><h2 class="heading"><%=h t('.abuse_report', :default => "Abuse Report") %> <%= @abuse_report.id %></h2> <!--Descriptive page name, messages and instructions--><h2 class="heading"><%= ts("Abuse Report") %> <%= @abuse_report.id %></h2>
<!--/descriptions--> <!--/descriptions-->


<!--subnav--> <!--subnav-->
Expand All @@ -11,8 +11,8 @@
<!--FRONT END, should this be a table or should it be an inbox? <!--FRONT END, should this be a table or should it be an inbox?
need to see some realdata to know, suspect inbox--> need to see some realdata to know, suspect inbox-->
<div class="wrapper"> <div class="wrapper">
<table id="abuse_report_table" summary=""> <table id="abuse_report_table" summary="<%= ts("The full abuse report including sender, URL of reported page, date reported, and detailed statement.") %>">
<caption><%=ts("Detailed abuse report") %></caption> <caption><%=ts("Detailed Abuse Report") %></caption>
<tr> <tr>
<th scope="row"><%=ts("From") %></th> <th scope="row"><%=ts("From") %></th>
<td><%= @abuse_report.email.blank? ? ts("Anonymous") : mail_to(@abuse_report.email) %></td> <td><%= @abuse_report.email.blank? ? ts("Anonymous") : mail_to(@abuse_report.email) %></td>
Expand Down
17 changes: 8 additions & 9 deletions app/views/admin/admin_users/_user_history.html.erb
@@ -1,13 +1,12 @@
<h3 class="heading"><%= t('.history', :default => 'User History') %></h3> <h3 class="heading"><%= ts('User History') %></h3>
<!--note, the summary should explain the table, the caption should title it-->
<div class="wrapper"> <div class="wrapper">
<table summary="shows what notable actions, such as creating an account, a user performed, and when they did them"> <table summary="Shows what notable actions, such as creating an account, a user performed, and when they did them.">
<caption><%= t('.user_history_caption', :default => 'History of user actions') %></caption> <caption><%= ts('History of User Actions') %></caption>
<thead> <thead>
<tr> <tr>
<th scope="col"><%= t('.log_date', :default => 'Date / Time') %></th> <th scope="col"><%= ts('Date / Time') %></th>
<th scope="col"><%= t('.log_action', :default => 'Action') %></th> <th scope="col"><%= ts('Action') %></th>
<th scope="col"><%= t('.log_details', :default => 'Details') %></th> <th scope="col"><%= ts('Details') %></th>
</tr> </tr>
</thead> </thead>
<tbody> <tbody>
Expand All @@ -22,8 +21,8 @@
<% end %> <% end %>
<tr> <tr>
<td><%= @user.created_at %></td> <td><%= @user.created_at %></td>
<td><%= t('.log_created', :default => 'Account Created') %></td> <td><%= ts('Account Created') %></td>
<td><%= t('.log_system', :default => 'System Generated') %></td> <td><%= ts('System Generated') %></td>
</tr> </tr>
</tbody> </tbody>
</table> </table>
Expand Down
4 changes: 2 additions & 2 deletions app/views/admin/admin_users/index.html.erb
Expand Up @@ -27,8 +27,8 @@
<h3 class="heading"><%= ts("#{pluralize(@users.total_entries, 'user')} found") %></h3> <h3 class="heading"><%= ts("#{pluralize(@users.total_entries, 'user')} found") %></h3>
<% if @users.size > 0 %> <% if @users.size > 0 %>
<div class="wrapper"> <div class="wrapper">
<table id="admin_users_table"> <table id="admin_users_table" summary="<%= ts("Name and email address for users matching the search criteria, as well as options for updating the user's roles and viewing the user's details.") %>">
<caption><%= ts("List of users") %></caption> <caption><%= ts("List of Users") %></caption>
<colgroup> <colgroup>
<col class="name"/> <col class="name"/>
<col span="6" /> <col span="6" />
Expand Down
6 changes: 3 additions & 3 deletions app/views/admin/admin_users/notify.html.erb
Expand Up @@ -32,14 +32,14 @@
<h3 class="heading"><%= ts("Or Select Users To Notify") %></h3> <h3 class="heading"><%= ts("Or Select Users To Notify") %></h3>
<%= alpha_paginated_section %> <%= alpha_paginated_section %>
<div class="wrapper"> <div class="wrapper">
<table id="admin_users_table"> <table id="admin_users_table" summary="<%= ts("List of users with the option to select all, none, or specific individuals who should receive the notification.") %>">
<caption><%= ts("Select Users To Notify") %></caption> <caption><%= ts("Select Users To Notify") %></caption>
<thead> <thead>
<tr> <tr>
<th scope="row"><%= ts("Select") %></th> <th scope="row"><%= ts("Select") %></th>
<td class="action"> <td class="action">
<a href="#" class="check_all">All</a> <a href="#" class="check_all"><%= ts("All") %></a>
<a href="#" class="check_none">None</a> <a href="#" class="check_none"><%= ts("None") %></a>
</td> </td>
</tr> </tr>
<tr> <tr>
Expand Down
22 changes: 11 additions & 11 deletions app/views/admin/skins/index.html.erb
Expand Up @@ -17,18 +17,18 @@
<h3 class="heading"><%= ts('Approval Queue') %></h3> <h3 class="heading"><%= ts('Approval Queue') %></h3>


<div class="wrapper"> <div class="wrapper">
<table id="unapproved" summary=""> <table id="unapproved" summary="<%= ts('Name, type, creator, preview, and description for skins awaiting approval, along with administrative notes and options.') %>">
<caption></caption> <caption><%= ts('Approval Queue for Skins') %></caption>
<thead> <thead>
<tr> <tr>
<th scope="col">Skin</th> <th scope="col"><%= ts('Skin') %></th>
<th scope="col">Type</th> <th scope="col"><%= ts('Type') %></th>
<th scope="col">Creator</th> <th scope="col"><%= ts('Creator') %></th>
<th scope="col">Preview</th> <th scope="col"><%= ts('Preview') %></th>
<th scope="col">Description</th> <th scope="col"><%= ts('Description') %></th>
<th scope="col">Admin Note</th> <th scope="col"><%= ts('Admin Note') %></th>
<th scope="col">Approve</th> <th scope="col"><%= ts('Approve') %></th>
<th scope="col">Reject</th> <th scope="col"><%= ts('Reject') %></th>
</tr> </tr>
</thead> </thead>
<tbody> <tbody>
Expand Down Expand Up @@ -58,7 +58,7 @@
</div> </div>
</fieldset> </fieldset>


<p class="submit actions"><%= submit_tag "Update" %></p> <p class="submit actions"><%= submit_tag ts('Update') %></p>


<% end %> <% end %>


Expand Down
4 changes: 2 additions & 2 deletions app/views/admin/skins/index_approved.html.erb
Expand Up @@ -14,8 +14,8 @@
<legend><%= ts('Approved Skins') %></legend> <legend><%= ts('Approved Skins') %></legend>
<h3 class="heading"><%= ts('Approved Skins') %></h3> <h3 class="heading"><%= ts('Approved Skins') %></h3>


<table id="approved" summary=""> <table id="approved" summary="<%= ts('Name, type, creator, and number of users for approved skins, along with administrative notes and actions.') %>">
<caption></caption> <caption><%= ts('Approved Skins') %></caption>
<thead> <thead>
<tr> <tr>
<th scope="col"><%= ts('Skin') %></th> <th scope="col"><%= ts('Skin') %></th>
Expand Down
16 changes: 8 additions & 8 deletions app/views/admin/skins/index_rejected.html.erb
Expand Up @@ -12,15 +12,15 @@
<fieldset> <fieldset>
<legend><%= ts('Rejected Skins') %></legend> <legend><%= ts('Rejected Skins') %></legend>
<h3 class="heading"><%= ts('Rejected Skins') %></h3> <h3 class="heading"><%= ts('Rejected Skins') %></h3>
<table id="rejected" summary=""> <table id="rejected" summary="<%= ts('Name, type, and creator of rejected skins, along with administrative notes and the obtion to unreject the skin.') %>">
<caption></caption> <caption><%= ts('Rejected Skins') %></caption>
<thead> <thead>
<tr> <tr>
<th scope="col">Skin</th> <th scope="col"><%= ts('Skin') %></th>
<th scope="col">Type</th> <th scope="col"><%= ts('Type') %></th>
<th scope="col">Creator</th> <th scope="col"><%= ts('Creator') %></th>
<th scope="col">Admin Note</th> <th scope="col"><%= ts('Admin Note') %></th>
<th scope="col">Unreject</th> <th scope="col"><%= ts('Unreject') %></th>
</tr> </tr>
</thead> </thead>
<tbody> <tbody>
Expand All @@ -38,7 +38,7 @@
</table> </table>
</fieldset> </fieldset>


<p class="submit actions"><%= submit_tag "Update" %></p> <p class="submit actions"><%= submit_tag ts('Update') %></p>


<% end %> <% end %>


Expand Down
8 changes: 4 additions & 4 deletions app/views/admin/stats/_invitation_stats.html.erb
@@ -1,7 +1,7 @@
<!--this table is irregular and incomplete. headers need scopes, the summary must be completed, and empty cells should be avoided--> <!--this table is irregular and incomplete. headers need scopes, the summary must be completed, and empty cells should be avoided-->


<table summary=""> <table summary="<%= ts('') %>">
<caption>Invitations: by status</caption> <caption><%= ts('Invitations by Status') %></caption>
<thead> <thead>
<tr> <tr>
<td></td> <td></td>
Expand All @@ -20,8 +20,8 @@


<!--this table is irregular and incomplete. headers need scopes, the summary must be completed, and empty cells should be avoided--> <!--this table is irregular and incomplete. headers need scopes, the summary must be completed, and empty cells should be avoided-->


<table class="stats" summary=""> <table class="stats" summary="<%= ts('') %>">
<caption>Invitations: by week</caption> <caption><%= ts('Invitations by Week') %></caption>
<thead> <thead>
<tr> <tr>
<td></td> <td></td>
Expand Down
4 changes: 2 additions & 2 deletions app/views/admin/stats/_user_stats.html.erb
@@ -1,7 +1,7 @@
<!--this table is irregular and incomplete. headers need scopes, the summary must be completed, and empty cells should be avoided--> <!--this table is irregular and incomplete. headers need scopes, the summary must be completed, and empty cells should be avoided-->


<table class="stats" summary=""> <table class="stats" summary="<%= ts('') %>">
<caption>Invitations: by week</caption> <caption><%= ts('Invitations by Week') %></caption>
<thead> <thead>
<tr> <tr>
<td></td> <td></td>
Expand Down
4 changes: 2 additions & 2 deletions app/views/admin/stats/_work_stats.html.erb
@@ -1,5 +1,5 @@
<table class="stats " summary=""> <table class="stats " summary="<%= ts('') %>">
<caption>Works: by week</caption> <caption><%= ts('Works by Week') %></caption>
<thead> <thead>
<tr> <tr>
<td></td> <td></td>
Expand Down
12 changes: 7 additions & 5 deletions app/views/admins/index.html.erb
@@ -1,20 +1,22 @@
<!--Descriptive page name, messages and instructions--> <!--Descriptive page name, messages and instructions-->
<h2 class="heading"><%=h t('.listing', :default => "Listing admins") %></h2> <h2 class="heading"><%= ts('Listing Admins') %></h2>
<!--/descriptions--> <!--/descriptions-->


<!--subnav--> <!--subnav-->
<!--/subnav--> <!--/subnav-->


<!--main content--> <!--main content-->
<table summary=""> <table summary="<%= ts('List of administrator accounts with option to destroy each account.') %>">
<caption><%=h t('.a_list_of', :default => "All the administrator accounts in the archive.") %></caption> <caption><%= ts('All Administrator Accounts in the Archive') %></caption>
<tr> <tr>
<th scope="col"><%= ts('Account') %></th>
<th scope="col"><%= ts('Destroy Account') %></th>
</tr> </tr>


<% for admin in @admins %> <% for admin in @admins %>
<tr> <tr>
<td><%= link_to t('.show_link', :default => 'Show'), admin %></td> <td><%= link_to ts('Show'), admin %></td>
<td><%= link_to t('.destroy_link', :default => 'Destroy'), admin, :confirm => 'Are you sure?', :method => :delete %></td> <td><%= link_to ts('Destroy'), admin, :confirm => 'Are you sure?', :method => :delete %></td>
</tr> </tr>
<% end %> <% end %>
</table> </table>
Expand Down
24 changes: 12 additions & 12 deletions app/views/archive_faqs/_admin_index.html.erb
@@ -1,30 +1,30 @@
<!--Descriptive page name, messages and instructions--> <!--Descriptive page name, messages and instructions-->
<h2 class="heading"><%= t("archive_faq", :default => "Archive FAQ") %></h2> <h2 class="heading"><%= ts("Archive FAQ") %></h2>
<!--/descriptions--> <!--/descriptions-->


<!--subnav--> <!--subnav-->
<%= render :partial => 'admin/admin_nav' %> <%= render :partial => 'admin/admin_nav' %>
<ul class="navigation actions" role="navigation"> <ul class="navigation actions" role="navigation">
<li><%= link_to "Add a new section", new_archive_faq_path %></li> <li><%= link_to ts("Add a new section"), new_archive_faq_path %></li>
<li><%= link_to "Reorder FAQs", manage_archive_faqs_path %></li> <li><%= link_to ts("Reorder FAQs"), manage_archive_faqs_path %></li>
</ul> </ul>
<!--/subnav--> <!--/subnav-->


<!--main content--> <!--main content-->
<!--FRONT END: TABLEWATCH!! SUGGEST DL.INDEX PATTERN--> <!--FRONT END: TABLEWATCH!! SUGGEST DL.INDEX PATTERN-->
<div class="wrapper"> <div class="wrapper">
<table summary="This table lists Archive FAQs by title, date posted and date updated, and lets you show, edit, and delete each FAQ."> <table summary="<%= ts("This table lists Archive FAQs by title, date posted and date updated, and lets you show, edit, and delete each FAQ.") %>">
<caption>Manage Archive FAQs</caption> <caption><%= ts("Manage Archive FAQs") %></caption>
<colgroup> <colgroup>
<col class="name" /> <col class="name" />
<col span="5" /> <col span="5" />
</colgroup> </colgroup>
<thead> <thead>
<tr> <tr>
<th scope="col"><%=h 'Title' %></th> <th scope="col"><%= ts("Title") %></th>
<th scope="col"><%=h 'Posted' %></th> <th scope="col"><%= ts("Posted") %></th>
<th scope="col"><%=h 'Updated' %></th> <th scope="col"><%= ts("Updated") %></th>
<th scope="col" colspan="3"><%=h 'Actions' %></th> <th scope="col" colspan="3"><%= ts("Actions") %></th>
</tr> </tr>
</thead> </thead>
<tbody> <tbody>
Expand All @@ -33,9 +33,9 @@
<th scope="row"><%= link_to archive_faq.title, archive_faq %></th> <th scope="row"><%= link_to archive_faq.title, archive_faq %></th>
<td><%=h archive_faq.created_at %></td> <td><%=h archive_faq.created_at %></td>
<td><%=h archive_faq.updated_at %></td> <td><%=h archive_faq.updated_at %></td>
<td class="actions"><%= link_to "Show", archive_faq %></td> <td class="actions"><%= link_to ts("Show"), archive_faq %></td>
<td class="actions"><%= link_to "Edit", edit_archive_faq_path(archive_faq) %></td> <td class="actions"><%= link_to ts("Edit"), edit_archive_faq_path(archive_faq) %></td>
<td class="actions"><%= link_to "Delete", archive_faq, :confirm => 'Are you sure?', :method => :delete %></td> <td class="actions"><%= link_to ts("Delete"), archive_faq, :confirm => 'Are you sure?', :method => :delete %></td>
</tr> </tr>
<% end %> <% end %>
</tbody> </tbody>
Expand Down
33 changes: 26 additions & 7 deletions app/views/devmode/index.html.erb
@@ -1,8 +1,27 @@
<h1><%= t('.devmode', :default => "Devmode") %></h1> <h1><%= ts('Devmode') %></h1>
<table> <table summary="<%= ts('Development tasks and links to the pages for doing them.') %>" id="devmode">
<tr><td>Generate users</td><td><a href="devmode/seedusers">Create seed users</a></td></tr> <caption><%= ts('Shortcuts for Development Mode') %></caption>
<tr><td>Generate works</td><td><a href="devmode/seedworks">Create seed works, comments, etc.</a> - Don't do it on a database you value!</td></tr> <tr>
<tr><td>Inspect controllers/views</td><td><a href="devmode/list_controllers">See a dynamic list of active controllers, and drill down through views.</a></td></tr> <th scope="col"><%= ts('Task') %></th>
<tr><td>Unregister all imported works</td><td><a href="devmode/unregister_imports">Unregister all imported works</a> - Causes the archive to forget every URL that's ever been imported, so they can be imported again. </td></tr> <th scope="col"><%= ts('Page') %></th>
<tr><td>Show profiling logs</td><td><a href="devmode/profile_logs">Show profile logs</a></td></tr> <tr>
<td>Generate users</td>
<td><a href="devmode/seedusers">Create seed users</a></td>
</tr>
<tr>
<td>Generate works</td>
<td><a href="devmode/seedworks">Create seed works, comments, etc.</a> - Don't do it on a database you value!</td>
</tr>
<tr>
<td>Inspect controllers/views</td>
<td><a href="devmode/list_controllers">See a dynamic list of active controllers, and drill down through views.</a></td>
</tr>
<tr>
<td>Unregister all imported works</td>
<td><a href="devmode/unregister_imports">Unregister all imported works</a> - Causes the archive to forget every URL that's ever been imported, so they can be imported again.</td>
</tr>
<tr>
<td>Show profiling logs</td>
<td><a href="devmode/profile_logs">Show profile logs</a></td>
</tr>
</table> </table>
13 changes: 7 additions & 6 deletions app/views/devmode/list_controllers.html.erb
@@ -1,16 +1,17 @@
<?= link_to "Devmode top", devmode_path ?> <?= link_to ts("Devmode top"), devmode_path ?>
<h1><%= t('.controller_info', :default => "Controller info") %></h1> <h1><%= ts("Controller Info") %></h1>
<% if @errors %> <% if @errors %>
<div class="error" style="color: red"> <div class="error" style="color: red">
<%= @errors %> <%= @errors %>
</div> </div>
<% end %> <% end %>
<div class="form"> <div class="form">
<table> <table summary="<%= ts('') %>">
<caption><%= ts('') %></caption>
<tr> <tr>
<th>Controller name</th> <th scope="col"><%= ts('Controller name') %></th>
<th>View methods</th> <th scope="col"><%= ts('View methods') %></th>
<th>Other methods</th> <th scope="col"><%= ts('Other methods') %></th>
</tr> </tr>
<% for controller_info in @controllers %> <% for controller_info in @controllers %>
<tr> <tr>
Expand Down
7 changes: 4 additions & 3 deletions app/views/devmode/seedusers.html.erb
@@ -1,5 +1,5 @@
<%= link_to "Devmode top", devmode_path %> <%= link_to ts("Devmode top"), devmode_path %>
<h1><%= t('.seed_users', :default => "Seed users") %></h1> <h1><%= ts("Seed Users") %></h1>
<% if @errors %> <% if @errors %>
<div class="error" style="color: red"> <div class="error" style="color: red">
<%= @errors %> <%= @errors %>
Expand All @@ -16,7 +16,8 @@
<li style="list-style-type: square">If you select the {prevalidate} option, then users will be activated automatically, and e-mail addresses can be falsified. <li style="list-style-type: square">If you select the {prevalidate} option, then users will be activated automatically, and e-mail addresses can be falsified.
</ul> </ul>
</p> </p>
<table> <table summary="<%= ts('') %>">
<caption><%= ts('') %></caption>
<% for name, (type_name, default) in @params %> <% for name, (type_name, default) in @params %>
<tr><td> <%= name %> </td><td><%= "<input name=\"#{name}\" type=\"#{type_name}\" value=\"#{default}\"/>"%></td></tr> <tr><td> <%= name %> </td><td><%= "<input name=\"#{name}\" type=\"#{type_name}\" value=\"#{default}\"/>"%></td></tr>
<% end %> <% end %>
Expand Down
10 changes: 6 additions & 4 deletions app/views/devmode/seedworks.html.erb
@@ -1,5 +1,5 @@
<?= link_to "Devmode top", devmode_path ?> <?= link_to ts("Devmode top"), devmode_path ?>
<h1><%= t('.seed_works', :default => "Seed works") %></h1> <h1><%= ts("Seed Works") %></h1>
<% if @errors %> <% if @errors %>
<div class="error" style="color: red"> <div class="error" style="color: red">
<%= @errors %> <%= @errors %>
Expand All @@ -11,12 +11,14 @@
</p> </p>
<div class="form"> <div class="form">
<form name="seedusers" method="post" action=""> <form name="seedusers" method="post" action="">
<table> <table summary="<%= ts('') %>">
<caption><%= ts('') %></caption>
<% for name, l in @params %> <% for name, l in @params %>
<% if l.nil? %> <% if l.nil? %>
</table> </table>
<h3 class="heading"><%=h name %></h3> <h3 class="heading"><%=h name %></h3>
<table> <table summary="<%= ts('') %>">
<caption><%= ts('') %></caption>
<% else %> <% else %>
<% display_name = name %> <% display_name = name %>
<% input_type, default = l[0], l[1] %> <% input_type, default = l[0], l[1] %>
Expand Down

0 comments on commit d57f351

Please sign in to comment.