Vote #78716
完了Change the text of the submit button on search page from button_submit to label_search
0%
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.
--------------------------------------------------------------------------------