http://www.mediawiki.org/wiki/Special:Code/MediaWiki/64794
Revision: 64794 Author: siebrand Date: 2010-04-09 12:45:08 +0000 (Fri, 09 Apr 2010) Log Message: ----------- * i18n tweaks and FIXMEs * XHTML compliant HTML breaks Modified Paths: -------------- trunk/extensions/SphinxSearch/SphinxSearch.i18n.php trunk/extensions/SphinxSearch/SphinxSearch_body.php Modified: trunk/extensions/SphinxSearch/SphinxSearch.i18n.php =================================================================== --- trunk/extensions/SphinxSearch/SphinxSearch.i18n.php 2010-04-09 12:43:32 UTC (rev 64793) +++ trunk/extensions/SphinxSearch/SphinxSearch.i18n.php 2010-04-09 12:45:08 UTC (rev 64794) @@ -6,8 +6,8 @@ $messages['en'] = array( 'sphinxsearch' => 'Search wiki using Sphinx', 'sphinxsearch-desc' => 'Replaces MediaWiki search engine with [http://www.sphinxsearch.com/ Sphinx]', - 'sphinxSearchInNamespaces' => 'Search in namespaces', - 'sphinxSearchInCategories' => 'Search in categories', + 'sphinxSearchInNamespaces' => 'Search in namespaces:', + 'sphinxSearchInCategories' => 'Search in categories:', 'sphinxExcludeCategories' => 'Categories to exclude', 'sphinxResultPage' => 'Result page', 'sphinxPreviousPage' => 'Previous', @@ -24,8 +24,8 @@ 'sphinxLoading' => 'Loading...', 'sphinxPowered' => 'Powered by %s', 'sphinxClientFailed' => 'Could not instantiate SphinxClient', - 'sphinxSearchFailed' => 'Query failed', - 'sphinxSearchWarning' => 'Warning' + 'sphinxSearchFailed' => 'Query failed:', + 'sphinxSearchWarning' => 'Warning:' ); /** Spanish (EspaƱol) Modified: trunk/extensions/SphinxSearch/SphinxSearch_body.php =================================================================== --- trunk/extensions/SphinxSearch/SphinxSearch_body.php 2010-04-09 12:43:32 UTC (rev 64793) +++ trunk/extensions/SphinxSearch/SphinxSearch_body.php 2010-04-09 12:45:08 UTC (rev 64794) @@ -179,7 +179,7 @@ if ( $cl ) { $res = $cl->Query( addcslashes($this->search_term, '/()[]"!'), $wgSphinxSearch_index_list ); if ( $res === false ) { - $wgOut->addWikiText( wfMsg('sphinxSearchFailed') . ': ' . $cl->GetLastError() . ".\n" ); + $wgOut->addWikiText( wfMsg('sphinxSearchFailed') . wfMsg( 'word-separator' ) . $cl->GetLastError() . ".\n" ); } else { $found = $this->wfSphinxDisplayResults( $term, $res, $cl ); } @@ -367,7 +367,8 @@ global $wgOut, $wgSphinxSuggestMode, $wgSphinxSearch_matches, $wgSphinxSearch_index, $wgSphinxSearch_maxmatches; if ($cl->GetLastWarning()) { - $wgOut->addWikiText(wfMsg('sphinxSearchWarning') . ': ' . $cl->GetLastWarning() . "\n\n"); + // FIXME: should be one message with a parameter + $wgOut->addWikiText(wfMsg('sphinxSearchWarning') . wfMsg( 'word-separator' ) . $cl->GetLastWarning() . "\n\n"); } $found = $res['total_found']; @@ -389,7 +390,8 @@ $term, $res['time'] ); - $wgOut->addWikiText($preamble . ':'); + // FIXME: should be one message with a parameter ending on a colon + $wgOut->addWikiText($preamble . wfMsg( 'colon-separator' ) ); if (is_array($res["words"])) { $warn = false; foreach ($res["words"] as $word => $info) { @@ -553,7 +555,7 @@ $wgOut->addHTML(" <input type='checkbox' name='match_titles' value='1' " . ($wgRequest->getInt('match_titles') ? "checked='checked'" : ""). ">" . wfMsg('sphinxMatchTitles') . "</div>"); # get user settings for which namespaces to search $wgOut->addHTML("<div style='width:30%; border:1px #eee solid; padding:4px; margin-right:1px; float:left;'>"); - $wgOut->addHTML(wfMsg('sphinxSearchInNamespaces') . ':<br/>'); + $wgOut->addHTML(wfMsg('sphinxSearchInNamespaces') . '<br />'); $all_namespaces = self::searchableNamespaces(); foreach( $all_namespaces as $ns => $name ) { $checked = in_array($ns, $this->namespaces) ? ' checked="checked"' : ''; @@ -561,7 +563,7 @@ if('' == $name) { $name = wfMsg('blanknamespace'); } - $wgOut->addHTML("<label><input type='checkbox' value='1' name='ns$ns'$checked />$name</label><br/>"); + $wgOut->addHTML("<label><input type='checkbox' value='1' name='ns$ns'$checked />$name</label><br />"); } $all_categories = self::searchableCategories(); @@ -575,11 +577,11 @@ "<script type='{$wgJsMimeType}' src='".($wgSphinxSearchJSPath ? $wgSphinxSearchJSPath : $wgSphinxSearchExtPath)."/SphinxSearch.js?2'></script>\n" ); $wgOut->addHTML("</div><div style='width:30%; border:1px #eee solid; padding:4px; margin-right:1px; float:left;'>"); - $wgOut->addHTML(wfMsg('sphinxSearchInCategories') . ':'); + $wgOut->addHTML(wfMsg('sphinxSearchInCategories') ); if ($wgUseExcludes) { $wgOut->addHTML("<div style='float:right; font-size:80%;'>exclude</div>"); } - $wgOut->addHTML('<br/>'); + $wgOut->addHTML('<br />'); $wgOut->addHTML($this->getCategoryCheckboxes($all_categories, '', $cat_parents)); } $wgOut->addHTML("</div></form><br clear='both'>"); _______________________________________________ MediaWiki-CVS mailing list MediaWiki-CVS@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-cvs