Support from Acquia helps fund testing for Drupal Acquia logo

Comments

wavepoint’s picture

The GSA text should already be translatable via the Internationalization module. Or did you want something else?
http://i50.tinypic.com/w86wbn.png

iamEAP’s picture

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.

wavepoint’s picture

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>&quot;bike parking&quot;</em>.'),
        t('Try more general or different keywords.'),
      );
iamEAP’s picture

Status: Active » Needs review
FileSize
9.11 KB

Here'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.

iamEAP’s picture

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.

iamEAP’s picture

Status: Needs review » Needs work

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.

iamEAP’s picture

Status: Needs work » Needs review
FileSize
9.55 KB

Adding list item wrapper, per #6.

  • iamEAP committed 4a9ee19 on 7.x-1.x
    Issue #1702102 by iamEAP: Make error messages configurable
    
iamEAP’s picture

Status: Needs review » Fixed

Status: Fixed » Closed (fixed)

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