Jack Phoenix has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/161401

Change subject: "Fixing" the by line and some other stuff
......................................................................

"Fixing" the by line and some other stuff

Due to the i18n changes done in Ic60108036805dd203f51a6d291957fa1323fb3b0
the "by <author name or authors' names>" line wasn't properly showing up
below the blog page title and the "About the Author" box was showing up as
"About the Authors" even when a page had only one author.

This change is more like a hotfix for the immediate problem and is likely
very English-specific. A proper fix would be nice to have.

Change-Id: Ic3933986f2eff3d5516c3c18c7ee1a350351a74f
---
M BlogPage.php
1 file changed, 5 insertions(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/BlogPage 
refs/changes/01/161401/1

diff --git a/BlogPage.php b/BlogPage.php
index a9b8f19..5114812 100644
--- a/BlogPage.php
+++ b/BlogPage.php
@@ -146,7 +146,11 @@
                // similar regex.
                preg_match_all(
                        "/\[\[(?:(?:c|C)ategory|{$categoryName}):\s?" .
-                               wfMessage( 'blog-by-user-category' 
)->inContentLanguage()->escaped() .
+                               // This is an absolutely unholy, horribly hacky 
and otherwise
+                               // less-than-ideal solution that likely works 
for English only
+                               // Someone needs to come up with a better 
solution one of these
+                               // days than this regex soup...
+                               str_replace( ' $1', '', wfMessage( 
'blog-by-user-category' )->inContentLanguage()->escaped() ) .
                        " (.*)\]\]/",
                        $articleText,
                        $matches

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ic3933986f2eff3d5516c3c18c7ee1a350351a74f
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/BlogPage
Gerrit-Branch: master
Gerrit-Owner: Jack Phoenix <[email protected]>

_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to