プロジェクト

全般

プロフィール

Vote #78716

完了

Change the text of the submit button on search page from button_submit to label_search

Admin Redmine さんが約4年前に追加. 約4年前に更新.

ステータス:
Closed
優先度:
通常
担当者:
-
カテゴリ:
Search engine_16
対象バージョン:
開始日:
2022/05/09
期日:
進捗率:

0%

予定工数:
category_id:
16
version_id:
99
issue_org_id:
26620
author_id:
108604
assigned_to_id:
332
comments:
10
status_id:
5
tracker_id:
2
plus1:
0
affected_version:
closed_on:
affected_version_id:
ステータス-->[Closed]

説明

@:button_search@ is more intuitive then @:button_submit@


journals

Where is "button_search" defined?
"button_submit" is defined at source:trunk/config/locales/en.yml@16905#L1030 .
--------------------------------------------------------------------------------
Sorry, I didn't notice that button_search is not defined in core.
I just try to remove maximum of patches from our plugins=).
Problem that button_submit have translations that not always appropriate in some contexts.
In russian it translated as "Принять" and it looks very strange on search page but looks normal on most of other forms.
So I think was good if button_search would be in core too.
--------------------------------------------------------------------------------
Dmitry Lisichkin wrote:
> So I think was good if button_search would be in core too.

Do you think :button_search should be used in only app/views/search/index.html.erb?
In other word, other :button_submit should be kept?
--------------------------------------------------------------------------------

--------------------------------------------------------------------------------
What do you think :button_search should be in English en.yml?
--------------------------------------------------------------------------------
Sorry for long response.
Yes I think button_search should be in en.yaml even with only one usage in view.
IMHO "search"-button on search form is much better then "submit"-button.
--------------------------------------------------------------------------------

--------------------------------------------------------------------------------
Committed. Thank you for improving Redmine.
--------------------------------------------------------------------------------
For me, this change generates "translation missing: en.button_search". Please see the below screenshot.

!{width:70%; border: 1px solid black;}button_search.png!

In the existing locales, we have only "label_search". We can use this one (my option) or we need to add the "button_search" to locales.
<pre><code class="ruby">
diff --git a/app/views/search/index.html.erb b/app/views/search/index.html.erb
index 1e80d57..682c11a 100644
--- a/app/views/search/index.html.erb
+++ b/app/views/search/index.html.erb
@@ -32,7 +32,7 @@
<%= hidden_field_tag 'options', '', :id => 'show-options' %>

</div>
-<p><%= submit_tag l(:button_submit) %></p>
+<p><%= submit_tag l(:button_search) %></p>
<% end %>

<% if @results %>
</code></pre>
--------------------------------------------------------------------------------
Marius BALTEANU wrote:
> For me, this change generates "translation missing: en.button_search". Please see the below screenshot.
>
> !{width:70%; border: 1px solid black;}button_search.png!
>
> In the existing locales, we have only "label_search". We can use this one (my option) or we need to add the "button_search" to locales.

Fixed in r17684. Thanks.

I changed button_search to label_search before committing as I wrote in the commit message, but probably I mistakenly reverted the local change and applied original patch again.
--------------------------------------------------------------------------------

Admin Redmine さんが約4年前に更新

  • カテゴリSearch engine_16 にセット
  • 対象バージョン4.0.0_99 にセット

他の形式にエクスポート: Atom PDF

いいね!0
いいね!0