<% if @cases.empty? %>
<%=tra("There are no language cases defined for this language.")%> <%=link_to_function(tra("Click here to add language cases."), "addLanguageCase('#{@cases.size}')")%>
<% else %> <% @cases.each_with_index do |lcase, index| %>
<%=tr8n_toggler_tag("language_case_rules_#{index}")%>
<%= lcase.native_name %> <% if lcase.application == 'phrase' %> <%= tra("applied to the entire phrase of the token value") -%> <% else %> <%= tra("applied to every word in the token value") -%> <% end %>
(::<%= lcase.keyword %>) <%= lcase.description %>
<%=tra("Key:", "Language case key")%> <%= text_field_tag("cases[#{index}][keyword]", lcase.keyword, :style => "width:50px;")%> <%=tra("Name:", "Language case name")%> <%= text_field_tag("cases[#{index}][native_name]", lcase.native_name, :style => "width:100px;")%> <%=tra("Description:", "Language case description")%> <%= text_field_tag("cases[#{index}][description]", lcase.description, :style => "width:220px;")%> <%=tra("Application:", "Language case description")%> <%=select_tag("cases[#{index}][application]", tr8n_options_for_select(lcase.class.application_options, lcase.application), :style => "width:120px")%>
<% unless lcase.native_name.blank? %> <%=link_to_function(image_tag("tr8n/pencil.png"), "editLanguageCase('#{index}')", :id => "language_case_edit_link_#{index}")%> <% end %> <%=link_to_function(image_tag("tr8n/delete.png"), "deleteLanguageCase('#{index}')")%>
<%= render(:partial => "edit_language_case_rules", :locals => {:lcase => lcase, :case_index => index}) %>
<% end %>
<%=link_to_function(tra("+ Add Language Case"), "addLanguageCase('#{@cases.size}')")%>
<%=tra("Modifying the case keyword value will invalidate all translated values provided for the case.")%>
<% end %>