jenkins-bot has submitted this change and it was merged. Change subject: Some typo fixes for lang detectors ......................................................................
Some typo fixes for lang detectors Change-Id: I39c9b46eb624f9c4e5e0ccd3367638de8903e668 --- M CirrusSearch.php M composer.json M includes/CirrusSearch.php M includes/LanguageDetector/TextCat.php 4 files changed, 5 insertions(+), 5 deletions(-) Approvals: Cindy-the-browser-test-bot: Looks good to me, but someone else must approve EBernhardson: Looks good to me, approved jenkins-bot: Verified diff --git a/CirrusSearch.php b/CirrusSearch.php index eab7f44..39e821e 100644 --- a/CirrusSearch.php +++ b/CirrusSearch.php @@ -856,7 +856,7 @@ * * CirrusSearch\LanguageDetector\HttpAccept - uses the first language in the * Accept-Language header that is not the current content language. - * CirrusSearch\LanguageDetector\HttpAccept\ElasticSearch - uses the elasticsearch lang-detect plugin + * CirrusSearch\LanguageDetector\ElasticSearch - uses the elasticsearch lang-detect plugin * CirrusSearch\LanguageDetector\TextCat - uses TextCat library */ $wgCirrusSearchLanguageDetectors = array(); diff --git a/composer.json b/composer.json index 09e0773..5d8f3d0 100644 --- a/composer.json +++ b/composer.json @@ -5,6 +5,6 @@ "license" : "GPL-2.0+", "minimum-stability": "dev", "require" : { - "wikimedia/textcat": "1.1.1" + "wikimedia/textcat": "1.1.2" } } diff --git a/includes/CirrusSearch.php b/includes/CirrusSearch.php index cc79e73..e1cf1ed 100644 --- a/includes/CirrusSearch.php +++ b/includes/CirrusSearch.php @@ -161,7 +161,7 @@ } $detector = new $klass(); - if( !( $klass instanceof \CirrusSearch\LanguageDetector\Detector ) ) { + if( !( $detector instanceof \CirrusSearch\LanguageDetector\Detector ) ) { LoggerFactory::getInstance( 'CirrusSearch' )->info( "Bad detector class for {name}: {class}", array( @@ -171,7 +171,7 @@ ); continue; } - $lang = $klass->detect( $this, $term ); + $lang = $detector->detect( $this, $term ); $wiki = self::wikiForLanguage( $lang ); if ( $wiki !== null ) { // it might be more accurate to attach these to the 'next' diff --git a/includes/LanguageDetector/TextCat.php b/includes/LanguageDetector/TextCat.php index 5a13c09..9933e85 100644 --- a/includes/LanguageDetector/TextCat.php +++ b/includes/LanguageDetector/TextCat.php @@ -23,7 +23,7 @@ ); } $textcat = new \TextCat( $wgCirrusSearchTextcatModel ); - $languages = $textcat->classsify(); + $languages = $textcat->classify(); if( !empty( $languages ) ) { // For now, just return the best option // TODO: thing what else we could do -- To view, visit https://gerrit.wikimedia.org/r/270881 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I39c9b46eb624f9c4e5e0ccd3367638de8903e668 Gerrit-PatchSet: 2 Gerrit-Project: mediawiki/extensions/CirrusSearch Gerrit-Branch: master Gerrit-Owner: Smalyshev <smalys...@wikimedia.org> Gerrit-Reviewer: Cindy-the-browser-test-bot <bernhardsone...@gmail.com> Gerrit-Reviewer: DCausse <dcau...@wikimedia.org> Gerrit-Reviewer: EBernhardson <ebernhard...@wikimedia.org> Gerrit-Reviewer: Manybubbles <never...@wikimedia.org> Gerrit-Reviewer: jenkins-bot <> _______________________________________________ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits