<% if @translation_key.tokens? or @translation_key.permutatable? %>
<%=trla("Translation Tokens")%>
<% if @translation_key.translation_tokens? %> <% @translation_key.translation_tokens.each do |token| %> <% if token.decoration? %> <%= link_to_function(token.sanitized_name, "tr8nTranslator.insertDecorationToken('#{token.name}', 'tr8n_translation_label_#{@translation_key.id}');", :title => trla("Click to insert this token above") ) %> <% else %> <%= link_to_function(token.sanitized_name, "tr8nTranslator.insertToken('#{token.name}', 'tr8n_translation_label_#{@translation_key.id}');", :title => trla("Click to insert this token above") ) %> <% end %> <% end %>
<%=trla("Click on a token to insert it into the label")%>
<% end %> <% if @translation_key.data_tokens? and tr8n_current_language.cases.any? %>
<%=link_to_function(trla("Click here if the token values depend on the language cases"), "Tr8n.Effects.hide('cases_trigger'); Tr8n.Effects.blindDown('tr8n_translator_tokens_extended_view');") %>
<% end %> <% if @translation_key.permutatable? %>
<% if @translation_key.translation_tokens? link_label = tra("Click here if this translation depends on any of the token values or the gender of the viewing user") else link_label = tra("Click here if this translation depends on the gender of the viewing user") end %> <%=link_to_function(link_label, "Tr8n.element('has_rules').value='true'; Tr8n.Effects.hide('rules_trigger'); Tr8n.Effects.blindDown('translation_rules');") %>
<% end %>
<% end %>