r76962 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r76961‎ | r76962 | r76963 >
Date:21:25, 18 November 2010
Author:demon
Status:resolved (Comments)
Tags:
Comment:
Message cleanup for r75408:
* Message now handles a list of authors
* Contains number of rejected edits
* Message now changes based on being top revs or not
Modified paths:
  • /trunk/extensions/FlaggedRevs/forms/RevisionReviewForm.php (modified) (history)
  • /trunk/extensions/FlaggedRevs/language/FlaggedRevs.i18n.php (modified) (history)

Diff [purge]

Index: trunk/extensions/FlaggedRevs/language/FlaggedRevs.i18n.php
@@ -256,7 +256,8 @@
257257 'revreview-reject-summary' => 'Edit summary:',
258258 'revreview-reject-confirm' => 'Reject these changes',
259259 'revreview-reject-cancel' => 'Cancel',
260 - 'revreview-reject-default-summary' => 'Rejected changes by [[User:$1|$1]] to version $2 by [[User:$3|$3]]',
 260+ 'revreview-reject-default-summary-cur' => 'Rejected {{PLURAL:$1|one change|$1 changes}} by $2 to [$3 this version]',
 261+ 'revreview-reject-default-summary' => 'Rejected {{PLURAL:$1|one change|$1 changes}} by $2',
261262
262263 'revreview-reviewlink' => 'pending edits',
263264 'revreview-reviewlink-title' => 'View diff of all pending changes',
@@ -576,6 +577,15 @@
577578 'revreview-lev-quality' => '{{Flagged Revs}}',
578579 'revreview-lev-pristine' => '{{Flagged Revs}}',
579580 'revreview-reject-cancel' => '{{Identical|Cancel}}',
 581+ 'revreview-reject-default-summary-cur' => '{{Flagged Revs-small}}
 582+Default summary shown when rejecting pending changes, and they are the latest revisions to a page
 583+* $1 is the number of rejected revisions
 584+* $2 is the list of (one or more) users who are being rejected
 585+* $3 is the link to the revision being reverted to',
 586+ 'revreview-reject-default-summary' => '{{Flagged Revs-small}}
 587+Default summary shown when rejecting pending changes.
 588+* $1 is the number of rejected revisions
 589+* $2 is the list of (one or more) users who are being rejected',
580590 'revreview-reviewlink' => '{{Flagged Revs}}',
581591 'tooltip-ca-current' => '{{Flagged Revs}}',
582592 'tooltip-ca-stable' => '{{Flagged Revs}}',
@@ -2101,7 +2111,6 @@
21022112 'revreview-reject-summary' => 'Кароткае апісаньне рэдагаваньня:',
21032113 'revreview-reject-confirm' => 'Адмяніць гэтыя зьмены',
21042114 'revreview-reject-cancel' => 'Адмяніць',
2105 - 'revreview-reject-default-summary' => 'Адмененыя зьмены [[User:$1|$1]] да вэрсіі $2 [[User:$3|$3]]',
21062115 'revreview-reviewlink' => 'рэдагаваньні чакаючыя рэцэнзаваньня',
21072116 'revreview-reviewlink-title' => 'Паказаць адрозьненьні усіх нерэцэнзаваных зьменаў',
21082117 'revreview-unreviewedpage' => 'неправераная старонка',
@@ -2572,7 +2581,6 @@
25732582 'revreview-reject-summary' => 'Kemmañ an diverrañ :',
25742583 'revreview-reject-confirm' => "Disteuler ar c'hemmoù-mañ",
25752584 'revreview-reject-cancel' => 'Nullañ',
2576 - 'revreview-reject-default-summary' => "Distaolet eo bet kemmoù [[User:$1|$1]] gant [[User:$3|$3]] evit distreiñ d'ar stumm $2",
25772585 'revreview-reviewlink' => "kemmoù o c'hortoz",
25782586 'revreview-reviewlink-title' => "Gwelet diff an holl kemmoù o c'hortoz",
25792587 'revreview-unreviewedpage' => 'Pajenn nann-gwiriekaet',
@@ -2827,7 +2835,6 @@
28282836 'revreview-reject-summary' => 'Uredi sažetak:',
28292837 'revreview-reject-confirm' => 'Odbij ove izmjene',
28302838 'revreview-reject-cancel' => 'Odustani',
2831 - 'revreview-reject-default-summary' => 'Vraćam promjene od strane korisnika [[User:$1|$1]] na verziju od $2 od korisnika [[User:$3|$3]]',
28322839 'revreview-reviewlink' => 'izmjene na čekanju',
28332840 'revreview-reviewlink-title' => 'Pogledajte promjene svih izmjena na čekanju',
28342841 'revreview-unreviewedpage' => 'neprovjerena stranica',
@@ -3493,7 +3500,6 @@
34943501 'revreview-reject-summary' => 'Zusammenfassung:',
34953502 'revreview-reject-confirm' => 'Diese Änderungen verwerfen',
34963503 'revreview-reject-cancel' => 'Abbrechen',
3497 - 'revreview-reject-default-summary' => 'Änderungen von [[User:$1|$1]] werden auf Version $2 von [[User:$3|$3]] zurückgesetzt',
34983504 'revreview-reviewlink' => 'markieren',
34993505 'revreview-reviewlink-title' => 'Betrachte den Unterschied aller unmarkierten Änderungen',
35003506 'revreview-unreviewedpage' => 'ungesichtete Seite',
@@ -5719,7 +5725,6 @@
57205726 'revreview-reject-summary' => 'Résumé de modification :',
57215727 'revreview-reject-confirm' => 'Rejeter ces changements',
57225728 'revreview-reject-cancel' => 'Annuler',
5723 - 'revreview-reject-default-summary' => 'A rejeté les modifications de [[User:$1|$1]] pour revenir à la version $2 de [[User:$3|$3]]',
57245729 'revreview-reviewlink' => 'modifications en attente',
57255730 'revreview-reviewlink-title' => 'Voir le diff de toutes les modifications en attente',
57265731 'revreview-unreviewedpage' => 'Page non vérifiée',
@@ -6233,7 +6238,6 @@
62346239 'revreview-reject-summary' => 'Resumo de edición:',
62356240 'revreview-reject-confirm' => 'Rexeitar estes cambios',
62366241 'revreview-reject-cancel' => 'Cancelar',
6237 - 'revreview-reject-default-summary' => 'Revertéronse os cambios de [[User:$1|$1]] ata a versión $2 feita por [[User:$3|$3]]',
62386242 'revreview-reviewlink' => 'edicións pendentes',
62396243 'revreview-reviewlink-title' => 'Ollar as diferenzas de todos os cambios pendentes',
62406244 'revreview-unreviewedpage' => 'páxina non comprobada',
@@ -6570,7 +6574,6 @@
65716575 'revreview-reject-summary' => 'Zämmefassig:',
65726576 'revreview-reject-confirm' => 'Die Änderige furtgheje',
65736577 'revreview-reject-cancel' => 'Abbräche',
6574 - 'revreview-reject-default-summary' => 'Änderige vu [[User:$1|$1]] wäre auf d Version $2 vu [[User:$3|$3]] zruckgsetzt',
65756578 'revreview-reviewlink' => 'hängigi Änderige',
65766579 'revreview-reviewlink-title' => 'Alli hängige Änderige aaluege',
65776580 'revreview-unreviewedpage' => 'nit aagluegti Syte',
@@ -6854,7 +6857,6 @@
68556858 'revreview-reject-summary' => 'תקציר העריכה:',
68566859 'revreview-reject-confirm' => 'דחיית שינויים אלו',
68576860 'revreview-reject-cancel' => 'ביטול',
6858 - 'revreview-reject-default-summary' => 'השינויים של [[User:$1|$1]] נדחו לגרסה $2 על ידי [[User:$3|$3]]',
68596861 'revreview-reviewlink' => 'עריכות ממתינות',
68606862 'revreview-reviewlink-title' => 'צפייה ביומן ההבדל של כל השינויים הממתינים',
68616863 'revreview-unreviewedpage' => 'דף לא בדוק',
@@ -7507,7 +7509,6 @@
75087510 'revreview-reject-summary' => 'Zjeće wobdźěłać',
75097511 'revreview-reject-confirm' => 'Tute změny wotpokazać',
75107512 'revreview-reject-cancel' => 'Přetorhnyć',
7511 - 'revreview-reject-default-summary' => 'Změny wot wužiwarja [[User:$1|$1]] su so do wersije $2 wot wužiwarja [[User:$3|$3]] wróćo stajili',
75127513 'revreview-reviewlink' => 'njepřepruwowane změny',
75137514 'revreview-reviewlink-title' => 'Rozdźěl wšěch njepřepruwowanych změnow pokazać',
75147515 'revreview-unreviewedpage' => 'njeskontrolowana strona',
@@ -8021,7 +8022,6 @@
80228023 'revreview-reject-summary' => 'Summario del modification:',
80238024 'revreview-reject-confirm' => 'Rejectar iste modificationes',
80248025 'revreview-reject-cancel' => 'Cancellar',
8025 - 'revreview-reject-default-summary' => 'Rejecta modificationes de [[User:$1|$1]] e reverte al version $2 de [[User:$3|$3]]',
80268026 'revreview-reviewlink' => 'modificationes pendente',
80278027 'revreview-reviewlink-title' => 'Vider comparation de tote le modificationes pendente',
80288028 'revreview-unreviewedpage' => 'pagina non verificate',
@@ -8794,7 +8794,6 @@
87958795 'revreview-reject-summary' => '編集の要約:',
87968796 'revreview-reject-confirm' => 'これらの変更を拒否',
87978797 'revreview-reject-cancel' => '中止',
8798 - 'revreview-reject-default-summary' => '[[User:$1|$1]]による変更を拒否し、[[User:$3|$3]]による$2版にする',
87998798 'revreview-reviewlink' => '査読待ちの編集',
88008799 'revreview-reviewlink-title' => '保留中の変更をすべて差分表示する',
88018800 'revreview-unreviewedpage' => '未確認ページ',
@@ -10127,7 +10126,6 @@
1012810127 'revreview-reject-summary' => 'Resumé änneren',
1012910128 'revreview-reject-confirm' => 'Dës Ännerungen rejetéieren',
1013010129 'revreview-reject-cancel' => 'Ofbriechen',
10131 - 'revreview-reject-default-summary' => "Ännerunge vum [[User:$1|$1]] ginn op d'Versioun $2 vum [[User:$3|$3]] zréckgesat",
1013210130 'revreview-reviewlink' => 'Ännerungen am Suspens',
1013310131 'revreview-reviewlink-title' => 'Ënnerscheed fir all Ännerungen am Suspens weisen',
1013410132 'revreview-unreviewedpage' => 'Net nogekuckte Säit',
@@ -10676,7 +10674,6 @@
1067710675 'revreview-reject-summary' => 'Опис на уредувањето:',
1067810676 'revreview-reject-confirm' => 'Отфрли ги промениве',
1067910677 'revreview-reject-cancel' => 'Откажи',
10680 - 'revreview-reject-default-summary' => 'Отфрлање на промените на [[User:$1|$1]] во верзијата $2 од [[User:$3|$3]]',
1068110678 'revreview-reviewlink' => 'уредувања во исчекување',
1068210679 'revreview-reviewlink-title' => 'Види разлика со сите промени во исчекување',
1068310680 'revreview-unreviewedpage' => 'непроверена страница',
@@ -10928,7 +10925,6 @@
1092910926 'revreview-reject-summary' => 'തിരുത്തലിന്റെ സംഗ്രഹം:',
1093010927 'revreview-reject-confirm' => 'ഈ മാറ്റങ്ങൾ നിരാകരിക്കുക',
1093110928 'revreview-reject-cancel' => 'റദ്ദാക്കുക',
10932 - 'revreview-reject-default-summary' => '[[User:$1|$1]] നടത്തിയ മാറ്റങ്ങൾ നിരാകരിച്ച് [[User:$3|$3]] സൃഷ്ടിച്ച $2 എന്ന പതിപ്പിലോട്ട് സ്ഥാപിക്കുന്നു',
1093310929 'revreview-reviewlink' => 'അവശേഷിക്കുന്ന തിരുത്തലുകൾ',
1093410930 'revreview-reviewlink-title' => 'അവശേഷിക്കുന്ന എല്ലാ മാറ്റങ്ങളും സൃഷ്ടിച്ച വ്യത്യാസം കാണുക',
1093510931 'revreview-unreviewedpage' => 'പരിശോധിക്കപ്പെടാത്ത താൾ',
@@ -11579,7 +11575,6 @@
1158011576 'revreview-reject-summary' => 'Bewerkingssamenvatting:',
1158111577 'revreview-reject-confirm' => 'Deze wijzigingen afkeuren',
1158211578 'revreview-reject-cancel' => 'Annuleren',
11583 - 'revreview-reject-default-summary' => 'Afwijzing van wijzigingen door [[User:$1|$1]] naar versie $2 door [[User:$3|$3]]',
1158411579 'revreview-reviewlink' => 'te controleren bewerkingen',
1158511580 'revreview-reviewlink-title' => 'Alle ongecontroleerde verschillen bekijken',
1158611581 'revreview-unreviewedpage' => 'ongecontroleerde pagina',
@@ -12011,7 +12006,6 @@
1201212007 'revreview-reject-summary' => 'Redigeringssammendrag:',
1201312008 'revreview-reject-confirm' => 'Avvis disse endringene',
1201412009 'revreview-reject-cancel' => 'Avbryt',
12015 - 'revreview-reject-default-summary' => 'Avviser endringer av [[User:$1|$1]] til versjon $2 av [[User:$3|$3]]',
1201612010 'revreview-reviewlink' => 'ventende endringer',
1201712011 'revreview-reviewlink-title' => 'Se diff for alle ventende endringer',
1201812012 'revreview-unreviewedpage' => 'ukontrollert side',
@@ -12509,7 +12503,6 @@
1251012504 'revreview-reject-summary' => 'Opis zmian',
1251112505 'revreview-reject-confirm' => 'Wycofaj te zmiany',
1251212506 'revreview-reject-cancel' => 'Anuluj',
12513 - 'revreview-reject-default-summary' => 'Wycofano zmiany użytkownika [[User:$1|$1]]. Przywrócono wersję $2 autorstwa [[User:$3|$3]].',
1251412507 'revreview-reviewlink' => 'oczekuje na przejrzenie',
1251512508 'revreview-reviewlink-title' => 'Pokaż różnicę dla wszystkich oczekujących zmian',
1251612509 'revreview-unreviewedpage' => 'nieprzejrzana strona',
@@ -12764,7 +12757,6 @@
1276512758 'revreview-reject-summary' => 'Resumé dla modìfica:',
1276612759 'revreview-reject-confirm' => 'Arfuda sti cambi',
1276712760 'revreview-reject-cancel' => 'Scancela',
12768 - 'revreview-reject-default-summary' => 'Cambi arfudà da [[User:$1|$1]] a la vërsion $2 ëd [[User:$3|$3]]',
1276912761 'revreview-reviewlink' => "modìfiche ch'a speto",
1277012762 'revreview-reviewlink-title' => "Vëdde le diferense ëd tùit ij cambiament ch'a speto",
1277112763 'revreview-unreviewedpage' => 'pàgina pa controlà',
@@ -13060,7 +13052,6 @@
1306113053 'revreview-reject-summary' => 'Resumo da edição:',
1306213054 'revreview-reject-confirm' => 'Rejeitar estas mudanças',
1306313055 'revreview-reject-cancel' => 'Cancelar',
13064 - 'revreview-reject-default-summary' => 'A reverter as mudanças de [[User:$1|$1]] para a versão $2 de [[User:$3|$3]]',
1306513056 'revreview-reviewlink' => 'edições pendentes',
1306613057 'revreview-reviewlink-title' => 'Ver diferenças de todas as alterações pendentes',
1306713058 'revreview-unreviewedpage' => 'página não revista',
@@ -13321,7 +13312,6 @@
1332213313 'revreview-reject-summary' => 'Resumo da edição:',
1332313314 'revreview-reject-confirm' => 'Rejeitar estas mudanças',
1332413315 'revreview-reject-cancel' => 'Cancelar',
13325 - 'revreview-reject-default-summary' => 'Revertendo as mudanças de [[User:$1|$1]] para a versão $2 de [[User:$3|$3]]',
1332613316 'revreview-reviewlink' => 'edições pendentes',
1332713317 'revreview-reviewlink-title' => 'Ver diferenças de todas as alterações pendentes',
1332813318 'revreview-unreviewedpage' => 'página não verificada',
@@ -13969,7 +13959,6 @@
1397013960 'revreview-reject-summary' => 'Описание изменений:',
1397113961 'revreview-reject-confirm' => 'Отклонить эти изменения',
1397213962 'revreview-reject-cancel' => 'Отмена',
13973 - 'revreview-reject-default-summary' => 'Отклонены изменения [[User:$1|$1]] в версию $2 [[User:$3|$3]]',
1397413963 'revreview-reviewlink' => 'непроверенные изменения',
1397513964 'revreview-reviewlink-title' => 'Просмотр разницы всех непроверенных изменений',
1397613965 'revreview-unreviewedpage' => 'непроверенная страница',
@@ -14809,7 +14798,6 @@
1481014799 'revreview-reject-summary' => 'Povzetek urejanja:',
1481114800 'revreview-reject-confirm' => 'Zavrni te spremembe',
1481214801 'revreview-reject-cancel' => 'Prekliči',
14813 - 'revreview-reject-default-summary' => 'Zavračanje sprememb [[User:$1|$1]] na različico $2 uporabnika [[User:$3|$3]]',
1481414802 'revreview-reviewlink' => 'urejanja v teku',
1481514803 'revreview-reviewlink-title' => 'Ogled primerjave vseh sprememb v teku',
1481614804 'revreview-unreviewedpage' => 'nepreverjena stran',
@@ -17665,7 +17653,6 @@
1766617654 'revreview-reject-summary' => 'Tóm lược sửa đổi:',
1766717655 'revreview-reject-confirm' => 'Từ chối những thay đổi này',
1766817656 'revreview-reject-cancel' => 'Hủy bỏ',
17669 - 'revreview-reject-default-summary' => 'Đã từ chối thay đổi của [[User:$1|$1]], quay về phiên bản $2 của [[User:$3|$3]]',
1767017657 'revreview-reviewlink' => 'sửa đổi đang chờ',
1767117658 'revreview-reviewlink-title' => 'So sánh các thay đổi đang chờ',
1767217659 'revreview-unreviewedpage' => 'trang chưa xem qua',
Index: trunk/extensions/FlaggedRevs/forms/RevisionReviewForm.php
@@ -1000,16 +1000,20 @@
10011001 $dbr = wfGetDB( DB_SLAVE );
10021002 $oldid = $dbr->addQuotes( $oldRev->getId() );
10031003 $newid = $dbr->addQuotes( $newRev->getId() );
1004 - $res = $dbr->select( 'revision', 'rev_id',
1005 - array( 'rev_id > ' . $oldid, 'rev_id <= ' . $newid,
1006 - 'rev_page' => $oldRev->getPage() ),
 1004+ $res = $dbr->select( 'revision', array( 'rev_id', 'rev_user_text' ),
 1005+ array(
 1006+ 'rev_id > ' . $oldid,
 1007+ 'rev_id <= ' . $newid,
 1008+ 'rev_page' => $oldRev->getPage()
 1009+ ),
10071010 __METHOD__
10081011 );
10091012
1010 - $ids = array();
 1013+ $rejectIds = array();
10111014 if( $res ) {
10121015 foreach( $res as $r ) {
1013 - $ids[] = $r->rev_id;
 1016+ $rejectIds[$r->rev_id] =
 1017+ "[[User:{$r->rev_user_text}|{$r->rev_user_text}]]";
10141018 }
10151019 }
10161020
@@ -1019,7 +1023,8 @@
10201024 // FIXME: we need a generic revision list class
10211025 $spRevDelete = SpecialPage::getPage( 'RevisionReview' );
10221026 $spRevDelete->skin = $this->user->getSkin(); // XXX
1023 - $list = new RevDel_RevisionList( $spRevDelete, $oldRev->getTitle(), $ids );
 1027+ $list = new RevDel_RevisionList( $spRevDelete, $oldRev->getTitle(),
 1028+ array_keys( $rejectIds ) );
10241029 for ( $list->reset(); $list->current(); $list->next() ) {
10251030 $item = $list->current();
10261031 if ( $item->canView() ) {
@@ -1032,11 +1037,20 @@
10331038 $wgOut->addWikiMsg( 'revreview-reject-text-revto',
10341039 $oldRev->getTitle()->getPrefixedDBKey(), $oldRev->getId(),
10351040 $wgLang->timeanddate( $oldRev->getTimestamp(), true ) );
 1041+ $defaultSummary = wfMsg( 'revreview-reject-default-summary-cur',
 1042+ $wgLang->formatNum( count( $rejectIds ) ),
 1043+ $wgLang->listToText( array_values( array_unique( $rejectIds ) ) ),
 1044+ $oldRev->getTitle()->getFullURL(
 1045+ array( 'oldid' => $oldRev->getId() )
 1046+ )
 1047+ );
 1048+ } else {
 1049+ $defaultSummary = wfMsg( 'revreview-reject-default-summary',
 1050+ $wgLang->formatNum( count( $rejectIds ) ),
 1051+ $wgLang->listToText( array_values( array_unique( $rejectIds ) ) )
 1052+ );
10361053 }
10371054 $wgOut->addHtml( '</div>' );
1038 -
1039 - $defaultSummary = wfMsg( 'revreview-reject-default-summary',
1040 - $newRev->getUserText(), $oldRev->getId(), $oldRev->getUserText() );
10411055
10421056 $form = Xml::openElement( 'form',
10431057 array( 'method' => 'POST', 'action' => $thisPage->getFullUrl() )

Follow-up revisions

RevisionCommit summaryAuthorDate
r76969Follow-up r76962: rename message key because content changed too muchraymond21:54, 18 November 2010
r76977Followup r76962:...demon22:06, 18 November 2010
r77007Follow ups for r76962 and r75408:...aaron06:16, 19 November 2010
r77050*More on r76962:...aaron01:30, 20 November 2010

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r75408(bug 25294) "Reject" button confirmation screen in Pending Changedemon02:36, 26 October 2010

Comments

#Comment by 😂 (talk | contribs)   21:27, 18 November 2010

'revreview-reject-default-summary' changed extensively, so I deleted the non-En messages and added some qqq descriptions.

#Comment by Raymond (talk | contribs)   21:41, 18 November 2010

Deleting non-En messages do not help. They would be exported again by Translatewiki script with the next run. Please rename the message key if the content changes extensively as here.

#Comment by Aaron Schulz (talk | contribs)   21:48, 18 November 2010

I'd recommend revreview-reject-default-summary-old. It would be nice not to have names like XXXy and XXX anyway (the later always sounds ambiguous).

#Comment by Raymond (talk | contribs)   22:00, 18 November 2010

Done with r76969.

#Comment by Aaron Schulz (talk | contribs)   21:51, 18 November 2010

(i) The review comment still needs to carry over. (ii) I'd recommend against having the "to this revision" link and instead say "version as of <DATE>", since links take up a lot of the 255 max space and we want to do (i) as well

#Comment by Aaron Schulz (talk | contribs)   22:35, 18 November 2010

Actually clock-offsets complicated this. Just saying the revid might be the best option :/

#Comment by Aaron Schulz (talk | contribs)   22:15, 18 November 2010

Nitpick: array_values & array_unique call order could be flipped to be clearer.

#Comment by 😂 (talk | contribs)   22:16, 18 November 2010

True.

Status & tagging log