MegaAlex has uploaded a new change for review.

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


Change subject: i18n: Supply date/time parameters to wikiforum-edited and 
wikiforum-posted
......................................................................

i18n: Supply date/time parameters to wikiforum-edited and wikiforum-posted

Spotted by Purodha:
* 
https://translatewiki.net/wiki/Thread:Support/GENDER_support_and_date_and_time_parameters_needed

Change-Id: I405cf7fa3fadbc71b6cf2a4f1782c2ef8be0c226
---
M WikiForum.i18n.php
M WikiForumClass.php
M WikiForumHooks.php
3 files changed, 46 insertions(+), 14 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/WikiForum 
refs/changes/14/104014/1

diff --git a/WikiForum.i18n.php b/WikiForum.i18n.php
index 36bd10b..c8ba266 100644
--- a/WikiForum.i18n.php
+++ b/WikiForum.i18n.php
@@ -214,12 +214,16 @@
 * $1 - a timestamp
 * $2 - a link to a user page with username as link description
 * $3 - a plain text username used for GENDER
+* $4 - (Optional) a date
+* $5 - (Optional) a time
 See also:
 * {{msg-mw|Wikiforum-edited}}',
        'wikiforum-edited' => 'Indicates a thread (or a reply) has been edited. 
Parameters:
 * $1 - a timestamp
 * $2 - a link to a user page with username as link description
 * $3 - a plain text username used for GENDER
+* $4 - (Optional) a date
+* $5 - (Optional) a time
 See also:
 * {{msg-mw|Wikiforum-posted}}',
        'wikiforum-cat-not-found' => 'Used as heading of error message',
diff --git a/WikiForumClass.php b/WikiForumClass.php
index 6cdad4c..1d596bb 100644
--- a/WikiForumClass.php
+++ b/WikiForumClass.php
@@ -1532,7 +1532,9 @@
                                                                
$thread->wft_user_text,
                                                                
$thread->wft_user_ip
                                                        ),
-                                                       $thread->wft_user_text
+                                                       $thread->wft_user_text,
+                                                       $wgLang->date( 
$thread->wft_posted_timestamp ),
+                                                       $wgLang->time( 
$thread->wft_posted_timestamp )
                                                )->text() . '</p></p>',
                                        $thread->wft_reply_count,
                                        $thread->wft_view_count,
@@ -1707,7 +1709,9 @@
                                        $data_overview->wft_user_text,
                                        $data_overview->wft_user_ip
                                ),
-                               $data_overview->wft_user_text
+                               $data_overview->wft_user_text,
+                               $wgLang->date( 
$data_overview->wft_posted_timestamp ),
+                               $wgLang->time( 
$data_overview->wft_posted_timestamp )
                        )->text();
                        if ( $data_overview->wft_edit_timestamp > 0 ) {
                                $posted .= '<br /><i>' .
@@ -1719,7 +1723,9 @@
                                                        
$data_overview->wft_edit_user_text,
                                                        
$data_overview->wft_edit_user_ip
                                                ),
-                                               
$data_overview->wft_edit_user_text
+                                               
$data_overview->wft_edit_user_text,
+                                               $wgLang->date( 
$data_overview->wft_edit_timestamp ),
+                                               $wgLang->time( 
$data_overview->wft_edit_timestamp )
                                        )->text() . '</i>';
                        }
 
@@ -1762,7 +1768,9 @@
                                                $reply->wfr_user_text,
                                                $reply->wfr_user_ip
                                        ),
-                                       $reply->user_name
+                                       $reply->user_name,
+                                       $wgLang->date( 
$reply->wfr_posted_timestamp ),
+                                       $wgLang->time( 
$reply->wfr_posted_timestamp )
                                )->text();
                                if ( $reply->wfr_edit_timestamp > 0 ) {
                                        $posted .= '<br /><i>' .
@@ -1774,7 +1782,9 @@
                                                                
$reply->wfr_edit_user_text,
                                                                
$reply->wfr_edit_user_ip
                                                        ),
-                                                       
$reply->wfr_edit_user_text
+                                                       
$reply->wfr_edit_user_text,
+                                                       $wgLang->date( 
$reply->wfr_edit_timestamp ),
+                                                       $wgLang->time( 
$reply->wfr_edit_timestamp )
                                                )->text() . '</i>';
                                }
 
@@ -1903,7 +1913,9 @@
                                                $result->wfr_user_text,
                                                $result->wfr_user_ip
                                        ),
-                                       $result->wfr_user_text
+                                       $result->wfr_user_text,
+                                       $wgLang->date( 
$result->wfr_posted_timestamp ),
+                                       $wgLang->time( 
$result->wfr_posted_timestamp )
                                )->text() . '<br />' . wfMessage(
                                                'wikiforum-search-thread',
                                                '<a href="' . $url . $anchor . 
'">' .
@@ -1949,7 +1961,9 @@
                        'wikiforum-posted',
                        $wgLang->timeanddate( wfTimestampNow() ),
                        WikiForumClass::getUserLink( $wgUser->getId(), 
$wgUser->getName(), $wgRequest->getIP() ),
-                       $wgUser->getName()
+                       $wgUser->getName(),
+                       $wgLang->date( wfTimestampNow() ),
+                       $wgLang->time( wfTimestampNow() )
                )->text();
                if ( $type == 'addcomment' || $type == 'editcomment' ) {
                        $output .= WikiForumGui::getReplyHeader( $title );
@@ -2180,7 +2194,9 @@
                                                // <a 
href="/wiki/Project:Administrators">administrator</a>)
                                                // which is *not* what we want
                                                $reply->user_name,
-                                               $reply->user_name
+                                               $reply->user_name,
+                                               $wgLang->date( 
$reply->wfr_posted_timestamp ),
+                                               $wgLang->time( 
$reply->wfr_posted_timestamp )
                                        )->text();
                                        $text_prev = '[quote=' . $posted . ']' .
                                                $reply->wfr_reply_text . 
'[/quote]';
@@ -2200,7 +2216,9 @@
                                                $wgLang->timeanddate( 
$thread->wft_posted_timestamp ),
                                                // see the explanation above
                                                $thread->user_name,
-                                               $thread->user_name
+                                               $thread->user_name,
+                                               $wgLang->date( 
$thread->wft_posted_timestamp ),
+                                               $wgLang->time( 
$thread->wft_posted_timestamp )
                                        )->text();
                                        $text_prev = '[quote=' . $posted . ']' .
                                                $thread->wft_text . '[/quote]';
diff --git a/WikiForumHooks.php b/WikiForumHooks.php
index 9e97e61..5ba939d 100644
--- a/WikiForumHooks.php
+++ b/WikiForumHooks.php
@@ -147,7 +147,9 @@
                                        'wikiforum-posted',
                                        $wgLang->timeanddate( 
$thread->wft_posted_timestamp ),
                                        WikiForumClass::getUserLink( 
$thread->user_name ),
-                                       $thread->user_name
+                                       $thread->user_name,
+                                       $wgLang->date( 
$thread->wft_posted_timestamp ),
+                                       $wgLang->time( 
$thread->wft_posted_timestamp )
                                )->text() . '<br />' .
                                wfMessage( 'wikiforum-forum', $categoryLink, 
$forumLink )->text() .
                                '</p></p>',
@@ -201,7 +203,9 @@
                                        'wikiforum-posted',
                                        $wgLang->timeanddate( 
$overview->wft_posted_timestamp ),
                                        WikiForumClass::getUserLink( 
$overview->user_name ),
-                                       $overview->user_name
+                                       $overview->user_name,
+                                       $wgLang->date( 
$overview->wft_posted_timestamp ),
+                                       $wgLang->time( 
$overview->wft_posted_timestamp )
                                )->text();
                                if ( $overview->wft_edit_timestamp > 0 ) {
                                        $posted .= '<br /><i>' .
@@ -209,7 +213,9 @@
                                                        'wikiforum-edited',
                                                        $wgLang->timeanddate( 
$overview->wft_edit_timestamp ),
                                                        
WikiForumClass::getUserLinkById( $overview->wft_edit_user ),
-                                                       
$overview->wft_edit_user_text
+                                                       
$overview->wft_edit_user_text,
+                                                       $wgLang->date( 
$overview->wft_edit_timestamp ),
+                                                       $wgLang->time( 
$overview->wft_edit_timestamp )
                                                )->text() . '</i>';
                                }
 
@@ -248,7 +254,9 @@
                                                        'wikiforum-posted',
                                                        $wgLang->timeanddate( 
$reply->wfr_posted_timestamp ),
                                                        
WikiForumClass::getUserLink( $reply->user_name ),
-                                                       $reply->user_name
+                                                       $reply->user_name,
+                                                       $wgLang->date( 
$reply->wfr_posted_timestamp ),
+                                                       $wgLang->time( 
$reply->wfr_posted_timestamp )
                                                )->text();
                                                if ( $reply->wfr_edit > 0 ) {
                                                        $posted .= '<br /><i>' .
@@ -256,7 +264,9 @@
                                                                        
'wikiforum-edited',
                                                                        
$wgLang->timeanddate( $reply->wfr_edit ),
                                                                        
WikiForumClass::getUserLinkById( $reply->wfr_edit_user ),
-                                                                       
$reply->wfr_edit_user_text
+                                                                       
$reply->wfr_edit_user_text,
+                                                                       
$wgLang->date( $reply->wfr_edit ),
+                                                                       
$wgLang->time( $reply->wfr_edit )
                                                                )->text() . 
'</i>';
                                                }
                                                $output .= 
WikiForumGui::getReply(

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I405cf7fa3fadbc71b6cf2a4f1782c2ef8be0c226
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/WikiForum
Gerrit-Branch: master
Gerrit-Owner: MegaAlex <alexivano...@gmail.com>

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

Reply via email to