Download & Extend

Replacing no-search results text

Project:String Overrides
Version:6.x-1.x-dev
Component:Code
Category:support request
Priority:normal
Assigned:Unassigned
Status:active

Issue Summary

Requesting help - I've copied the "no results" (about the smurfs, the customer doesn't want smurfs) text from the t() of the search.module file into the box, cleaned the cache (several times), and still it doesn't get translated. Can somebody let me know what I may be missing or overlooking? I tried replacing another simple t() text ('The following provides a quick and easy way of replacing text.' from the String Overrides screen) - and it worked immediately.

The string I pasted as the original is:

<ul>
<li>Check if your spelling is correct.</li>
<li>Remove quotes around phrases to match each word individually: <em>"blue smurf"</em> will match less than <em>blue smurf</em>.</li>
<li>Consider loosening your query with <em>OR</em>: <em>blue smurf</em> will match less than <em>blue OR smurf</em>.</li>
</ul>

Comments

#1

Version:6.x-1.7» 6.x-1.x-dev

Are you on Windows? It might be the line breaks...

#2

I'm running 6.x-1.7 on Linux and have the same problem. Have cleared my cache several times.

Edit: I'm replacing blue OR smurf with chinese immigration and blue OR smurf with chinese OR immigration

#3

Rob, thanks for your reply, I think you nailed it - I am on Windows, while the backend is run by a Unix. When I view the original file (that I copy from, the t() statement) there are only line-feeds at the end of the lines, yet once I copy and paste this string into the browser (or any editor) there is CR-LF pair at the end of each line. I tried several plain-text editors and browser, and it works like this all the time, so I see no solution on my side.

Would it be possible to change the string-matching routine in the module so that it treats LF and CR-LF as the same? I would really appreciate your help in this!

MarkJ, I don't think you have the same issue - you need to replace the whole t() argument text as found in the search.module file (see the text I posted above), not just the individual words.

#4

@NPC, thanks for the clarification. However, still no luck. I am also using a Windows browser. Will try with linux or OSX later and report back.

#5

You can also address this on the theme layer, if you want to (or while your preferred solution is getting worked out): How to Change "Search Yields no Result Text".

#6

Travis, thank you very much, this solved my problem, and allowed me to avoid installing an additional module! I really hope that the check in the "box" function does not cause much overhead for the other main pages, though...