This is a follow up for #99370-46: Add a 'reset' button to exposed filters.

This patch allow users to change the label of the Reset button for a customized text.

Comments

merlinofchaos’s picture

[merlin@furor views]$ patch -p0 < views-reset-button-label.patch
patching file plugins/views_plugin_exposed_form.inc
Hunk #1 FAILED at 33.
Hunk #2 FAILED at 45.
Hunk #3 succeeded at 160 (offset 45 lines).
2 out of 3 hunks FAILED -- saving rejects to file plugins/views_plugin_exposed_form.inc.rej
dagmar’s picture

StatusFileSize
new1.87 KB

Relloled

Bilmar’s picture

Patched without a problem and tested changing the 'Reset' name. It showed up in my exposed form with the new name perfectly.

One question:
I was unable to find my new Reset name (example 'ResetMe') in the translation search http://www.example.com/admin/build/translate/search
Is this string currently not translatable or am I forgetting a step? I flushed cache, ran cron, ran updates and refresh strings at http://www.example.com/admin/build/translate/refresh and made sure to search with the case-sensitive name.

Thanks!

dagmar’s picture

Strings are only available to localize once they have been processed by t(). This occurs when you display the view in a non English language.

So, to translate the Reset button text:

1) Save the view.
2) Change to the proper language (i.e: French or Spanish)
3) Display the view using this language.
4) Go to Administer -> Site Building -> Translate interface and search for "Reset"

Hopefully we will fix this odd behaviour when this #357529: Implement translation of customized 'translatable' views properties be ready.

dawehner’s picture

Status: Needs review » Reviewed & tested by the community

Patch is fine, works perfect.

Code looks fine, too.

Bilmar’s picture

thanks dagmar, after following your instructions I was able to find the string for translation.

dagmar’s picture

Issue tags: +views 3.x roadmap, +alpha-2 blocker

tagging

merlinofchaos’s picture

Version: 6.x-3.x-dev » 7.x-3.x-dev
Status: Reviewed & tested by the community » Patch (to be ported)

Committed.

One thing I noticed: Strings are sent through t() that are set 'translatable'. It hink this means we're double t()ing them. Can someone verify?

dawehner’s picture

Yes i think, too, that this will cause it.

dawehner’s picture

Issue tags: -views 3.x roadmap, -alpha-2 blocker

remove tag.

dawehner’s picture

Status: Patch (to be ported) » Fixed

commited together with a simpletest, commited this test also to drupal6

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.