]> source.dussan.org Git - redmine.git/commitdiff
Rename the save, edit and delete buttons on the query form to clarify the scope ...
authorGo MAEDA <maeda@farend.jp>
Tue, 17 Aug 2021 12:41:58 +0000 (12:41 +0000)
committerGo MAEDA <maeda@farend.jp>
Tue, 17 Aug 2021 12:41:58 +0000 (12:41 +0000)
Patch by Mizuki ISHIKAWA.

git-svn-id: http://svn.redmine.org/redmine/trunk@21191 e93f8b46-1217-0410-a6f0-8f06a7374b81

app/helpers/application_helper.rb
app/views/calendars/show.html.erb
app/views/gantts/show.html.erb
app/views/queries/_query_form.html.erb
config/locales/en.yml
config/locales/ja.yml

index 0618b614d484947a985d77e07a12556ac1ff9e7e..e3c858db4cfc4280663332fe1ae402396dbcaff7 100644 (file)
@@ -1505,14 +1505,14 @@ module ApplicationHelper
     html.html_safe
   end
 
-  def delete_link(url, options={})
+  def delete_link(url, options={}, button_name=l(:button_delete))
     options = {
       :method => :delete,
       :data => {:confirm => l(:text_are_you_sure)},
       :class => 'icon icon-del'
     }.merge(options)
 
-    link_to l(:button_delete), url, options
+    link_to button_name, url, options
   end
 
   def link_to_function(name, function, html_options={})
index 93cd12a2aac97d3e277672ff37405d807fb0effe..cf870116f81dcd73da6690df07162e5812ecd41f 100644 (file)
   <%= link_to_function l(:button_apply), '$("#query_form").submit()', :class => 'icon icon-checked' %>
   <%= link_to l(:button_clear), { :project_id => @project, :set_filter => 1 }, :class => 'icon icon-reload' %>
   <% if @query.new_record? && User.current.allowed_to?(:save_queries, @project, :global => true) %>
-    <%= link_to_function l(:button_save),
+    <%= link_to_function l(:button_save_object, object_name: l(:label_query).downcase),
                          "$('#query_form').attr('action', '#{ @project ? new_project_query_path(@project) : new_query_path }').submit();",
                          :class => 'icon icon-save' %>
   <% end %>
   <% if !@query.new_record? && @query.editable_by?(User.current) %>
-    <%= link_to l(:button_edit), edit_query_path(@query, :calendar => 1), :class => 'icon icon-edit' %>
-    <%= delete_link query_path(@query, :calendar => 1) %>
+    <%= link_to l(:button_edit_object, object_name: l(:label_query).downcase), edit_query_path(@query, :calendar => 1), :class => 'icon icon-edit' %>
+    <%= delete_link query_path(@query, :calendar => 1), {}, l(:button_delete_object, object_name: l(:label_query).downcase) %>
   <% end %>
 </p>
 </div>
index 1321acdd800b0a3a222f043b79e0997f1f0c7e8a..9082d0375964038a70a43e65aa9fd92494303fb6 100644 (file)
   <%= link_to l(:button_clear), { :project_id => @project, :set_filter => 1 },
               :class => 'icon icon-reload' %>
   <% if @query.new_record? && User.current.allowed_to?(:save_queries, @project, :global => true) %>
-    <%= link_to_function l(:button_save),
+    <%= link_to_function l(:button_save_object, object_name: l(:label_query).downcase),
                          "$('#query_form').attr('action', '#{ @project ? new_project_query_path(@project) : new_query_path }').submit();",
                          :class => 'icon icon-save' %>
   <% end %>
 <% if !@query.new_record? && @query.editable_by?(User.current) %>
-  <%= link_to l(:button_edit), edit_query_path(@query, :gantt => 1), :class => 'icon icon-edit' %>
-  <%= delete_link query_path(@query, :gantt => 1) %>
+  <%= link_to l(:button_edit_object, object_name: l(:label_query).downcase), edit_query_path(@query, :gantt => 1), :class => 'icon icon-edit' %>
+  <%= delete_link query_path(@query, :gantt => 1), {}, l(:button_delete_object, object_name: l(:label_query).downcase) %>
 <% end %>
 </p>
 </div>
index bb29827f878b1d7dc7baed8ec4b2586701f05ff3..734e96d7b12b84e1a0cff0ad573952763be94962 100644 (file)
   <%= link_to l(:button_clear), { :set_filter => 1, :sort => '', :project_id => @project }, :class => 'icon icon-reload'  %>
   <% if @query.new_record? %>
     <% if User.current.allowed_to?(:save_queries, @project, :global => true) %>
-      <%= link_to_function l(:button_save),
+      <%= link_to_function l(:button_save_object, object_name: l(:label_query).downcase),
                            "$('#query_type').prop('disabled',false);$('#query_form').attr('action', '#{ @project ? new_project_query_path(@project) : new_query_path }').submit()",
                            :class => 'icon icon-save' %>
     <% end %>
   <% else %>
     <% if @query.editable_by?(User.current) %>
-      <%= link_to l(:button_edit), edit_query_path(@query), :class => 'icon icon-edit' %>
-      <%= delete_link query_path(@query) %>
+      <%= link_to l(:button_edit_object, object_name: l(:label_query).downcase), edit_query_path(@query), :class => 'icon icon-edit' %>
+      <%= delete_link query_path(@query), {}, l(:button_delete_object, object_name: l(:label_query).downcase) %>
     <% end %>
   <% end %>
 </p>
index 90eff9ad34f3556c59b58be197b69ce31923e290..952138bf4e6bc1dab5549bda1182cc6175683a98 100644 (file)
@@ -1182,6 +1182,9 @@ en:
   button_filter: Filter
   button_actions: Actions
   button_add_subtask: Add subtask
+  button_save_object: "Save %{object_name}"
+  button_edit_object: "Edit %{object_name}"
+  button_delete_object: "Delete %{object_name}"
 
   status_active: active
   status_registered: registered
index 29a9bff1a35c06e43259631857aa8ad39e10367c..e5c153d517d6a783d9152f5b2f951ffc969aa1d7 100644 (file)
@@ -867,6 +867,9 @@ ja:
   button_configure: 設定
   button_quote: 引用
   button_show: 表示
+  button_save_object: "%{object_name}を保存"
+  button_edit_object: "%{object_name}を編集"
+  button_delete_object: "%{object_name}を削除"
 
   status_active: 有効
   status_registered: 登録