Closed (duplicate)
Project:
Drupal core
Version:
8.0.x-dev
Component:
search.module
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Issue tags:
Reporter:
Created:
5 Sep 2009 at 16:46 UTC
Updated:
29 Jul 2014 at 18:27 UTC
Jump to comment: Most recent file
Comments
Comment #1
agentrickardAnd the patch.
Comment #3
agentrickardRevised for changes to HEAD.
Comment #4
joshmillerNever seen this in a patch before?
* search
++++++++++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.
Comment #5
agentrickardFixored. Hello testbot?
Comment #6
joshmillerAs 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
Comment #7
agentrickardI 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...
Comment #8
sunCurrently, 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.
Comment #9
joshmillerEither 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
Comment #10
agentrickardPrecedents in core:
Line 1162 of system.admin.inc. The value for 'Anonymous' is wrapped in t().
Line 1645 of system.admin.inc, the maintenance message:
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.
Comment #11
webchickHm. 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.
Comment #12
agentrickardSometimes 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.
Comment #13
webchickWell, 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.
Comment #14
Crell commented"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.)
Comment #15
sunJust to clarify on the precedents mentioned in #10:
... 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.
Comment #16
jhodgdonNote: 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
Comment #17
jhodgdonActually, #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.