<%=trla("Enter {language} Translation:", nil, :language => tr8n_current_language.native_name)%>
<%= f.text_area(:label, :id => "tr8n_translator_translation_label", :class => "keyboardInput", :style=>"padding: 5px 0px; width:100%;") %>
<% if @translation_key.permutatable? %>
<%=link_to_function(trla("generate context rules for this phrase"), "tr8nTranslator.switchTranslatorMode('#{@translation_key.id}', 'dependencies', '#{@source_url}')", :class=>"translation_action") %>
<% end %>
<% if @translation_key.translation_tokens? %>
<%=trla("Translation Tokens")%>
<% @translation_key.translation_tokens.each do |token| %>
<% if token.decoration? %>
<%= link_to_function(token.sanitized_name, "tr8nTranslator.insertDecorationToken('#{token.name}');", :title => trla("Click to insert this token above") ) %>
<% else %>
<%= link_to_function(token.sanitized_name, "tr8nTranslator.insertToken('#{token.name}');", :title => trla("Click to insert this token above") ) %>
<% end %>
<% end %>
<% if tr8n_current_language.cases.any? and @translation_key.data_tokens? %>
<%=link_to_function(trla("Click here if the token values depend on the language cases"), "Tr8n.Effects.hide('tr8n_translator_tokens_simple_view'); Tr8n.Effects.show('tr8n_translator_tokens_extended_view');")%>
<% end %>
<% if tr8n_current_language.cases.any? %>
<%=trla("Data Tokens")%>
<% @translation_key.data_tokens.each do |token| %>
<% next unless token.supports_cases? %>
<% tr8n_current_language.cases.each do |lcase| %>
<%= link_to_function(token.sanitized_name_for_case(lcase.keyword), "tr8nTranslator.insertToken('#{token.name_for_case(lcase.keyword)}');", :title => trla("Click to insert this token above") ) %>
|
<%=lcase.native_name%>
<%=lcase.description%>
|
<% end %>
<% end %>
<% if @translation_key.decoration_tokens? %>
<%=trla("Decoration Tokens")%>
<% @translation_key.decoration_tokens.each do |token| %>
<%= link_to_function(token.sanitized_name, "tr8nTranslator.insertDecorationToken('#{token.name}');", :title => trla("Click to insert this token above") ) %>
<% end %>
<% end %>
<% end %>
<% end %>
<% if Tr8n::Config.enable_google_suggestions? and tr8n_current_language.suggestible? %>
<%=trla("Suggested Translation")%>
<%=image_tag("tr8n/left_quote.png", :style=>"text-align:bottom;padding-bottom:5px;") %>
">
<%=image_tag("tr8n/right_quote.png", :style=>"text-align:bottom;padding-top:5px;") %>
<% sanitized_label = @translation_key.tokenless_label.gsub('"', '\"') %>
<% end %>
<% if Tr8n::Config.enable_glossary_hints? and @translation_key.glossary? %>
<%=trla("Glossary")%>
<% @translation_key.glossary.each do |term| %>
<% border_style = "border-bottom: 1px dotted #ccc;" unless @translation_key.glossary.last == term %>
<%=term.keyword %> |
<%=term.description %> |
<% end %>
<% end %>