We have to theme alter this a lot in D6, and even the new "bikeshed' text isn't much better. The patch also removes instances of 'bike shed' from the test code, which seemed rather childish.

Comments

agentrickard’s picture

Status: Active » Needs review
StatusFileSize
new611 bytes

And the patch.

Status: Needs review » Needs work

The last submitted patch failed testing.

agentrickard’s picture

Status: Needs work » Needs review
StatusFileSize
new5.92 KB

Revised for changes to HEAD.

joshmiller’s picture

Status: Needs review » Needs work
StatusFileSize
new5.6 KB
+++ modules/search/search.admin.inc	7 Sep 2009 21:21:01 -0000
@@ -161,4 +182,4 @@ function search_admin_settings_submit($f
-}
\ No newline at end of file
+}

Never seen this in a patch before?

+++ modules/search/search.module	7 Sep 2009 21:21:02 -0000
@@ -1144,3 +1140,14 @@ function search_forms() {
+ * Return default text when a searcdh returns no results.

* search

+++ modules/search/search.test	7 Sep 2009 21:21:03 -0000
@@ -204,13 +204,13 @@ class SearchMatchTestCase extends Drupal
-class SearchBikeShed extends DrupalWebTestCase {
+class SearchNoResultsTestCase extends DrupalWebTestCase {
   protected $searching_user;
 
   public static function getInfo() {
     return array(
-      'name' => 'Bike shed',
-      'description' => 'Tests the bike shed text on the no results page.',
+      'name' => 'No results text',
+      'description' => 'Tests the no results text on the search results page.',

++++++++++1

This patch gives search a little more flexibilty. +1

I re-rolled to HEAD, minor changes and then RTBC.

Don't drink and patch.

agentrickard’s picture

Status: Needs work » Needs review
StatusFileSize
new5.97 KB

Fixored. Hello testbot?

joshmiller’s picture

Status: Needs review » Reviewed & tested by the community

As discussed in IRC... RTBC...

Though, Angie / Dries may want some more discussion on Yet Another Configuration. I think this configuration makes a LOT of sense.

Pending tests...

Josh

agentrickard’s picture

I will only say that I asked one of the owners of our company what one patch he wanted before the freeze. And this is what he asked for...

sun’s picture

Status: Reviewed & tested by the community » Needs review

Currently, this is not possible, because Drupal core has no concept of translatable configuration strings - i.e. something like the tt() function of the i18nstrings module.

The effect of wrapping strings in configuration values with t() is that whenever the source value changes, all translations no longer apply to the changed source string - hence, you loose all translated strings.

We badly need to fix this, but apparently, I can't find an issue that is about moving/adding something like tt() to core.

joshmiller’s picture

Status: Needs review » Postponed

Either it needs review or it needs work. This approach is reviewed and tested. Sun suggests an improbable hurdle, which, unfortunately means that this patch just got sidelined to a bigger issue.

That is sad, but the way of Drupal is a long difficult road.

AgentRickard, please feel free to rally more troops. But unless we can address the translation concerns of sun's comment above, I think this issue is postponed.

Or perhaps, can we think of an example text configuration setting that is currently in core? Can't you change the "Read More" text in core? If we can find an example, I would commit this change and then update it when we can figure out the configuration translation issue.

Josh

agentrickard’s picture

Status: Postponed » Reviewed & tested by the community

Precedents in core:

Line 1162 of system.admin.inc. The value for 'Anonymous' is wrapped in t().

    '#default_value' => variable_get('anonymous', t('Anonymous')),

Line 1645 of system.admin.inc, the maintenance message:

    '#default_value' => variable_get('site_offline_message', t('@site is currently under maintenance. We should be back shortly. Thank you for your patience.', array('@site' => variable_get('site_name', 'Drupal')))),

These both indicate that the default value is translatable in code, and can be changed via the UI. The i18n module in contrib handles multiple options for language configuration.

webchick’s picture

Status: Reviewed & tested by the community » Needs review

Hm. I'm not sure I see the need for this, personally. String Overrides module could work just as well. Adding a setting for this sets a precedent for adding other such settings (what to display if there are no front page posts, what to display if there are no items on an administration page, etc.). Handling this through the normal t() function is consistent with other places in core. Also, the bike shed patch was one of my most favourite D7 patches. :)

If there's no other justification than "one of my bosses asked for it," I think this is won't fix from me.

agentrickard’s picture

Sometimes you just run ideas up the flagpole and see what happens. I have little sympathy for this patch, actually, though I would like to remove the Bike Shed stuff from SimpleTest. I know it's an inside joke, but it seems juvenile.

webchick’s picture

Status: Needs review » Closed (won't fix)

Well, our database tests also reference John, Paul, George, and Ringo, and I'm pretty sure we have references to kittens, bananas, and ice cream in our tests, too. Sometimes you really just have to let people make unit testing fun. ;P

If someone from outside the core dev team ends up filing an actual bug report about the juvenileness, I guess we can revisit that that point. But for now, marking "won't fix," as discussed.

Crell’s picture

Version: 7.x-dev » 8.x-dev
Status: Closed (won't fix) » Needs work
Issue tags: +Usability

"The boss asked for it" because most of our clients do not talk about smurfs on their site nor do they sell bikesheds, but they do deal in artwork, or products, or plastic recycling services. It's a usability enhancement for a site to have search help that is in some way relevant to the site. Reactivating to get back to in Drupal 8.

(I personally don't care about the unit test name either way.)

sun’s picture

Just to clarify on the precedents mentioned in #10:

The value for 'Anonymous' is wrapped in t().

    '#default_value' => variable_get('anonymous', t('Anonymous')),

... is no problem, because "Anonymous" is a static string and only the static string is wrapped in t(). If you save a configuration value, then the default value won't be used. But the stored/overridden configuration value won't be localized.

However, given that we already have such fragile and unreliable constructs in core, we might re-consider the decision to defer this to D8.

jhodgdon’s picture

Note: There's another issue that was discussing the same thing, which I just closed as a duplicate of this one. It also has patches/discussion.
#256678: Display search help based on type

jhodgdon’s picture

Status: Needs work » Closed (duplicate)

Actually, #115540: "no results" page not themeable made it so that the no results text is easy now to override in your theme.

I'd say this issue is a duplicate, and that other one is fixed.