Amire80 has uploaded a new change for review.
https://gerrit.wikimedia.org/r/95980
Change subject: Set up GENDER for two messages
......................................................................
Set up GENDER for two messages
mobile-frontend-profile-last-edit already had GENDER support,
but mentioning the parameter in the message prevents warnings
at translatewiki.net.
Change-Id: I75647e3564bcff39d2cc585a792a7ba6dee3a1f7
---
M MobileFrontend.i18n.php
M includes/specials/SpecialUserProfile.php
2 files changed, 8 insertions(+), 4 deletions(-)
git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/MobileFrontend
refs/changes/80/95980/1
diff --git a/MobileFrontend.i18n.php b/MobileFrontend.i18n.php
index f642894..48af646 100644
--- a/MobileFrontend.i18n.php
+++ b/MobileFrontend.i18n.php
@@ -336,7 +336,7 @@
// Special:UserProfile
'mobile-frontend-profile-title' => 'User profile',
- 'mobile-frontend-profile-last-upload-caption' => 'Uploaded
{{PLURAL:$1|yesterday|$1 days ago|0=today}}.',
+ 'mobile-frontend-profile-last-upload-caption' =>
'{{GENDER:$2|Uploaded}} {{PLURAL:$1|yesterday|$1 days ago|0=today}}.',
'mobile-frontend-profile-usertalk' => 'Talk to $1',
'mobile-frontend-profile-noargs' => 'Please provide a username to view
a profile.',
'mobile-frontend-profile-nouser' => 'Non-existent or invalid username',
@@ -345,7 +345,7 @@
'mobile-frontend-profile-userpage-link' => 'Visit user page.',
'mobile-frontend-requires-optin' => 'This page is not available unless
you opt into our beta mode. Visit the [[Special:MobileOptions|settings page]]
to opt in.',
'mobile-frontend-profile-last-thanked' => '{{GENDER:$1|Thanked}} by
[[Special:UserProfile/$1|$1]] for an edit to [[$2]].',
- 'mobile-frontend-profile-last-edit' => 'Edited the page [[$1]],
{{PLURAL:$2|yesterday|$2 days ago|0=earlier today}}.',
+ 'mobile-frontend-profile-last-edit' => '{{GENDER:$3|Edited}} the page
[[$1]], {{PLURAL:$2|yesterday|$2 days ago|0=earlier today}}.',
'mobile-frontend-profile-footer-days' => 'Joined {{PLURAL:$2|1 day|$2
days}} ago with [[Special:Contributions/$1|{{PLURAL:$3|1 edit|$3 edits}}]] and
[[Special:Uploads/$1|{{PLURAL:$4|1 upload|$4 uploads|500=500+ uploads}}]].',
'mobile-frontend-profile-footer-months' => 'Joined over {{PLURAL:$2|1
month|$2 months}} ago with [[Special:Contributions/$1|{{PLURAL:$3|1 edit|$3
edits}}]] and [[Special:Uploads/$1|{{PLURAL:$4|1 upload|$4 uploads|500=500+
uploads}}]].',
'mobile-frontend-profile-footer-years' => 'Joined over {{PLURAL:$2|1
year|$2 years}} ago with [[Special:Contributions/$1|{{PLURAL:$3|1 edit|$3
edits}}]] and [[Special:Uploads/$1|{{PLURAL:$4|1 upload|$4 uploads|500=500+
uploads}}]].',
@@ -923,7 +923,8 @@
{{Identical|User profile}}',
'mobile-frontend-profile-last-upload-caption' => 'Details when an image
was uploaded.
Parameters:
-* $1 - the amount of days ago the image was uploaded',
+* $1 - the amount of days ago the image was uploaded
+* $2 - the user name for GENDER',
'mobile-frontend-profile-usertalk' => 'Link label to user talk page.
Parameters:
diff --git a/includes/specials/SpecialUserProfile.php
b/includes/specials/SpecialUserProfile.php
index 7e25f53..0ce8294 100644
--- a/includes/specials/SpecialUserProfile.php
+++ b/includes/specials/SpecialUserProfile.php
@@ -68,7 +68,10 @@
'alt' => $title->getText(),
) ) .
Html::openElement( 'div', array( 'class' => 'caption' )
) .
- $this->msg(
'mobile-frontend-profile-last-upload-caption' )->numParams( $daysAgo )->parse()
.
+ $this->msg(
'mobile-frontend-profile-last-upload-caption' )
+ ->numParams( $daysAgo ) // $1
+ ->params( $this->targetUser->getName() ) // $2
+ ->parse() .
Html::closeElement( 'div' ) .
Html::closeElement( 'a' ) .
Html::closeElement( 'div' );
--
To view, visit https://gerrit.wikimedia.org/r/95980
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I75647e3564bcff39d2cc585a792a7ba6dee3a1f7
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/MobileFrontend
Gerrit-Branch: master
Gerrit-Owner: Amire80 <[email protected]>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits