Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
The idea is to add a fieldset where admins can supply their own error (and other) messages. Also need to be able to translate these user-supplied strings.
Ah agreed, its buried within the module, they are set to translatable.
Line 47 of google_appliance.module
//@TODO: perhaps error messages should be configurable
case 'google_appliance#error_gsa_no_results':
$no_results_tactics = array(
t('Check if your spelling is correct.'),
t('Remove quotes around phrases: <em>bike parking</em> will often show more results than <em>"bike parking"</em>.'),
t('Try more general or different keywords.'),
);
Note this patch touches code which that patch also touches, so we'll need to re-factor this or that, depending on the commit order. Nothing major, though.
Here's a re-roll of #4 against latest 7.x-1.x dev. Criteria for passing will be that text/markup does not change between current released module vs. this patch on a fresh install.
In reviewing, looks like the no results found needs to include a div wrapper like so...
<div class="item-list">
<ul>...</ul>
</div>
The markup for the "unable to connect to search service" error message is missing a link to a contact page, but unless the contact module is installed, the link is actually broken... I feel fine leaving it out.
Will address these tomorrow; moving back to needs work.
Comments
Comment #1
wavepoint CreditAttribution: wavepoint commentedThe GSA text should already be translatable via the Internationalization module. Or did you want something else?
http://i50.tinypic.com/w86wbn.png
Comment #2
iamEAP CreditAttribution: iamEAP commentedThe idea is to add a fieldset where admins can supply their own error (and other) messages. Also need to be able to translate these user-supplied strings.
Comment #3
wavepoint CreditAttribution: wavepoint commentedAh agreed, its buried within the module, they are set to translatable.
Line 47 of google_appliance.module
Comment #4
iamEAP CreditAttribution: iamEAP commentedHere's a patch to variable-ize the error messages. Looks like we'll get variable translation with #1929708: admin settings form cannot save updated value when using i18n variables .
Note this patch touches code which that patch also touches, so we'll need to re-factor this or that, depending on the commit order. Nothing major, though.
Comment #5
iamEAP CreditAttribution: iamEAP commentedHere's a re-roll of #4 against latest 7.x-1.x dev. Criteria for passing will be that text/markup does not change between current released module vs. this patch on a fresh install.
Comment #6
iamEAP CreditAttribution: iamEAP commentedIn reviewing, looks like the no results found needs to include a div wrapper like so...
The markup for the "unable to connect to search service" error message is missing a link to a contact page, but unless the contact module is installed, the link is actually broken... I feel fine leaving it out.
Will address these tomorrow; moving back to needs work.
Comment #7
iamEAP CreditAttribution: iamEAP commentedAdding list item wrapper, per #6.
Comment #9
iamEAP CreditAttribution: iamEAP commented