Skip to content

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also compare across forks.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also compare across forks.
...
  • 5 commits
  • 2 files changed
  • 0 commit comments
  • 2 contributors
View
3 app/controllers/translator/translations_controller.rb
@@ -5,8 +5,7 @@ class TranslationsController < ApplicationController
def index
section = params[:key].present? && params[:key] + '.'
params[:group] = "all" unless params["group"]
- @sections = Translator.keys_for_strings(:group => params[:group])
- .map {|k| k = k.scan(/^[a-z0-9\-_]*\./)[0]; k ? k.gsub('.', '') : false}.select{|k| k}.uniq.sort
+ @sections = Translator.keys_for_strings(:group => params[:group]).map {|k| k = k.scan(/^[a-z0-9\-_]*\./)[0]; k ? k.gsub('.', '') : false}.select{|k| k}.uniq.sort
@keys = Translator.keys_for_strings(:group => params[:group], :filter => section)
if params[:search]
@keys = @keys.select {|k|
View
22 app/views/translator/translations/index.html.erb
@@ -2,13 +2,13 @@
<div id="header">
<h1>Translations</h1>
<ul id="groups">
- <li><%= link_to_unless_current "All", translations_group_path("all"), class: 'button' %></li>
- <li><%= link_to_unless_current "Application", translations_group_path("application"), class: 'button' %></li>
- <li><%= link_to_unless_current "Framework", translations_group_path("framework"), class: 'button' %></li>
- <li><%= link_to_unless_current "Deleted", translations_group_path("deleted"), class: 'button' %></li>
+ <li><%= link_to_unless_current "All", translations_group_path("all"), :class => 'button' %></li>
+ <li><%= link_to_unless_current "Application", translations_group_path("application"), :class => 'button' %></li>
+ <li><%= link_to_unless_current "Framework", translations_group_path("framework"), :class => 'button' %></li>
+ <li><%= link_to_unless_current "Deleted", translations_group_path("deleted"), :class => 'button' %></li>
</ul>
- <%= form_tag translations_group_path(params[:group]), method: "get" do %>
+ <%= form_tag translations_group_path(params[:group]), :method => "get" do %>
<%= label_tag :key, "Filter: " %>
<%= text_field_tag :search, params[:search], :placeholder => "Search for text..." %>
<%= select_tag :key, options_for_select(@sections.collect {|k| [k.humanize, k]}.unshift(["All sections", nil]), params[:key]) %>
@@ -36,12 +36,12 @@
</h2>
<% if params[:group] && params[:group] == 'deleted' %>
- <%= link_to 'destroy', translation_path(id: key.gsub('.','-')),
- remote: true,
- method: :delete,
- confirm: 'Are you sure? This operation is irreversible.',
- class: 'button warning',
- title: 'Clear form database as translation no longer exists in default language file.'
+ <%= link_to 'destroy', translation_path(:id => key.gsub('.','-')),
+ :remote => true,
+ :method => :delete,
+ :confirm => 'Are you sure? This operation is irreversible.',
+ :class => 'button warning',
+ :title => 'Clear form database as translation no longer exists in default language file.'
%>
<% end %>
<% Translator.locales.each do |locale| %>

No commit comments for this range

Something went wrong with that request. Please try again.