Matthias Mullie has uploaded a new change for review. https://gerrit.wikimedia.org/r/56877
Change subject: i18n issues reported on https://translatewiki.net/wiki/User:Mlitn ...................................................................... i18n issues reported on https://translatewiki.net/wiki/User:Mlitn Change-Id: Ied4a4b1aaee8b4b668ad996080570a6c40fb4c81 --- M ArticleFeedbackv5.hooks.php M ArticleFeedbackv5.i18n.php M SpecialArticleFeedbackv5Watchlist.php M api/ApiViewActivityArticleFeedbackv5.php 4 files changed, 34 insertions(+), 17 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/ArticleFeedbackv5 refs/changes/77/56877/1 diff --git a/ArticleFeedbackv5.hooks.php b/ArticleFeedbackv5.hooks.php index d680c57..badbf60 100644 --- a/ArticleFeedbackv5.hooks.php +++ b/ArticleFeedbackv5.hooks.php @@ -410,14 +410,19 @@ $centralPageName = SpecialPageFactory::getLocalNameFor( 'ArticleFeedbackv5', $pageTitle->getPrefixedDBkey() ); $feedbackCentralPageTitle = Title::makeTitle( NS_SPECIAL, $centralPageName, "$record->aft_id" ); - // date - $date = $lang->userTimeAndDate( $record->aft_timestamp, $user ); - $date = Linker::link( - $feedbackTitle, - htmlspecialchars( $date ) - ); - if ( $record->isHidden() || $record->isRequested() || $record->isOversighted() ) { - $date = '<span class="history-deleted">' . $date . '</span>'; + // date & time + $dateFormats = array(); + $dateFormats['timeAndDate'] = $lang->userTimeAndDate( $record->aft_timestamp, $user ); + $dateFormats['date'] = $lang->userDate( $record->aft_timestamp, $user ); + $dateFormats['time'] = $lang->userTime( $record->aft_timestamp, $user ); + foreach ( $dateFormats as $format => &$formattedTime ) { + $formattedTime = Linker::link( + $feedbackTitle, + htmlspecialchars( $formattedTime ) + ); + if ( $record->isHidden() || $record->isRequested() || $record->isOversighted() ) { + $formattedTime = "<span class='history-deleted $format'>" . $formattedTime . '</span>'; + } } // show user names for /newbies as there may be different users. @@ -480,7 +485,7 @@ } $ret = wfMessage( 'articlefeedbackv5-contribs-entry' ) - ->rawParams( $date ) // date + time + ->rawParams( $dateFormats['timeAndDate'] ) // timeanddate ->params( ChangesList::showCharacterDifference( 0, strlen( $record->aft_comment ) ), // chardiff $feedbackCentralPageTitle->getFullText(), // feedback link @@ -491,6 +496,7 @@ $feedback, // comment $status // status ) + ->rawParams( $dateFormats['date'], $dateFormats['time'] ) // date, time ->parse(); $classes[] = 'mw-aft-contribution'; diff --git a/ArticleFeedbackv5.i18n.php b/ArticleFeedbackv5.i18n.php index 445b705..096738b 100644 --- a/ArticleFeedbackv5.i18n.php +++ b/ArticleFeedbackv5.i18n.php @@ -72,7 +72,7 @@ 'articlefeedbackv5-protection-permission-administrator' => 'Enable for administrators only', /* My Contributions */ - 'articlefeedbackv5-contribs-entry' => '$1 . . $2 . . [[$3|Feedback: $4]] $5 $6 $7', + 'articlefeedbackv5-contribs-entry' => '$7 . . $2 . . [[$3|Feedback: $4]] $5 $6 $7', 'articlefeedbackv5-contribs-entry-status' => '. . Status: $1', 'articlefeedbackv5-contribs-status-action-helpful' => 'Helpful', 'articlefeedbackv5-contribs-status-action-flag' => 'Flagged', @@ -795,13 +795,15 @@ 'articlefeedbackv5-protection-permission-editor' => 'Dropdown menu option to enable AFT for editors only', 'articlefeedbackv5-protection-permission-administrator' => 'Dropdown menu option to enable AFT for administrators only', 'articlefeedbackv5-contribs-entry' => 'AFT entry line displayed on My Contributions. An example of this line could be: 10:59, 30 August 2012 . . (+55) . . Feedback: Main Page (This is some more feedback, using the AFT feedback form) . . Status: Helpful and Featured -* $1 - the date with link to feedback permalink - in the example: "10:59, 30 August 2012" +* $1 - the date & time with link to feedback permalink - in the example: "10:59, 30 August 2012" * $2 - the comment character count - in the example: "(+55)" * $3 - the feedback permalink - in the example: the link behind "Feedback: Main Page" * $4 - the page title - in the example: "Main Page" * $5 - the username (only set in the case of newbie log) - not in the example, this will only show up in the newbie log * $6 - the comment - in the example: "(This is some more feedback, using the AFT feedback form)" -* $7 - a list of the feedback\'s current statusses, built out of {{msg-mw|articlefeedbackv5-contribs-entry-status}}, if the status is not empty - in the example: "Status: Helpful and Featured"', +* $7 - a list of the feedback\'s current statusses, built out of {{msg-mw|articlefeedbackv5-contribs-entry-status}}, if the status is not empty - in the example: "Status: Helpful and Featured" +* $8 - the date with link to feedback permalink - in the example: "30 August 2012" +* $9 - the time with link to feedback permalink - in the example: "10:59"', 'articlefeedbackv5-contribs-entry-status' => 'The status part of {{msg-mw|articlefeedbackv5-contribs-entry}}. $1 contains the status and can be any combination of helpful, flagged, featured, resolved, hidden, oversight-requested, deleted', 'articlefeedbackv5-contribs-status-action-helpful' => 'Status when feedback has been marked as helpful', 'articlefeedbackv5-contribs-status-action-flag' => 'Status when feedback has been flagged. @@ -892,7 +894,7 @@ * $4 is the plural support for $3.', 'articlefeedbackv5-special-watchlist-showing' => "Text to show we're at the page containing feedback on watchlisted articles. Parameters: * $1 - a link to the user page -* $2 - a username", +* $2 - a username (incl. gender support)", 'articlefeedbackv5-special-central-watchlist-link' => 'Text to show on the link on the central feedback page to the watchlist-page. $1 is the link', 'articlefeedbackv5-special-watchlist-central-link' => 'Text to show on the link on the watchlist-page to the central feedback page. $1 is the link', 'articlefeedbackv5-updates-since' => 'Number of edits made to this article since this feedback was posted. $1 is the number of edits. Requires plural support', @@ -1823,9 +1825,12 @@ * $2 - link to user page (GENDER '''not''' supported). its text is any one of the following: ** username (for logged-in users) ** IP address (for IP users) -** {{msg-mw|articlefeedbackv5-default-user}} (for magic user)", +** {{msg-mw|articlefeedbackv5-default-user}} (for magic user) +* $3 - user gender support", 'articlefeedbackv5-activity-feedback-date' => 'Post information timestamp template. -* $1 - time and date', +* $1 - time and date, +* $2 - date +* $3 - time', 'articlefeedbackv5-activity-permalink' => '[Permalink] link text. {{Identical|Permalink}}', 'articlefeedbackv5-activity-item-request' => 'Activity log entry when oversight was requested (an oversight request asks an oversighter to delete feedback). diff --git a/SpecialArticleFeedbackv5Watchlist.php b/SpecialArticleFeedbackv5Watchlist.php index 9cbf3ad..fbf7b7a 100644 --- a/SpecialArticleFeedbackv5Watchlist.php +++ b/SpecialArticleFeedbackv5Watchlist.php @@ -82,7 +82,7 @@ array( 'id' => 'articleFeedbackv5-special-watchlist-showing-wrap' ), $this->msg( 'articlefeedbackv5-special-watchlist-showing', $user->getUserPage()->getFullText(), - $user->getName() + $user ) . Html::rawElement( 'span', diff --git a/api/ApiViewActivityArticleFeedbackv5.php b/api/ApiViewActivityArticleFeedbackv5.php index 3452bd4..cfc658f 100644 --- a/api/ApiViewActivityArticleFeedbackv5.php +++ b/api/ApiViewActivityArticleFeedbackv5.php @@ -84,12 +84,18 @@ array(), wfMessage( 'articlefeedbackv5-activity-feedback-info', array( $feedback->aft_id ) ) ->rawParams( ArticleFeedbackv5Utils::getUserLink( $feedback->aft_user, $feedback->aft_user_text ) ) + ->params( $feedback->getUser() ) ->text() ) . Html::element( 'div', array(), - wfMessage( 'articlefeedbackv5-activity-feedback-date', array( $wgLang->timeanddate( $feedback->aft_timestamp ) ) )->text() + wfMessage( 'articlefeedbackv5-activity-feedback-date' ) + ->params( + $wgLang->userTimeAndDate( $feedback->aft_timestamp, $wgUser ), + $wgLang->userDate( $feedback->aft_timestamp, $wgUser ), + $wgLang->userTime( $feedback->aft_timestamp, $wgUser ) + )->text() ) . Html::rawElement( 'div', -- To view, visit https://gerrit.wikimedia.org/r/56877 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ied4a4b1aaee8b4b668ad996080570a6c40fb4c81 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/ArticleFeedbackv5 Gerrit-Branch: master Gerrit-Owner: Matthias Mullie <[email protected]> _______________________________________________ MediaWiki-commits mailing list [email protected] https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
