Foxtrott has submitted this change and it was merged.

Change subject: Unstrip strip items of 'general' category before lingo-parsing
......................................................................


Unstrip strip items of 'general' category before lingo-parsing

The unstripping will be done again by the MW parser when the hook used by Lingo 
returns, but it should not hurt to do this twice.
The only problem is with other hook handlers that might not expect strip items 
to be unstripped already.

Bug 55829

Change-Id: I422650da84c07122451e19bf3424ad14f55d07af
---
M LingoHooks.php
1 file changed, 7 insertions(+), 2 deletions(-)

Approvals:
  Foxtrott: Verified; Looks good to me, approved



diff --git a/LingoHooks.php b/LingoHooks.php
index 06c287a..57942f2 100644
--- a/LingoHooks.php
+++ b/LingoHooks.php
@@ -37,10 +37,15 @@
                if ( !isset( $parser->mDoubleUnderscores['noglossary'] ) && // 
__NOGLOSSARY__ not present and
                        (
                        !$title || // title not set or
-                       !isset( $wgexLingoUseNamespaces[$title->getNamespace()] 
) || // namespace not explicitly forbidden or
+                       !isset( $wgexLingoUseNamespaces[ $title->getNamespace() 
] ) || // namespace not explicitly forbidden (i.e. not in list of namespaces 
and set to false) or
                        $wgexLingoUseNamespaces[$title->getNamespace()] // 
namespace explicitly allowed
                        )
-               ) { 
+               ) {
+
+                       // unstrip strip items of the 'general' group
+                       // this will be done again by parse when this hook 
returns, but it should not hurt to do this twice
+                       // Only problem is with other hook handlers that might 
not expect strip items to be unstripped already
+                       $text = $parser->mStripState->unstripGeneral( $text );
                        LingoParser::parse( $parser, $text );
                }
 

-- 
To view, visit https://gerrit.wikimedia.org/r/133898
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: I422650da84c07122451e19bf3424ad14f55d07af
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Lingo
Gerrit-Branch: master
Gerrit-Owner: Foxtrott <s7ep...@gmail.com>
Gerrit-Reviewer: Foxtrott <s7ep...@gmail.com>
Gerrit-Reviewer: jenkins-bot <>

_______________________________________________
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to