Siebrand has uploaded a new change for review. https://gerrit.wikimedia.org/r/98550
Change subject: Add PLURAL and GENDER support for some messages ...................................................................... Add PLURAL and GENDER support for some messages Spotted by OsamaK and reported at https://translatewiki.net/wiki/Thread:Support/About_MediaWiki:Ep-timeline-users-edit-article/ar Change-Id: I502906c35d75c24a5429e4b78fd8a2114d571184 --- M EducationProgram.i18n.php M includes/Events/TimelineGroup.php 2 files changed, 26 insertions(+), 14 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/EducationProgram refs/changes/50/98550/1 diff --git a/EducationProgram.i18n.php b/EducationProgram.i18n.php index 2adc93c..c2f125e 100644 --- a/EducationProgram.i18n.php +++ b/EducationProgram.i18n.php @@ -803,18 +803,18 @@ 'ep-timeline-cutoff' => '$1 ...', 'ep-timeline-no-summary' => "''No summary provided''", - 'ep-timeline-users-edit-article' => "$1 edited the article '''[[$2]]'''.", - 'ep-timeline-users-edit-talk' => "$1 left {{PLURAL:$4|a message|messages}} on the '''[[$2|talk page]]''' of '''[[$3]]'''.", - 'ep-timeline-users-edit-user' => "$1 edited the user page of '''[[$2|$3]]'''.", + 'ep-timeline-users-edit-article' => "{{PLURAL:$5|{{GENDER:$6|$1}}|$1}} edited the article '''[[$2]]'''.", + 'ep-timeline-users-edit-talk' => "{{PLURAL:$5|{{GENDER:$6|$1}}|$1}} left {{PLURAL:$4|a message|messages}} on the '''[[$2|talk page]]''' of '''[[$3]]'''.", + 'ep-timeline-users-edit-user' => "{{PLURAL:$5|{{GENDER:$6|$1}}|$1}} edited the user page of '''[[$2|$3]]'''.", 'ep-timeline-users-edit-usertalk' => "'''[[User:$3|$3]]''' received {{PLURAL:$4|a message|messages}} on {{GENDER:$3|his|her|their}} '''[[$2|talk page]]'''.", - 'ep-timeline-users-edit-user-self' => "$1 edited {{GENDER:$3|his|her|their}} '''[[$2|user page]]'''.", + 'ep-timeline-users-edit-user-self' => "{{PLURAL:$5|{{GENDER:$6|$1}}|$1}} edited {{GENDER:$3|his|her|their}} '''[[$2|user page]]'''.", 'ep-timeline-users-edit-usertalk-self' => "'''[[User:$3|$3]]''' posted {{PLURAL:$4|a message|messages}} on {{GENDER:$3|his|her|their}} '''[[$2|talk page]]'''.", - 'ep-timeline-users-create-article' => "$1 created the article '''[[$2]]'''.", - 'ep-timeline-users-create-talk' => "$1 created the '''[[$2|talk page]]''' of '''[[$3]]''' and left {{PLURAL:$4|a message|several messages}} on it.", - 'ep-timeline-users-create-user' => "$1 created the user page of '''[[$2|$3]]'''.", + 'ep-timeline-users-create-article' => "{{GENDER:$6|$1}} created the article '''[[$2]]'''.", + 'ep-timeline-users-create-talk' => "{{GENDER:$6|$1}} created the '''[[$2|talk page]]''' of '''[[$3]]''' and left {{PLURAL:$4|a message|several messages}} on it.", + 'ep-timeline-users-create-user' => "{{GENDER:$6|$1}} created the user page of '''[[$2|$3]]'''.", 'ep-timeline-users-create-usertalk' => "'''[[User:$3|$3]]''' received {{PLURAL:$4|a message|messages}} on {{GENDER:$3|his|her|their}} newly created '''[[$2|talk page]]'''.", - 'ep-timeline-users-create-user-self' => "$1 created {{GENDER:$3|his|her|their}} '''[[$2|user page]]'''.", + 'ep-timeline-users-create-user-self' => "{{GENDER:$6|$1}} created {{GENDER:$3|his|her|their}} '''[[$2|user page]]'''.", 'ep-timeline-users-create-usertalk-self' => "'''[[User:$3|$3]]''' created {{GENDER:$3|his|her|their}} '''[[$2|talk page]]''' and posted {{PLURAL:$4|a message|several messages}} on.", // Dashboard @@ -1913,21 +1913,24 @@ * $2 - the full name of the edited article * $3 - (Unused) the name of the article (without namespace) * $4 - (Unused) the number of events in the group -* $5 - (Unused) the number of editors +* $5 - the number of editors +* $6 - the names of the editors, concatenated (used for gender) {{Related|Ep-timeline-users}}', 'ep-timeline-users-edit-talk' => 'Header for a group of events in a timeline. Parameters: * $1 - html for a user link of list of user links * $2 - the full name of the edited article * $3 - the name of the article (without namespace) * $4 - the number of events in the group -* $5 - (Unused) the number of editors +* $5 - the number of editors +* $6 - the names of the editors, concatenated (used for gender) {{Related|Ep-timeline-users}}', 'ep-timeline-users-edit-user' => 'Header for a group of events in a timeline. Parameters: * $1 - html for a user link of list of user links * $2 - the full name of the edited article * $3 - the name of the article (without namespace) * $4 - (Unused) the number of events in the group -* $5 - (Unused) the number of editors +* $5 - the number of editors +* $6 - the names of the editors, concatenated (used for gender) {{Related|Ep-timeline-users}}', 'ep-timeline-users-edit-usertalk' => '{{doc-singularthey}} Header for a group of events in a timeline. Parameters: @@ -1943,7 +1946,8 @@ * $2 - the full name of the edited article * $3 - the name of the article (without namespace) * $4 - (Unused) the number of events in the group -* $5 - (Unused) the number of editors +* $5 - the number of editors +* $6 - the names of the editors, concatenated (used for gender) {{Related|Ep-timeline-users}}', 'ep-timeline-users-edit-usertalk-self' => '{{doc-singularthey}} Header for a group of events in a timeline. Parameters: @@ -1959,6 +1963,7 @@ * $3 - (Unused) the name of the article (without namespace) * $4 - (Unused) the number of events in the group * $5 - (Unused) the number of editors +* $6 - the names of the editor {{Related|Ep-timeline-users}}', 'ep-timeline-users-create-talk' => 'Header for a group of events in a timeline. Parameters: * $1 - html for a user link of list of user links @@ -1966,6 +1971,7 @@ * $3 - the name of the article (without namespace) * $4 - the number of events in the group * $5 - (Unused) the number of editors +* $6 - the names of the editor {{Related|Ep-timeline-users}}', 'ep-timeline-users-create-user' => 'Header for a group of events in a timeline. Parameters: * $1 - html for a user link of list of user links @@ -1973,6 +1979,7 @@ * $3 - the name of the article (without namespace) * $4 - (Unused) the number of events in the group * $5 - (Unused) the number of editors +* $6 - the names of the editor {{Related|Ep-timeline-users}}', 'ep-timeline-users-create-usertalk' => '{{doc-singularthey}} Header for a group of events in a timeline. Parameters: @@ -1981,6 +1988,7 @@ * $3 - the name of the article (without namespace) * $4 - the number of events in the group * $5 - (Unused) the number of editors +* $6 - the names of the editor {{Related|Ep-timeline-users}}', 'ep-timeline-users-create-user-self' => '{{doc-singularthey}} Header for a group of events in a timeline. Parameters: @@ -1989,6 +1997,7 @@ * $3 - the name of the article (without namespace) * $4 - (Unused) the number of events in the group * $5 - (Unused) the number of editors +* $6 - the names of the editor {{Related|Ep-timeline-users}}', 'ep-timeline-users-create-usertalk-self' => '{{doc-singularthey}} Header for a group of events in a timeline. Parameters: diff --git a/includes/Events/TimelineGroup.php b/includes/Events/TimelineGroup.php index 18728e7..3f99760 100644 --- a/includes/Events/TimelineGroup.php +++ b/includes/Events/TimelineGroup.php @@ -363,9 +363,11 @@ $userIds = array_unique( $userIds ); $userLinks = array(); + $userNames = array(); foreach ( array_slice( $userIds, 0, Settings::get( 'timelineUserLimit' ) ) as $userId ) { - $userLinks[] = '<b>' . Linker::userLink( $userId, User::newFromId( $userId )->getName() ) . '</b>'; + $userNames[$userId] = User::newFromId( $userId )->getName(); + $userLinks[] = '<b>' . Linker::userLink( $userId, $userNames[$userId] ) . '</b>'; } $remainingUsers = count( $userIds ) - count( $userLinks ); @@ -413,7 +415,8 @@ $info['page'], $subjectText, count( $this->events ), - count( $userIds ) + count( $userIds ), + implode( '', $userNames ) )->parse() . '<br />'; } -- To view, visit https://gerrit.wikimedia.org/r/98550 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I502906c35d75c24a5429e4b78fd8a2114d571184 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/EducationProgram Gerrit-Branch: master Gerrit-Owner: Siebrand <[email protected]> _______________________________________________ MediaWiki-commits mailing list [email protected] https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
