r76495 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r76494‎ | r76495 | r76496 >
Date:03:42, 11 November 2010
Author:tomasz
Status:ok
Tags:
Comment:
Merging in 76333, 76347, 76351, 76356, 76356, 76357, 76358, 76361, 76363 and 76462
Modified paths:
  • /branches/wmf/1.16wmf4/extensions/CentralNotice (modified) (history)
  • /branches/wmf/1.16wmf4/extensions/CentralNotice/CentralNotice.db.php (modified) (history)
  • /branches/wmf/1.16wmf4/extensions/CentralNotice/CentralNotice.i18n.php (modified) (history)
  • /branches/wmf/1.16wmf4/extensions/CentralNotice/CentralNotice.php (modified) (history)
  • /branches/wmf/1.16wmf4/extensions/CentralNotice/SpecialBannerListLoader.php (modified) (history)
  • /branches/wmf/1.16wmf4/extensions/CentralNotice/SpecialCentralNotice.php (modified) (history)
  • /branches/wmf/1.16wmf4/extensions/CentralNotice/centralnotice.js (modified) (history)
  • /branches/wmf/1.16wmf4/extensions/CentralNotice/newCentralNotice.js (deleted) (history)
  • /branches/wmf/1.16wmf4/extensions/CentralNotice/patches/patch-notice_languages.sql (modified) (history)

Diff [purge]

Index: branches/wmf/1.16wmf4/extensions/CentralNotice/newCentralNotice.js
@@ -1,102 +0,0 @@
2 -/*
3 - * New Central Notice Javascript
4 - *
5 - * Mostly stubbed functionallity for central notice improvements
6 - * May or may not be used, definitely will be changed.
7 - * More of a sketch of what we think needs to be done.
8 - */
9 -( function( $ ) {
10 - $.centralNotice = {
11 - 'data': {
12 - 'getVars': {}
13 - },
14 - 'fn': {
15 - 'loadBanner': function( bannerName ) {
16 - // get the requested banner
17 - var bannerPage = 'Special:BannerLoader?banner='+bannerName+'&userlang='+wgContentLanguage+'&sitename='+wgNoticeProject;
18 - var bannerURL = wgArticlePath.replace( '$1', bannerPage );
19 - var request = $.ajax( {
20 - url: bannerURL,
21 - dataType: 'html',
22 - success: function( data ) {
23 - $.centralNotice.fn.displayBanner( data );
24 - }
25 - });
26 - },
27 - 'loadBannerList': function( timestamp ) {
28 - var bannerListURL;
29 - if ( timestamp ) {
30 - bannerListURL = "TBD"
31 - } else {
32 - // http://geoiplookup.wikimedia.org/
33 - var geoLocation = 'US'; // Hard-coding for now
34 - var bannerListPage = 'Special:BannerListLoader?language='+wgContentLanguage+'&project='+wgNoticeProject+'&location='+geoLocation;
35 - bannerListURL = wgArticlePath.replace( '$1', bannerListPage );
36 - }
37 - var request = $.ajax( {
38 - url: bannerListURL,
39 - dataType: 'json',
40 - success: $.centralNotice.fn.chooseBanner
41 - } );
42 - },
43 - 'chooseBanner': function( bannerList ) {
44 - // convert the json object to a true array
45 - bannerList = Array.prototype.slice.call( bannerList );
46 -
47 - // Make sure there are some banners to choose from
48 - if ( bannerList.length == 0 ) return false;
49 -
50 - var totalWeight = 0;
51 - // run through the bannerlist and sum the weights of all banners
52 - for( var i = 0; i < bannerList.length; i++ ) {
53 - totalWeight += bannerList[i].weight;
54 - }
55 -
56 - // select a random integer between 0 and our total weight
57 - var pointer = Math.floor( Math.random() * totalWeight ),
58 - selectedBanner = bannerList[0],
59 - w = 0;
60 - // run through the banner list and start accumulating weights
61 - for( var i = 0; i < bannerList.length; i++ ) {
62 - w += bannerList[i].weight;
63 - // when the weight tally exceeds the random integer, return the banner and stop the loop
64 - if( w > pointer ) {
65 - selectedBanner = bannerList[i];
66 - break;
67 - }
68 - }
69 - // return our selected banner
70 - $.centralNotice.fn.loadBanner(
71 - selectedBanner.name
72 - );
73 - },
74 - 'displayBanner': function( bannerHTML ) {
75 - // inject the banner html into the page
76 - $( '#siteNotice' )
77 - .prepend( '<div id="centralnotice" class="' + ( wgNoticeToggleState ? 'expanded' : 'collapsed' ) + '">' + bannerHTML + '</div>' );
78 - },
79 - 'getQueryStringVariables': function() {
80 - document.location.search.replace( /\??(?:([^=]+)=([^&]*)&?)/g, function () {
81 - function decode( s ) {
82 - return decodeURIComponent( s.split( "+" ).join( " " ) );
83 - }
84 - $.centralNotice.data.getVars[decode( arguments[1] )] = decode( arguments[2] );
85 - } );
86 - }
87 - }
88 - }
89 - $( document ).ready( function () {
90 - // initialize the query string vars
91 - $.centralNotice.fn.getQueryStringVariables();
92 - if( $.centralNotice.data.getVars['forceBanner'] ) {
93 - // if we're forcing one banner
94 - $.centralNotice.fn.loadBanner( $.centralNotice.data.getVars['forceBanner'] );
95 - } else if ( $.centralNotice.data.getVars['forceTimestamp'] ) {
96 - // if we're forcing a future campaign time
97 - $.centralNotice.fn.loadBannerList( $.centralNotice.data.getVars['forceTimestamp'] );
98 - } else {
99 - // look for banners ready to go NOW
100 - $.centralNotice.fn.loadBannerList( );
101 - }
102 - } ); //document ready
103 -} )( jQuery );
Index: branches/wmf/1.16wmf4/extensions/CentralNotice/SpecialBannerListLoader.php
@@ -56,32 +56,18 @@
5757 * Generate JSON for the specified site
5858 */
5959 function getJsonList() {
60 -
61 - // Quick short circuit to be able to show preferred notices
6260 $templates = array();
63 -
64 - if ( $this->language == 'en' && $this->project != null ) {
65 - // See if we have any preferred notices for all of en
66 - $notices = CentralNoticeDB::getNotices( null, 'en', null, 1, 1, $this->location );
67 -
68 - if ( $notices ) {
69 - // Pull banners
70 - $templates = CentralNoticeDB::selectTemplatesAssigned( $notices );
71 - }
 61+
 62+ // See if we have any preferred campaigns for this language and project
 63+ $notices = CentralNoticeDB::getNotices( $this->project, $this->language, null, 1, 1, $this->location );
 64+
 65+ // Quick short circuit to show preferred campaigns
 66+ if ( $notices ) {
 67+ // Pull banners
 68+ $templates = CentralNoticeDB::selectTemplatesAssigned( $notices );
7269 }
7370
74 - if ( !$templates && $this->project == 'wikipedia' ) {
75 - // See if we have any preferred notices for this language wikipedia
76 - $notices = CentralNoticeDB::getNotices( 'wikipedia', $this->language,
77 - false, 1, 1, $this->location );
78 -
79 - if ( $notices ) {
80 - // Pull banners
81 - $templates = CentralNoticeDB::selectTemplatesAssigned( $notices );
82 - }
83 - }
84 -
85 - // Didn't find any preferred matches so do an old style lookup
 71+ // Didn't find any preferred banners so do an old style lookup
8672 if ( !$templates ) {
8773 $templates = CentralNotice::selectNoticeTemplates(
8874 $this->project, $this->language, $this->location );
Index: branches/wmf/1.16wmf4/extensions/CentralNotice/CentralNotice.php
@@ -20,6 +20,7 @@
2121 'commons',
2222 'meta',
2323 'wikispecies',
 24+ 'test'
2425 );
2526
2627 // Enable the notice-hosting infrastructure on this wiki...
@@ -133,6 +134,8 @@
134135 $base . '/patches/patch-template_settings.sql' );
135136 $wgExtNewTables[] = array( 'cn_notice_countries',
136137 $base . '/patches/patch-notice_countries.sql' );
 138+ $wgExtNewTables[] = array( 'cn_notice_projects',
 139+ $base . '/patches/patch-notice_projects.sql' );
137140 }
138141 } else {
139142 if ( $updater->getDB()->getType() == 'mysql' ) {
@@ -146,6 +149,8 @@
147150 $base . '/patches/patch-template_settings.sql' ) );
148151 $updater->addExtensionUpdate( array( 'addTable', 'cn_notice_countries',
149152 $base . '/patches/patch-notice_countries.sql' ) );
 153+ $updater->addExtensionUpdate( array( 'addTable', 'cn_notice_projects',
 154+ $base . '/patches/patch-notice_projects.sql' ) );
150155 }
151156 }
152157 return true;
Index: branches/wmf/1.16wmf4/extensions/CentralNotice/SpecialCentralNotice.php
@@ -140,14 +140,14 @@
141141 if ( $method == 'addNotice' ) {
142142 $noticeName = $wgRequest->getVal( 'noticeName' );
143143 $start = $wgRequest->getArray( 'start' );
144 - $project_name = $wgRequest->getVal( 'project_name' );
 144+ $projects = $wgRequest->getArray( 'projects' );
145145 $project_languages = $wgRequest->getArray( 'project_languages' );
146146 $geotargeted = $wgRequest->getCheck( 'geotargeted' );
147147 $geo_countries = $wgRequest->getArray( 'geo_countries' );
148148 if ( $noticeName == '' ) {
149149 $this->showError( 'centralnotice-null-string' );
150150 } else {
151 - $this->addNotice( $noticeName, '0', $start, $project_name,
 151+ $this->addNotice( $noticeName, '0', $start, $projects,
152152 $project_languages, $geotargeted, $geo_countries );
153153 }
154154 }
@@ -282,10 +282,10 @@
283283 }
284284
285285 /**
286 - * Print out all campaigns found in db
 286+ * Show all campaigns found in the database, show "Add a campaign" form
287287 */
288288 function listNotices() {
289 - global $wgOut, $wgUser, $wgLang, $wgRequest;
 289+ global $wgOut, $wgUser, $wgLang, $wgRequest, $wgNoticeProjects;
290290
291291 // Get connection
292292 $dbr = wfGetDB( DB_SLAVE );
@@ -304,7 +304,6 @@
305305 'not_end',
306306 'not_enabled',
307307 'not_preferred',
308 - 'not_project',
309308 'not_locked'
310309 ),
311310 null,
@@ -337,8 +336,8 @@
338337 // Table headers
339338 $headers = array(
340339 wfMsgHtml( 'centralnotice-notice-name' ),
341 - wfMsgHtml( 'centralnotice-project-name' ),
342 - wfMsgHtml( 'centralnotice-project-lang' ),
 340+ wfMsgHtml( 'centralnotice-projects' ),
 341+ wfMsgHtml( 'centralnotice-languages' ),
343342 wfMsgHtml( 'centralnotice-start-date' ),
344343 wfMsgHtml( 'centralnotice-end-date' ),
345344 wfMsgHtml( 'centralnotice-enabled' ),
@@ -359,15 +358,34 @@
360359 htmlspecialchars( $row->not_name ),
361360 'method=listNoticeDetail&notice=' . urlencode( $row->not_name ) );
362361
363 - // Project
364 - $fields[] = htmlspecialchars( $this->getProjectName( $row->not_project ) );
 362+ // Projects
 363+ $projects = $this->getNoticeProjects( $row->not_name );
 364+ $project_count = count( $projects );
 365+ $projectList = '';
 366+ if ( $project_count > 1 ) {
 367+ $allProjects = true;
 368+ foreach ( $wgNoticeProjects as $project ) {
 369+ if ( !in_array( $project, $projects ) ) {
 370+ $allProjects = false;
 371+ break;
 372+ }
 373+ }
 374+ if ( $allProjects ) {
 375+ $projectList = wfMsg ( 'centralnotice-all-projects' );
 376+ } else {
 377+ $projectList = wfMsg ( 'centralnotice-multiple', $project_count );
 378+ }
 379+ } elseif ( $project_count == 1 ) {
 380+ $projectList = htmlspecialchars( $projects[0] );
 381+ }
 382+ $fields[] = $projectList;
365383
366384 // Languages
367385 $project_langs = $this->getNoticeLanguages( $row->not_name );
368386 $language_count = count( $project_langs );
369387 $languageList = '';
370388 if ( $language_count > 3 ) {
371 - $languageList = wfMsg ( 'centralnotice-multiple_languages', $language_count );
 389+ $languageList = wfMsg ( 'centralnotice-multiple', $language_count );
372390 } elseif ( $language_count > 0 ) {
373391 $languageList = $wgLang->commaList( $project_langs );
374392 }
@@ -463,11 +481,11 @@
464482 $startArray['hour'] .
465483 $startArray['min'] . '00'
466484 ;
467 - $projectSelected = $wgRequest->getVal( 'project_name' );
 485+ $noticeProjects = $wgRequest->getArray( 'projects', array() );
468486 $noticeLanguages = $wgRequest->getArray( 'project_languages', array() );
469487 } else { // Defaults
470488 $startTimestamp = null;
471 - $projectSelected = '';
 489+ $noticeProjects = array();
472490 $noticeLanguages = array();
473491 }
474492
@@ -500,12 +518,14 @@
501519 $htmlOut .= Xml::closeElement( 'tr' );
502520 // Project
503521 $htmlOut .= Xml::openElement( 'tr' );
504 - $htmlOut .= Xml::tags( 'td', array(), wfMsgHtml( 'centralnotice-project-name' ) );
505 - $htmlOut .= Xml::tags( 'td', array(), $this->projectDropDownList( $projectSelected ) );
 522+ $htmlOut .= Xml::tags( 'td', array( 'valign' => 'top' ),
 523+ wfMsgHtml( 'centralnotice-projects' ) );
 524+ $htmlOut .= Xml::tags( 'td', array(), $this->projectMultiSelector( $noticeProjects ) );
506525 $htmlOut .= Xml::closeElement( 'tr' );
507526 // Languages
508527 $htmlOut .= Xml::openElement( 'tr' );
509 - $htmlOut .= Xml::tags( 'td', array( 'valign' => 'top' ), wfMsgHtml( 'yourlanguage' ) );
 528+ $htmlOut .= Xml::tags( 'td', array( 'valign' => 'top' ),
 529+ wfMsgHtml( 'centralnotice-languages' ) );
510530 $htmlOut .= Xml::tags( 'td', array(),
511531 $this->languageMultiSelector( $noticeLanguages ) );
512532 $htmlOut .= Xml::closeElement( 'tr' );
@@ -544,6 +564,10 @@
545565 $wgOut->addHTML( $htmlOut );
546566 }
547567
 568+ /**
 569+ * Show the interface for viewing/editing an individual campaign
 570+ * @param $notice The name of the campaign to view
 571+ */
548572 function listNoticeDetail( $notice ) {
549573 global $wgOut, $wgRequest, $wgUser;
550574
@@ -648,10 +672,10 @@
649673 }
650674 }
651675
652 - // Handle new project name
653 - $projectName = $wgRequest->getVal( 'project_name' );
654 - if ( $projectName !== null ) {
655 - $this->updateProjectName ( $notice, $projectName );
 676+ // Handle new projects
 677+ $projects = $wgRequest->getArray( 'projects' );
 678+ if ( $projects ) {
 679+ $this->updateProjects( $notice, $projects );
656680 }
657681
658682 // Handle new project languages
@@ -754,7 +778,6 @@
755779 'not_end',
756780 'not_enabled',
757781 'not_preferred',
758 - 'not_project',
759782 'not_locked',
760783 'not_geo'
761784 ),
@@ -783,7 +806,7 @@
784807 $isEnabled = $wgRequest->getCheck( 'enabled' );
785808 $isPreferred = $wgRequest->getCheck( 'preferred' );
786809 $isLocked = $wgRequest->getCheck( 'locked' );
787 - $projectSelected = $wgRequest->getVal( 'project_name' );
 810+ $noticeProjects = $wgRequest->getArray( 'projects', array() );
788811 $noticeLanguages = $wgRequest->getArray( 'project_languages', array() );
789812 $isGeotargeted = $wgRequest->getCheck( 'geotargeted' );
790813 $countries = $wgRequest->getArray( 'geo_countries', array() );
@@ -793,7 +816,7 @@
794817 $isEnabled = ( $row->not_enabled == '1' );
795818 $isPreferred = ( $row->not_preferred == '1' );
796819 $isLocked = ( $row->not_locked == '1' );
797 - $projectSelected = $row->not_project;
 820+ $noticeProjects = $this->getNoticeProjects( $notice );
798821 $noticeLanguages = $this->getNoticeLanguages( $notice );
799822 $isGeotargeted = ( $row->not_geo == '1' );
800823 $countries = $this->getNoticeCountries( $notice );
@@ -827,12 +850,15 @@
828851 $htmlOut .= Xml::closeElement( 'tr' );
829852 // Project
830853 $htmlOut .= Xml::openElement( 'tr' );
831 - $htmlOut .= Xml::tags( 'td', array(), wfMsgHtml( 'centralnotice-project-name' ) );
832 - $htmlOut .= Xml::tags( 'td', array(), $this->projectDropDownList( $projectSelected ) );
 854+ $htmlOut .= Xml::tags( 'td', array( 'valign' => 'top' ),
 855+ wfMsgHtml( 'centralnotice-projects' ) );
 856+ $htmlOut .= Xml::tags( 'td', array(),
 857+ $this->projectMultiSelector( $noticeProjects ) );
833858 $htmlOut .= Xml::closeElement( 'tr' );
834859 // Languages
835860 $htmlOut .= Xml::openElement( 'tr' );
836 - $htmlOut .= Xml::tags( 'td', array( 'valign' => 'top' ), wfMsgHtml( 'yourlanguage' ) );
 861+ $htmlOut .= Xml::tags( 'td', array( 'valign' => 'top' ),
 862+ wfMsgHtml( 'centralnotice-languages' ) );
837863 $htmlOut .= Xml::tags( 'td', array(),
838864 $this->languageMultiSelector( $noticeLanguages ) );
839865 $htmlOut .= Xml::closeElement( 'tr' );
@@ -1051,6 +1077,7 @@
10521078 $campaignResults1 = $dbr->select(
10531079 array(
10541080 'cn_notices',
 1081+ 'cn_notice_projects',
10551082 'cn_notice_languages'
10561083 ),
10571084 array(
@@ -1061,9 +1088,10 @@
10621089 "not_end >= $encTimestamp",
10631090 'not_enabled = 1', // enabled
10641091 'not_geo = 0', // not geotargeted
 1092+ 'np_notice_id = cn_notices.not_id',
 1093+ 'np_project' => $project,
10651094 'nl_notice_id = cn_notices.not_id',
1066 - 'nl_language' => $language,
1067 - 'not_project' => array( '', $project )
 1095+ 'nl_language' => $language
10681096 ),
10691097 __METHOD__
10701098 );
@@ -1081,6 +1109,7 @@
10821110 $campaignResults2 = $dbr->select(
10831111 array(
10841112 'cn_notices',
 1113+ 'cn_notice_projects',
10851114 'cn_notice_languages',
10861115 'cn_notice_countries'
10871116 ),
@@ -1094,9 +1123,10 @@
10951124 'not_geo = 1', // geotargeted
10961125 'nc_notice_id = cn_notices.not_id',
10971126 'nc_country' => $location,
 1127+ 'np_notice_id = cn_notices.not_id',
 1128+ 'np_project' => $project,
10981129 'nl_notice_id = cn_notices.not_id',
1099 - 'nl_language' => $language,
1100 - 'not_project' => array( '', $project )
 1130+ 'nl_language' => $language
11011131 ),
11021132 __METHOD__
11031133 );
@@ -1114,12 +1144,15 @@
11151145 return $templates;
11161146 }
11171147
1118 - function addNotice( $noticeName, $enabled, $start, $project_name,
 1148+ function addNotice( $noticeName, $enabled, $start, $projects,
11191149 $project_languages, $geotargeted, $geo_countries )
11201150 {
11211151 if ( $this->noticeExists( $noticeName ) ) {
11221152 $this->showError( 'centralnotice-notice-exists' );
11231153 return;
 1154+ } elseif ( empty( $projects ) ) {
 1155+ $this->showError( 'centralnotice-no-project' );
 1156+ return;
11241157 } elseif ( empty( $project_languages ) ) {
11251158 $this->showError( 'centralnotice-no-language' );
11261159 return;
@@ -1152,12 +1185,19 @@
11531186 'not_enabled' => $enabled,
11541187 'not_start' => $dbw->timestamp( $startTs ),
11551188 'not_end' => $dbw->timestamp( $endTs ),
1156 - 'not_project' => $project_name,
11571189 'not_geo' => $geotargeted
11581190 )
11591191 );
11601192 $not_id = $dbw->insertId();
11611193
 1194+ // Do multi-row insert for campaign projects
 1195+ $insertArray = array();
 1196+ foreach( $projects as $project ) {
 1197+ $insertArray[] = array( 'np_notice_id' => $not_id, 'np_project' => $project );
 1198+ }
 1199+ $res = $dbw->insert( 'cn_notice_projects', $insertArray,
 1200+ __METHOD__, array( 'IGNORE' ) );
 1201+
11621202 // Do multi-row insert for campaign languages
11631203 $insertArray = array();
11641204 foreach( $project_languages as $code ) {
@@ -1249,6 +1289,21 @@
12501290 return null;
12511291 }
12521292 }
 1293+
 1294+ function getNoticeProjects( $noticeName ) {
 1295+ $dbr = wfGetDB( DB_SLAVE );
 1296+ $eNoticeName = htmlspecialchars( $noticeName );
 1297+ $row = $dbr->selectRow( 'cn_notices', 'not_id', array( 'not_name' => $eNoticeName ) );
 1298+ $projects = array();
 1299+ if ( $row ) {
 1300+ $res = $dbr->select( 'cn_notice_projects', 'np_project',
 1301+ array( 'np_notice_id' => $row->not_id ) );
 1302+ foreach ( $res as $projectRow ) {
 1303+ $projects[] = $projectRow->np_project;
 1304+ }
 1305+ }
 1306+ return $projects;
 1307+ }
12531308
12541309 function getNoticeLanguages( $noticeName ) {
12551310 $dbr = wfGetDB( DB_SLAVE );
@@ -1406,26 +1461,6 @@
14071462 );
14081463 }
14091464
1410 - function projectDropDownList( $selected = '' ) {
1411 - global $wgNoticeProjects;
1412 -
1413 - if ( $this->editable ) {
1414 - $htmlOut = Xml::openElement( 'select', array( 'name' => 'project_name' ) );
1415 - $htmlOut .= Xml::option( 'All projects', '', ( $selected == '' ) );
1416 - foreach ( $wgNoticeProjects as $value ) {
1417 - $htmlOut .= Xml::option( $value, $value, ( $selected == $value ) );
1418 - }
1419 - $htmlOut .= Xml::closeElement( 'select' );
1420 - return $htmlOut;
1421 - } else {
1422 - if ( $selected == '' ) {
1423 - return 'All projects';
1424 - } else {
1425 - return htmlspecialchars( $selected );
1426 - }
1427 - }
1428 - }
1429 -
14301465 /**
14311466 * Generates a multiple select list of all languages.
14321467 * @param $selected The language codes of the selected languages
@@ -1484,6 +1519,54 @@
14851520 return $htmlOut;
14861521 }
14871522
 1523+ /**
 1524+ * Generates a multiple select list of all project types.
 1525+ * @param $selected The name of the selected project type
 1526+ * @return multiple select list
 1527+ */
 1528+ function projectMultiSelector( $selected = array() ) {
 1529+ global $wgNoticeProjects, $wgExtensionAssetsPath, $wgLang;
 1530+ $scriptPath = "$wgExtensionAssetsPath/CentralNotice";
 1531+
 1532+ $options = "\n";
 1533+ foreach( $wgNoticeProjects as $project ) {
 1534+ $options .= Xml::option(
 1535+ $project,
 1536+ $project,
 1537+ in_array( $project, $selected )
 1538+ ) . "\n";
 1539+ }
 1540+ $htmlOut = '';
 1541+ if ( $this->editable ) {
 1542+ $htmlOut .= Xml::tags( 'select',
 1543+ array( 'multiple' => 'multiple', 'size' => 4, 'id' => 'projects[]', 'name' => 'projects[]' ),
 1544+ $options
 1545+ );
 1546+ $buttons = array();
 1547+ $buttons[] = '<a href="#" onclick="selectProjects(true);return false;">' .
 1548+ wfMsg( 'powersearch-toggleall' ) . '</a>';
 1549+ $buttons[] = '<a href="#" onclick="selectProjects(false);return false;">' .
 1550+ wfMsg( 'powersearch-togglenone' ) . '</a>';
 1551+ $htmlOut .= Xml::tags( 'div',
 1552+ array( 'style' => 'margin-top: 0.2em;' ),
 1553+ '<img src="'.$scriptPath.'/up-arrow.png" style="vertical-align:baseline;"/>' .
 1554+ wfMsg( 'centralnotice-select', $wgLang->commaList( $buttons ) )
 1555+ );
 1556+ } else {
 1557+ $htmlOut .= Xml::tags( 'select',
 1558+ array(
 1559+ 'multiple' => 'multiple',
 1560+ 'size' => 4,
 1561+ 'id' => 'projects[]',
 1562+ 'name' => 'projects[]',
 1563+ 'disabled' => 'disabled'
 1564+ ),
 1565+ $options
 1566+ );
 1567+ }
 1568+ return $htmlOut;
 1569+ }
 1570+
14881571 function getProjectName( $value ) {
14891572 return $value; // @fixme -- use wfMsg()
14901573 }
@@ -1497,6 +1580,35 @@
14981581 )
14991582 );
15001583 }
 1584+
 1585+ function updateProjects( $notice, $newProjects ) {
 1586+ $dbw = wfGetDB( DB_MASTER );
 1587+ $dbw->begin();
 1588+
 1589+ // Get the previously assigned projects
 1590+ $oldProjects = $this->getNoticeProjects( $notice );
 1591+
 1592+ // Get the notice id
 1593+ $row = $dbw->selectRow( 'cn_notices', 'not_id', array( 'not_name' => $notice ) );
 1594+
 1595+ // Add newly assigned projects
 1596+ $addProjects = array_diff( $newProjects, $oldProjects );
 1597+ $insertArray = array();
 1598+ foreach( $addProjects as $project ) {
 1599+ $insertArray[] = array( 'np_notice_id' => $row->not_id, 'np_project' => $project );
 1600+ }
 1601+ $res = $dbw->insert( 'cn_notice_projects', $insertArray, __METHOD__, array( 'IGNORE' ) );
 1602+
 1603+ // Remove disassociated projects
 1604+ $removeProjects = array_diff( $oldProjects, $newProjects );
 1605+ if ( $removeProjects ) {
 1606+ $res = $dbw->delete( 'cn_notice_projects',
 1607+ array( 'np_notice_id' => $row->not_id, 'np_project' => $removeProjects )
 1608+ );
 1609+ }
 1610+
 1611+ $dbw->commit();
 1612+ }
15011613
15021614 function updateProjectLanguages( $notice, $newLanguages ) {
15031615 $dbw = wfGetDB( DB_MASTER );
Index: branches/wmf/1.16wmf4/extensions/CentralNotice/patches/patch-notice_languages.sql
@@ -1,4 +1,4 @@
 2+-- Update to allow for any number of languages per campaign.
23
34 CREATE TABLE IF NOT EXISTS /*$wgDBprefix*/cn_notice_languages (
45 `nl_notice_id` int unsigned NOT NULL,
Index: branches/wmf/1.16wmf4/extensions/CentralNotice/CentralNotice.i18n.php
@@ -34,7 +34,8 @@
3535 'centralnotice-add-template' => 'Add a banner',
3636 'centralnotice-show-notices' => 'Show campaigns',
3737 'centralnotice-list-templates' => 'List banners',
38 - 'centralnotice-multiple_languages' => 'multiple ($1)',
 38+ 'centralnotice-multiple' => 'Multiple ($1)',
 39+ 'centralnotice-all-projects' => 'All projects',
3940 'centralnotice-language-listing' => '$1 - $2',
4041 'centralnotice-translations' => 'Translations',
4142 'centralnotice-translate-to' => 'Translate to',
@@ -52,6 +53,7 @@
5354 'centralnotice-notice-exists' => 'Campaign already exists.
5455 Not adding.',
5556 'centralnotice-no-language' => 'No language was selected for the campaign. Not adding.',
 57+ 'centralnotice-no-project' => 'No project was selected for the campaign. Not adding.',
5658 'centralnotice-template-exists' => 'Banner already exists.
5759 Not adding.',
5860 'centralnotice-notice-doesnt-exist' => 'Campaign does not exist.',
@@ -127,7 +129,8 @@
128130 'centralnotice-allocation' => 'Allocation',
129131 'centralnotice-view-allocation' => 'View banner allocation',
130132 'centralnotice-allocation-instructions' => 'Choose the environment you would like to view banner allocation for:',
131 - 'centralnotice-project-language' => 'Project language',
 133+ 'centralnotice-languages' => 'Languages',
 134+ 'centralnotice-projects' => 'Projects',
132135 'centralnotice-country' => 'Country',
133136 'centralnotice-no-allocation' => 'No banners allocated.',
134137 'centralnotice-allocation-description' => 'Banner allocation for $1.$2 in $3:',
@@ -168,7 +171,7 @@
169172 'centralnotice-remove' => '{{Identical|Remove}}',
170173 'centralnotice-translate-heading' => 'Fieldset label. $1 is a name of a template.',
171174 'centralnotice-add' => '{{Identical|Add}}',
172 - 'centralnotice-multiple_languages' => '$1 is a number. More precisely, the number of languages a notice is available in. It is always greater than 3.',
 175+ 'centralnotice-multiple' => '$1 is a number. More precisely, the number of languages or projects a notice is available in. It is always greater than 2.',
173176 'centralnotice-language-listing' => 'A language listing for the language multi-select box. First parameter is the language code. Second parameter is the name of the language.',
174177 'centralnotice-translate' => '{{Identical|Translate}}',
175178 'centralnotice-notice-exists' => 'Error message displayed in Special:CentralNotice when trying to add a notice with the same name of another notice',
@@ -581,7 +584,7 @@
582585 'centralnotice-add-template' => 'Ҡалып өҫтәргә',
583586 'centralnotice-show-notices' => 'Белдереүҙәрҙе күрһәтергә',
584587 'centralnotice-list-templates' => 'Ҡалыптар исемлеге',
585 - 'centralnotice-multiple_languages' => 'бер нисә ($1)',
 588+ 'centralnotice-multiple' => 'бер нисә ($1)',
586589 'centralnotice-translations' => 'Тәржемәләр',
587590 'centralnotice-translate-to' => 'Тәржемә:',
588591 'centralnotice-translate' => 'Тәржемә',
@@ -645,7 +648,6 @@
646649 'centralnotice-countries' => 'Илдәр',
647650 'centralnotice-allocation' => 'Урынлашыу',
648651 'centralnotice-view-allocation' => 'Баннерҙарҙың урынлашыуын ҡарау',
649 - 'centralnotice-project-language' => 'Проект теле',
650652 'centralnotice-country' => 'Ил',
651653 'centralnotice-no-allocation' => 'Баннерҙар урынлаштырылмаған',
652654 'centralnotice-allocation-description' => '$1.$2 өсөн $3 эсендә баннерҙар урынлашыуы',
@@ -719,7 +721,7 @@
720722 'centralnotice-add-template' => 'Дадаць паведамленьне',
721723 'centralnotice-show-notices' => 'Паказаць кампаніі',
722724 'centralnotice-list-templates' => 'Сьпіс паведамленьняў',
723 - 'centralnotice-multiple_languages' => 'некалькі ($1)',
 725+ 'centralnotice-multiple' => 'некалькі ($1)',
724726 'centralnotice-translations' => 'Пераклады',
725727 'centralnotice-translate-to' => 'Пераклад на',
726728 'centralnotice-translate' => 'Пераклад',
@@ -811,7 +813,6 @@
812814 'centralnotice-allocation' => 'Прызначэньне',
813815 'centralnotice-view-allocation' => 'Паказаць разьмяшчэньне банэра',
814816 'centralnotice-allocation-instructions' => 'Выберыце рэжым, для якога Вы жадаеце праглядзець разьмяшчэньне банэра:',
815 - 'centralnotice-project-language' => 'Мова праекту',
816817 'centralnotice-country' => 'Краіна',
817818 'centralnotice-no-allocation' => 'Няма разьмешчаных банэраў.',
818819 'centralnotice-allocation-description' => 'Разьмяшчэньне банэра для $1.$2 у $3:',
@@ -1020,7 +1021,7 @@
10211022 'centralnotice-add-template' => 'Ouzhpennañ ur patrom',
10221023 'centralnotice-show-notices' => 'Diskouez ar menegoù',
10231024 'centralnotice-list-templates' => 'Rollañ ar patromoù',
1024 - 'centralnotice-multiple_languages' => 'lies ($1)',
 1025+ 'centralnotice-multiple' => 'lies ($1)',
10251026 'centralnotice-translations' => 'Troidigezhioù',
10261027 'centralnotice-translate-to' => 'Treiñ e',
10271028 'centralnotice-translate' => 'Treiñ',
@@ -1112,7 +1113,6 @@
11131114 'centralnotice-allocation' => 'Skorenn',
11141115 'centralnotice-view-allocation' => 'Gwelout skorenn ar giton',
11151116 'centralnotice-allocation-instructions' => "Dibabit an endro e-lec'h m'ho pefe c'hoant da welet skorenn ar giton evit :",
1116 - 'centralnotice-project-language' => 'Yezh ar raktres',
11171117 'centralnotice-country' => 'Bro',
11181118 'centralnotice-no-allocation' => 'Giton skorennet ebet.',
11191119 'centralnotice-allocation-description' => 'Skorenn giton evit $1.$2 e $3 :',
@@ -1154,7 +1154,7 @@
11551155 'centralnotice-add-template' => 'Dodaj šablon',
11561156 'centralnotice-show-notices' => 'Prikaži obavještenja',
11571157 'centralnotice-list-templates' => 'Spisak šablona',
1158 - 'centralnotice-multiple_languages' => 'više ($1)',
 1158+ 'centralnotice-multiple' => 'više ($1)',
11591159 'centralnotice-translations' => 'Prijevodi',
11601160 'centralnotice-translate-to' => 'Prevedi na',
11611161 'centralnotice-translate' => 'Prijevod',
@@ -1246,7 +1246,6 @@
12471247 'centralnotice-allocation' => 'Raspoređivanje',
12481248 'centralnotice-view-allocation' => 'Pogledaj dodjelu obavještenja',
12491249 'centralnotice-allocation-instructions' => 'Odaberi okruženje za koje želite vidjeti dodjelu obavještenja:',
1250 - 'centralnotice-project-language' => 'Jezik projekta',
12511250 'centralnotice-country' => 'Država',
12521251 'centralnotice-no-allocation' => 'Nema dodijeljenih obavještenja.',
12531252 'centralnotice-allocation-description' => 'Dodjela obavještenja za $1.$2 u $3:',
@@ -1388,7 +1387,7 @@
13891388 'centralnotice-add-template' => 'Přidat šablonu',
13901389 'centralnotice-show-notices' => 'Zobrazit oznámení',
13911390 'centralnotice-list-templates' => 'Seznam šablon',
1392 - 'centralnotice-multiple_languages' => 'více ($1)',
 1391+ 'centralnotice-multiple' => 'více ($1)',
13931392 'centralnotice-translations' => 'Překlady',
13941393 'centralnotice-translate-to' => 'Přeložit do jazyka',
13951394 'centralnotice-translate' => 'Přeložit',
@@ -1471,7 +1470,6 @@
14721471 'centralnotice-allocation' => 'Přidělení',
14731472 'centralnotice-view-allocation' => 'Zobrazit přidělení bannerů',
14741473 'centralnotice-allocation-instructions' => 'Vyberte si prostředí, pro které chcete zobrazit přidělení bannerů:',
1475 - 'centralnotice-project-language' => 'Jazyk projektu',
14761474 'centralnotice-country' => 'Země',
14771475 'centralnotice-no-allocation' => 'Žádné bannery nejsou přiděleny.',
14781476 'centralnotice-allocation-description' => 'Přidělení bannerů na $1.$2 v $3:',
@@ -1614,7 +1612,7 @@
16151613 'centralnotice-add-template' => 'Hinzufügen einer Vorlage',
16161614 'centralnotice-show-notices' => 'Zeige Meldungen',
16171615 'centralnotice-list-templates' => 'Vorlagen auflisten',
1618 - 'centralnotice-multiple_languages' => 'mehrere ($1)',
 1616+ 'centralnotice-multiple' => 'mehrere ($1)',
16191617 'centralnotice-translations' => 'Übersetzungen',
16201618 'centralnotice-translate-to' => 'Übersetzen in',
16211619 'centralnotice-translate' => 'Übersetzen',
@@ -1706,7 +1704,6 @@
17071705 'centralnotice-allocation' => 'Anordnung',
17081706 'centralnotice-view-allocation' => 'Anordnung der Vorlagen ansehen',
17091707 'centralnotice-allocation-instructions' => 'Die Ausgabeumgebung für die Ansicht der Vorlagenanordnung auswählen:',
1710 - 'centralnotice-project-language' => 'Projektsprache',
17111708 'centralnotice-country' => 'Land',
17121709 'centralnotice-no-allocation' => 'Es wurden keine Vorlagen angeordnet.',
17131710 'centralnotice-allocation-description' => 'Vorlagenanordnung für $1.$2 in $3:',
@@ -1847,7 +1844,7 @@
18481845 'centralnotice-add-template' => 'Pśedłogu pśidaś',
18491846 'centralnotice-show-notices' => 'Powěźeńki pokazaś',
18501847 'centralnotice-list-templates' => 'Pśedłogi nalistowaś',
1851 - 'centralnotice-multiple_languages' => 'někotare ($1)',
 1848+ 'centralnotice-multiple' => 'někotare ($1)',
18521849 'centralnotice-translations' => 'Pśełožki',
18531850 'centralnotice-translate-to' => 'Pśełoźiś do',
18541851 'centralnotice-translate' => 'Pśełožiś',
@@ -2069,7 +2066,7 @@
20702067 'centralnotice-add-template' => 'Aldoni ŝablonon',
20712068 'centralnotice-show-notices' => 'Montri noticojn',
20722069 'centralnotice-list-templates' => 'Rigardi ŝablonojn',
2073 - 'centralnotice-multiple_languages' => 'multlingve ($1)',
 2070+ 'centralnotice-multiple' => 'multlingve ($1)',
20742071 'centralnotice-translations' => 'Tradukoj',
20752072 'centralnotice-translate-to' => 'Traduki al',
20762073 'centralnotice-translate' => 'Traduki',
@@ -2152,7 +2149,6 @@
21532150 'centralnotice-banner-hidable' => 'Statika/Kaŝebla',
21542151 'centralnotice-banner-collapsible' => 'Maletendebla',
21552152 'centralnotice-countries' => 'Landoj',
2156 - 'centralnotice-project-language' => 'Lingvo de projekto',
21572153 'centralnotice-country' => 'Lando',
21582154 'centralnotice-no-allocation' => 'Neniuj rekamrubandoj estas asignitaj.',
21592155 'right-centralnotice-admin' => 'Administri centralajn noticojn',
@@ -2198,7 +2194,7 @@
21992195 'centralnotice-add-template' => 'Añadir una plantilla',
22002196 'centralnotice-show-notices' => 'Mostrar avisos',
22012197 'centralnotice-list-templates' => 'Listar plantillas',
2202 - 'centralnotice-multiple_languages' => 'múltiples ($1)',
 2198+ 'centralnotice-multiple' => 'múltiples ($1)',
22032199 'centralnotice-translations' => 'Traducciones',
22042200 'centralnotice-translate-to' => 'Traducir al',
22052201 'centralnotice-translate' => 'Traducir',
@@ -2436,7 +2432,6 @@
24372433 'centralnotice-clone-notice' => 'Txantiloia honen kopia sortu',
24382434 'centralnotice-clone-name' => 'Izena:',
24392435 'centralnotice-countries' => 'Herrialdeak',
2440 - 'centralnotice-project-language' => 'Proiektuaren hizkuntza',
24412436 'centralnotice-country' => 'Herrialdea',
24422437 'centralnotice-percentage' => 'Ehunekoa',
24432438 );
@@ -2474,7 +2469,7 @@
24752470 'centralnotice-add-template' => 'اضافه کردن الگو',
24762471 'centralnotice-show-notices' => 'نمایش اعلان‌ها',
24772472 'centralnotice-list-templates' => 'فهرست الگوها',
2478 - 'centralnotice-multiple_languages' => 'چندگانه ($1)',
 2473+ 'centralnotice-multiple' => 'چندگانه ($1)',
24792474 'centralnotice-translations' => 'ترجمه‌ها',
24802475 'centralnotice-translate-to' => 'ترجمه به',
24812476 'centralnotice-translate' => 'ترجمه کردن',
@@ -2566,7 +2561,6 @@
25672562 'centralnotice-allocation' => 'تخصیص',
25682563 'centralnotice-view-allocation' => 'نمایش تخصیص آگهی',
25692564 'centralnotice-allocation-instructions' => 'محیطی که می‌خواهید تخصیص نشان را برایش مشاهده کنید، برگزینید:',
2570 - 'centralnotice-project-language' => 'زبان پروژه',
25712565 'centralnotice-country' => 'کشور',
25722566 'centralnotice-no-allocation' => 'هیچ آگهی‌ای اختصاص نیافته است.',
25732567 'centralnotice-allocation-description' => 'اختصاص آگهی برای $1.$2 در $3:',
@@ -2711,7 +2705,7 @@
27122706 'centralnotice-add-template' => 'Ajouter un modèle',
27132707 'centralnotice-show-notices' => 'Afficher les avis',
27142708 'centralnotice-list-templates' => 'Lister les modèles',
2715 - 'centralnotice-multiple_languages' => 'multiple ($1)',
 2709+ 'centralnotice-multiple' => 'multiple ($1)',
27162710 'centralnotice-translations' => 'Traductions',
27172711 'centralnotice-translate-to' => 'Traduire en',
27182712 'centralnotice-translate' => 'Traduire',
@@ -2803,7 +2797,6 @@
28042798 'centralnotice-allocation' => 'Allocation',
28052799 'centralnotice-view-allocation' => 'Voir la disposition de bannière',
28062800 'centralnotice-allocation-instructions' => 'Choisissez l’environnement pour lequel vous souhaitez afficher la disposition de bannière :',
2807 - 'centralnotice-project-language' => 'Langue du projet',
28082801 'centralnotice-country' => 'Pays',
28092802 'centralnotice-no-allocation' => 'Pas de bannières disposées.',
28102803 'centralnotice-allocation-description' => 'Disposition de bannière pour $1.$2 en $3 :',
@@ -2845,7 +2838,7 @@
28462839 'centralnotice-add-template' => 'Apondre una baniére',
28472840 'centralnotice-show-notices' => 'Fâre vêre les propagandes',
28482841 'centralnotice-list-templates' => 'Listar les baniéres',
2849 - 'centralnotice-multiple_languages' => 'un mouél ($1)',
 2842+ 'centralnotice-multiple' => 'un mouél ($1)',
28502843 'centralnotice-translations' => 'Traduccions',
28512844 'centralnotice-translate-to' => 'Traduire en',
28522845 'centralnotice-translate' => 'Traduire',
@@ -2936,7 +2929,6 @@
29372930 'centralnotice-allocation' => 'Alocacion',
29382931 'centralnotice-view-allocation' => 'Vêre l’alocacion de baniére',
29392932 'centralnotice-allocation-instructions' => 'Chouèsésséd l’enveronance por laquinta vos souhètâd fâre vêre l’alocacion de baniére :',
2940 - 'centralnotice-project-language' => 'Lengoua du projèt',
29412933 'centralnotice-country' => 'Payis',
29422934 'centralnotice-no-allocation' => 'Gins de baniére balyê.',
29432935 'centralnotice-allocation-description' => 'Alocacion de baniére por $1.$2 en $3 :',
@@ -2983,7 +2975,7 @@
29842976 'centralnotice-add-template' => 'Engadir un modelo',
29852977 'centralnotice-show-notices' => 'Amosar os avisos',
29862978 'centralnotice-list-templates' => 'Listar os modelos',
2987 - 'centralnotice-multiple_languages' => 'múltiple ($1)',
 2979+ 'centralnotice-multiple' => 'múltiple ($1)',
29882980 'centralnotice-translations' => 'Traducións',
29892981 'centralnotice-translate-to' => 'Traducir ao',
29902982 'centralnotice-translate' => 'Traducir',
@@ -3075,7 +3067,6 @@
30763068 'centralnotice-allocation' => 'Asignación',
30773069 'centralnotice-view-allocation' => 'Ollar a asignación do modelo',
30783070 'centralnotice-allocation-instructions' => 'Escolla o entorno onde desexa mostrar a asignación do modelo:',
3079 - 'centralnotice-project-language' => 'Lingua do proxecto',
30803071 'centralnotice-country' => 'País',
30813072 'centralnotice-no-allocation' => 'Non hai asignación de modelos.',
30823073 'centralnotice-allocation-description' => 'Asignación de modelos de $1.$2 en $3:',
@@ -3142,7 +3133,7 @@
31433134 'centralnotice-add-template' => 'Zuefiege vun ere Vorlag',
31443135 'centralnotice-show-notices' => 'Zeig Mäldige',
31453136 'centralnotice-list-templates' => 'Vorlage uflischte',
3146 - 'centralnotice-multiple_languages' => 'mehreri ($1)',
 3137+ 'centralnotice-multiple' => 'mehreri ($1)',
31473138 'centralnotice-translations' => 'Ibersetzige',
31483139 'centralnotice-translate-to' => 'Ibersetze in',
31493140 'centralnotice-translate' => 'Ibersetze',
@@ -3233,7 +3224,6 @@
32343225 'centralnotice-allocation' => 'Zuewysig',
32353226 'centralnotice-view-allocation' => 'Aaornig vu dr Banner aaluege',
32363227 'centralnotice-allocation-instructions' => 'D Umgäbig uuswehle, wu d Verteilig vu dr Banner witt aaluege:',
3237 - 'centralnotice-project-language' => 'Projäktsproch',
32383228 'centralnotice-country' => 'Land',
32393229 'centralnotice-no-allocation' => 'Kei Banner aagordnet.',
32403230 'centralnotice-allocation-description' => 'Banneraaornig fir $1.$2 in $3:',
@@ -3375,7 +3365,7 @@
33763366 'centralnotice-add-template' => 'Dodaj predložak',
33773367 'centralnotice-show-notices' => 'Pokaži obavijesti',
33783368 'centralnotice-list-templates' => 'Popis predložaka',
3379 - 'centralnotice-multiple_languages' => 'više ($1)',
 3369+ 'centralnotice-multiple' => 'više ($1)',
33803370 'centralnotice-translations' => 'Prijevodi',
33813371 'centralnotice-translate-to' => 'Prevedi na',
33823372 'centralnotice-translate' => 'Prevedi',
@@ -3467,7 +3457,6 @@
34683458 'centralnotice-allocation' => 'Dodjela',
34693459 'centralnotice-view-allocation' => 'Prikaži raspodjelu obavijesti',
34703460 'centralnotice-allocation-instructions' => 'Odaberi okruženje za koje želite vidjeti dodjelu obavijesti:',
3471 - 'centralnotice-project-language' => 'Jezik projekta',
34723461 'centralnotice-country' => 'Država',
34733462 'centralnotice-no-allocation' => 'Nema dodijeljenih obavijesti.',
34743463 'centralnotice-allocation-description' => 'Dodjela obavijesti za $1.$2 u $3:',
@@ -3508,7 +3497,7 @@
35093498 'centralnotice-add-template' => 'Předłohu přidać',
35103499 'centralnotice-show-notices' => 'Zdźělenki pokazać',
35113500 'centralnotice-list-templates' => 'Předłohi nalistować',
3512 - 'centralnotice-multiple_languages' => 'wjacore ($1)',
 3501+ 'centralnotice-multiple' => 'wjacore ($1)',
35133502 'centralnotice-translations' => 'Přełožki',
35143503 'centralnotice-translate-to' => 'Přełožić do',
35153504 'centralnotice-translate' => 'Přełožić',
@@ -3684,7 +3673,6 @@
36853674 'centralnotice-clone-name' => 'Név:',
36863675 'centralnotice-preview-all-template-translations' => 'A sablon összes fordításának megtekintése',
36873676 'centralnotice-banner-anonymous' => 'Névtelen szerkesztők',
3688 - 'centralnotice-project-language' => 'A projekt nyelve',
36893677 'centralnotice-percentage' => 'Százalék',
36903678 'right-centralnotice-admin' => 'központi üzenetek beállítása',
36913679 'right-centralnotice-translate' => 'központi üzenetek fordítása',
@@ -3721,7 +3709,7 @@
37223710 'centralnotice-add-template' => 'Adder un bandiera',
37233711 'centralnotice-show-notices' => 'Monstrar campanias',
37243712 'centralnotice-list-templates' => 'Listar bandieras',
3725 - 'centralnotice-multiple_languages' => 'multiple ($1)',
 3713+ 'centralnotice-multiple' => 'multiple ($1)',
37263714 'centralnotice-translations' => 'Traductiones',
37273715 'centralnotice-translate-to' => 'Traducer in',
37283716 'centralnotice-translate' => 'Traducer',
@@ -3813,7 +3801,6 @@
38143802 'centralnotice-allocation' => 'Allocation',
38153803 'centralnotice-view-allocation' => 'Vider allocation de bandieras',
38163804 'centralnotice-allocation-instructions' => 'Selige le ambiente pro le qual tu vole vider le allocation de bandieras:',
3817 - 'centralnotice-project-language' => 'Lingua del projecto',
38183805 'centralnotice-country' => 'Pais',
38193806 'centralnotice-no-allocation' => 'Nulle bandiera allocate.',
38203807 'centralnotice-allocation-description' => 'Allocation de bandieras pro $1.$2 in $3:',
@@ -3859,7 +3846,7 @@
38603847 'centralnotice-add-template' => 'Tambah templat',
38613848 'centralnotice-show-notices' => 'Tampilkan pengumuman',
38623849 'centralnotice-list-templates' => 'Daftar templat',
3863 - 'centralnotice-multiple_languages' => 'ganda ($1)',
 3850+ 'centralnotice-multiple' => 'ganda ($1)',
38643851 'centralnotice-translations' => 'Terjemahan',
38653852 'centralnotice-translate-to' => 'Terjemahkan ke',
38663853 'centralnotice-translate' => 'Terjemahkan',
@@ -3951,7 +3938,6 @@
39523939 'centralnotice-allocation' => 'Alokasi',
39533940 'centralnotice-view-allocation' => 'Lihat alokasi pengumuman',
39543941 'centralnotice-allocation-instructions' => 'Pilih lingkungan yang ingin Anda lihat alokasi pengumumannya:',
3955 - 'centralnotice-project-language' => 'Bahasa proyek',
39563942 'centralnotice-country' => 'Negara',
39573943 'centralnotice-no-allocation' => 'Tidak ada pengumuman yang dialokasikan.',
39583944 'centralnotice-allocation-description' => 'Alokasi pengumuman untuk $1.$2 di $3:',
@@ -4094,7 +4080,6 @@
40954081 'centralnotice-banner-anonymous' => 'Utenti anonimi',
40964082 'centralnotice-banner-logged-in' => 'Utenti collegati',
40974083 'centralnotice-countries' => 'Paesi',
4098 - 'centralnotice-project-language' => 'Lingua progetto',
40994084 'centralnotice-country' => 'Nazione',
41004085 'centralnotice-percentage' => 'Percentuale',
41014086 'right-centralnotice-admin' => 'Gestisce gli avvisi centralizzati',
@@ -4136,7 +4121,7 @@
41374122 'centralnotice-add-template' => 'テンプレートを追加',
41384123 'centralnotice-show-notices' => '告知を表示',
41394124 'centralnotice-list-templates' => 'テンプレートを一覧表示',
4140 - 'centralnotice-multiple_languages' => '複数($1)',
 4125+ 'centralnotice-multiple' => '複数($1)',
41414126 'centralnotice-translations' => '翻訳',
41424127 'centralnotice-translate-to' => '翻訳先',
41434128 'centralnotice-translate' => '翻訳',
@@ -4225,7 +4210,6 @@
42264211 'centralnotice-allocation' => '割り当て',
42274212 'centralnotice-view-allocation' => 'テンプレートの割り当てを表示',
42284213 'centralnotice-allocation-instructions' => 'テンプレートの割り当てを表示したい環境を選んでください:',
4229 - 'centralnotice-project-language' => 'プロジェクトの言語',
42304214 'centralnotice-country' => '国',
42314215 'centralnotice-no-allocation' => 'テンプレートが割り当てられていません。',
42324216 'centralnotice-allocation-description' => '$3での$1.$2へのテンプレートの割り当て:',
@@ -4475,7 +4459,7 @@
44764460 'centralnotice-add-template' => '틀을 추가하기',
44774461 'centralnotice-show-notices' => '공지 표시하기',
44784462 'centralnotice-list-templates' => '템플릿 목록 표시하기',
4479 - 'centralnotice-multiple_languages' => '다수 ($1)',
 4463+ 'centralnotice-multiple' => '다수 ($1)',
44804464 'centralnotice-translations' => '번역',
44814465 'centralnotice-translate-to' => '번역할 언어',
44824466 'centralnotice-translate' => '번역하기',
@@ -4532,7 +4516,6 @@
45334517 'centralnotice-clone-notice' => '이 틀의 사본을 만들기',
45344518 'centralnotice-clone-name' => '이름:',
45354519 'centralnotice-preview-all-template-translations' => '템플렛의 모든 번역 미리 보기',
4536 - 'centralnotice-project-language' => '프로젝트 언어',
45374520 'centralnotice-country' => '국가',
45384521 'right-centralnotice-admin' => '중앙 공지 관리',
45394522 'right-centralnotice-translate' => '중앙 공지 번역',
@@ -4565,7 +4548,7 @@
45664549 'centralnotice-add-template' => 'En Schabloon dobei donn',
45674550 'centralnotice-show-notices' => 'Zentrale Nohreschte zeije',
45684551 'centralnotice-list-templates' => 'Schablone opleßte',
4569 - 'centralnotice-multiple_languages' => 'etlijje ($1)',
 4552+ 'centralnotice-multiple' => 'etlijje ($1)',
45704553 'centralnotice-translations' => 'Övversäzonge',
45714554 'centralnotice-translate-to' => 'Övversäze noh',
45724555 'centralnotice-translate' => 'Övversäze',
@@ -4677,7 +4660,7 @@
46784661 'centralnotice-add-template' => 'E Banner derbäisetzen',
46794662 'centralnotice-show-notices' => 'Matdeelunge weisen',
46804663 'centralnotice-list-templates' => 'Lëscht vun de Banneren',
4681 - 'centralnotice-multiple_languages' => 'méi ($1)',
 4664+ 'centralnotice-multiple' => 'méi ($1)',
46824665 'centralnotice-translations' => 'Iwwersetzungen',
46834666 'centralnotice-translate-to' => 'Iwwersetzen op',
46844667 'centralnotice-translate' => 'Iwwersetzen',
@@ -4768,7 +4751,6 @@
47694752 'centralnotice-countries' => 'Länner',
47704753 'centralnotice-allocation' => 'Dispositioun',
47714754 'centralnotice-view-allocation' => 'Dispositioun vum Banner weisen',
4772 - 'centralnotice-project-language' => 'Sprooch vum Projet',
47734755 'centralnotice-country' => 'Land',
47744756 'centralnotice-no-allocation' => 'Keng Banneren zougedeelt.',
47754757 'centralnotice-allocation-description' => 'Dispositioun vum Banner fir $1.$2 a(n) $3:',
@@ -4821,7 +4803,7 @@
48224804 'centralnotice-add-template' => 'Sjabloon biedoon',
48234805 'centralnotice-show-notices' => 'Sitemitdeilinge waergaeve',
48244806 'centralnotice-list-templates' => 'Sjablone waergaeve',
4825 - 'centralnotice-multiple_languages' => 'meerdere ($1)',
 4807+ 'centralnotice-multiple' => 'meerdere ($1)',
48264808 'centralnotice-translations' => 'Euverzèttinge',
48274809 'centralnotice-translate-to' => 'Euverzètte nao',
48284810 'centralnotice-translate' => 'Euverzètte',
@@ -4914,7 +4896,6 @@
49154897 'centralnotice-allocation' => 'Toewiezing',
49164898 'centralnotice-view-allocation' => 'Betrach vaantoewiezing',
49174899 'centralnotice-allocation-instructions' => 'Kees de ómgaeving woveur se de vaantoewiezing wils bekieke:',
4918 - 'centralnotice-project-language' => 'Projektaal',
49194900 'centralnotice-country' => 'Landj',
49204901 'centralnotice-no-allocation' => 'Geine vaan toegeweze.',
49214902 'centralnotice-allocation-description' => 'Vaantoewiezing veur $1.$2 in $3:',
@@ -5002,7 +4983,6 @@
50034984 'centralnotice-end-time' => 'Beigu laiks (UTC)',
50044985 'centralnotice-clone-name' => 'Nosaukums:',
50054986 'centralnotice-countries' => 'Valstis',
5006 - 'centralnotice-project-language' => 'Projekta valoda',
50074987 'centralnotice-country' => 'Valsts',
50084988 );
50094989
@@ -5098,7 +5078,7 @@
50995079 'centralnotice-add-template' => 'Додај шаблон',
51005080 'centralnotice-show-notices' => 'Прикажи известувања',
51015081 'centralnotice-list-templates' => 'Наведи шаблони',
5102 - 'centralnotice-multiple_languages' => 'повеќе ($1)',
 5082+ 'centralnotice-multiple' => 'повеќе ($1)',
51035083 'centralnotice-translations' => 'Преводи',
51045084 'centralnotice-translate-to' => 'Преведи на',
51055085 'centralnotice-translate' => 'Преведи',
@@ -5190,7 +5170,6 @@
51915171 'centralnotice-allocation' => 'Распределба',
51925172 'centralnotice-view-allocation' => 'Преглед на распределбата на плакати',
51935173 'centralnotice-allocation-instructions' => 'Одберете во која околина сакате да ја погледате распределбата на плакати:',
5194 - 'centralnotice-project-language' => 'Јазик на проектот',
51955174 'centralnotice-country' => 'Земја',
51965175 'centralnotice-no-allocation' => 'Нема распределени плакати',
51975176 'centralnotice-allocation-description' => 'Распределба на плакати за $1.$2 iво $3:',
@@ -5232,7 +5211,7 @@
52335212 'centralnotice-add-template' => 'ഫലകം കൂട്ടിച്ചേർക്കുക',
52345213 'centralnotice-show-notices' => 'അറിയിപ്പുകൾ പ്രദർശിപ്പിക്കുക',
52355214 'centralnotice-list-templates' => 'ഫലകങ്ങൾ പട്ടികവത്കരിക്കുക',
5236 - 'centralnotice-multiple_languages' => 'നിരവധി ($1)',
 5215+ 'centralnotice-multiple' => 'നിരവധി ($1)',
52375216 'centralnotice-translations' => 'തർജ്ജമകൾ',
52385217 'centralnotice-translate-to' => 'ഇതിലേയ്ക്ക് തർജ്ജമ ചെയ്യുക',
52395218 'centralnotice-translate' => 'തർജ്ജമ ചെയ്യുക',
@@ -5324,7 +5303,6 @@
53255304 'centralnotice-allocation' => 'വിന്യാസം',
53265305 'centralnotice-view-allocation' => 'എഴുത്തുപട്ടയ്ക്ക് അനുവദിച്ചിരിക്കുന്ന സ്ഥാനം കാണുക',
53275306 'centralnotice-allocation-instructions' => 'എഴുത്തുപട്ട അനുവദിക്കൽ പ്രദർശിപ്പിക്കാനായി താങ്കൾ തിരഞ്ഞെടുക്കുന്ന പരിതസ്ഥിതി:',
5328 - 'centralnotice-project-language' => 'പദ്ധതിയുടെ ഭാഷ',
53295307 'centralnotice-country' => 'രാജ്യം',
53305308 'centralnotice-no-allocation' => 'എഴുത്തുപട്ടകൾക്ക് ഇടയനുവദിച്ചിട്ടില്ല.',
53315309 'centralnotice-allocation-description' => '$1.$2 സംരംഭത്തിൽ അനുവദിച്ചിരിക്കുന്ന എഴുത്തുപട്ട (രാജ്യം: $3):',
@@ -5621,7 +5599,7 @@
56225600 'centralnotice-add-template' => 'Sjabloon toevoegen',
56235601 'centralnotice-show-notices' => 'Sitenotices weergeven',
56245602 'centralnotice-list-templates' => 'Sjablonen weergeven',
5625 - 'centralnotice-multiple_languages' => 'meerdere ($1)',
 5603+ 'centralnotice-multiple' => 'meerdere ($1)',
56265604 'centralnotice-translations' => 'Vertalingen',
56275605 'centralnotice-translate-to' => 'Vertalen naar',
56285606 'centralnotice-translate' => 'Vertalen',
@@ -5713,7 +5691,6 @@
57145692 'centralnotice-allocation' => 'Toewijzing',
57155693 'centralnotice-view-allocation' => 'Bannertoewijzing bekijken',
57165694 'centralnotice-allocation-instructions' => 'Kies de omgeving waarvoor u de bannertoewijzing wilt bekijken:',
5717 - 'centralnotice-project-language' => 'Projecttaal',
57185695 'centralnotice-country' => 'Land',
57195696 'centralnotice-no-allocation' => 'Geen banners toegewezen.',
57205697 'centralnotice-allocation-description' => 'Bannertoewijzing voor $1.$2 in $3:',
@@ -5838,7 +5815,7 @@
58395816 'centralnotice-add-template' => 'Legg til en mal',
58405817 'centralnotice-show-notices' => 'Vis meldinger',
58415818 'centralnotice-list-templates' => 'Vis maler',
5842 - 'centralnotice-multiple_languages' => 'flere ($1)',
 5819+ 'centralnotice-multiple' => 'flere ($1)',
58435820 'centralnotice-translations' => 'Oversettelser',
58445821 'centralnotice-translate-to' => 'Oversett til',
58455822 'centralnotice-translate' => 'Oversett',
@@ -5930,7 +5907,6 @@
59315908 'centralnotice-allocation' => 'Tildeling',
59325909 'centralnotice-view-allocation' => 'Vis bannertildeling',
59335910 'centralnotice-allocation-instructions' => 'Velg miljøet du ønsker å se bannertildelingen for:',
5934 - 'centralnotice-project-language' => 'Prosjektspråk',
59355911 'centralnotice-country' => 'Land',
59365912 'centralnotice-no-allocation' => 'Ingen bannere tildelt.',
59375913 'centralnotice-allocation-description' => 'Bannertildeling for $1.$2 i $3:',
@@ -6093,7 +6069,7 @@
60946070 'centralnotice-add-template' => 'Dodaj szablon',
60956071 'centralnotice-show-notices' => 'Pokaż komunikaty',
60966072 'centralnotice-list-templates' => 'Lista szablonów',
6097 - 'centralnotice-multiple_languages' => 'wiele ($1)',
 6073+ 'centralnotice-multiple' => 'wiele ($1)',
60986074 'centralnotice-translations' => 'Tłumaczenia',
60996075 'centralnotice-translate-to' => 'Przetłumacz na',
61006076 'centralnotice-translate' => 'Przetłumacz',
@@ -6178,7 +6154,6 @@
61796155 'centralnotice-allocation' => 'Przydział',
61806156 'centralnotice-view-allocation' => 'Zobacz przydziały dla banera',
61816157 'centralnotice-allocation-instructions' => 'Określ środowisko, w którym chcesz zobaczyć baner',
6182 - 'centralnotice-project-language' => 'Język projektu',
61836158 'centralnotice-country' => 'Kraj',
61846159 'centralnotice-no-allocation' => 'Brak przypisanych banerów.',
61856160 'centralnotice-allocation-description' => 'Przydział banera dla $1.$2 w $3:',
@@ -6221,7 +6196,7 @@
62226197 'centralnotice-add-template' => 'Gionta në stamp',
62236198 'centralnotice-show-notices' => 'Mostra neuva',
62246199 'centralnotice-list-templates' => 'Lista stamp',
6225 - 'centralnotice-multiple_languages' => 'mùltipl ($1)',
 6200+ 'centralnotice-multiple' => 'mùltipl ($1)',
62266201 'centralnotice-translations' => 'Tradussion',
62276202 'centralnotice-translate-to' => 'Volté an',
62286203 'centralnotice-translate' => 'Volté',
@@ -6313,7 +6288,6 @@
63146289 'centralnotice-allocation' => 'Alocassion',
63156290 'centralnotice-view-allocation' => 'Vëdde la disposission dël tilèt',
63166291 'centralnotice-allocation-instructions' => "Ch'a serna l'ambient për ël qual a-j piaserìa smon-e la disposission ëd tilèt:",
6317 - 'centralnotice-project-language' => 'Lenga dël proget',
63186292 'centralnotice-country' => 'Nassion',
63196293 'centralnotice-no-allocation' => 'Gnun tilèt butà.',
63206294 'centralnotice-allocation-description' => 'Disposission dël tilèt për $1.$2 an $3:',
@@ -6397,7 +6371,7 @@
63986372 'centralnotice-add-template' => 'Adicionar um modelo',
63996373 'centralnotice-show-notices' => 'Mostrar avisos',
64006374 'centralnotice-list-templates' => 'Listar modelos',
6401 - 'centralnotice-multiple_languages' => 'múltiplas ($1)',
 6375+ 'centralnotice-multiple' => 'múltiplas ($1)',
64026376 'centralnotice-translations' => 'Traduções',
64036377 'centralnotice-translate-to' => 'Traduzir para',
64046378 'centralnotice-translate' => 'Traduzir',
@@ -6489,7 +6463,6 @@
64906464 'centralnotice-allocation' => 'Atribuição',
64916465 'centralnotice-view-allocation' => 'Ver atribuição de modelos',
64926466 'centralnotice-allocation-instructions' => 'Escolha o ambiente para o qual deseja ver a atribuição de modelos:',
6493 - 'centralnotice-project-language' => 'Língua do projecto',
64946467 'centralnotice-country' => 'País',
64956468 'centralnotice-no-allocation' => 'Não há modelos atribuídos.',
64966469 'centralnotice-allocation-description' => 'Atribuição de modelos para $1.$2 em $3:',
@@ -6533,7 +6506,7 @@
65346507 'centralnotice-add-template' => 'Adicionar um modelo',
65356508 'centralnotice-show-notices' => 'Mostrar avisos',
65366509 'centralnotice-list-templates' => 'Listar modelos',
6537 - 'centralnotice-multiple_languages' => 'múltiplas ($1)',
 6510+ 'centralnotice-multiple' => 'múltiplas ($1)',
65386511 'centralnotice-translations' => 'Traduções',
65396512 'centralnotice-translate-to' => 'Traduzir para',
65406513 'centralnotice-translate' => 'Traduzir',
@@ -6625,7 +6598,6 @@
66266599 'centralnotice-allocation' => 'Atribuição',
66276600 'centralnotice-view-allocation' => 'Ver atribuição de modelos',
66286601 'centralnotice-allocation-instructions' => 'Escolha o ambiente para o qual deseja ver a atribuição de modelos:',
6629 - 'centralnotice-project-language' => 'Língua do projeto',
66306602 'centralnotice-country' => 'País',
66316603 'centralnotice-no-allocation' => 'Não há modelos atribuídos.',
66326604 'centralnotice-allocation-description' => 'Atribuição de modelos para $1.$2 em $3:',
@@ -6667,7 +6639,7 @@
66686640 'centralnotice-add-template' => 'Plantillata yapay',
66696641 'centralnotice-show-notices' => 'Willaykunata rikuchiy',
66706642 'centralnotice-list-templates' => 'Plantillakunata sutisuyupi rikuchiy',
6671 - 'centralnotice-multiple_languages' => 'imaymana ($1)',
 6643+ 'centralnotice-multiple' => 'imaymana ($1)',
66726644 'centralnotice-translations' => "T'ikrasqakuna",
66736645 'centralnotice-translate-to' => "Kayman t'ikray:",
66746646 'centralnotice-translate' => "T'ikray",
@@ -6754,7 +6726,6 @@
67556727 'centralnotice-banner-hidable' => 'Ranuy/Pakana',
67566728 'centralnotice-banner-collapsible' => 'Thuñichina',
67576729 'centralnotice-countries' => 'Mama llaqtakuna',
6758 - 'centralnotice-project-language' => 'Ruraykamaypa rimaynin',
67596730 'centralnotice-country' => 'Mama llaqta',
67606731 'right-centralnotice-admin' => 'Chawpi willaykunata kamachiy',
67616732 'right-centralnotice-translate' => "Chawpi willaykunata t'ikray",
@@ -6904,7 +6875,7 @@
69056876 'centralnotice-add-template' => 'Добавить шаблон',
69066877 'centralnotice-show-notices' => 'Показать уведомления',
69076878 'centralnotice-list-templates' => 'Вывести список шаблонов',
6908 - 'centralnotice-multiple_languages' => 'несколько ($1)',
 6879+ 'centralnotice-multiple' => 'несколько ($1)',
69096880 'centralnotice-translations' => 'Переводы',
69106881 'centralnotice-translate-to' => 'Перевод на',
69116882 'centralnotice-translate' => 'Перевод',
@@ -6996,7 +6967,6 @@
69976968 'centralnotice-allocation' => 'Распределение',
69986969 'centralnotice-view-allocation' => 'Просмотр размещения баннеров',
69996970 'centralnotice-allocation-instructions' => 'Выберите среды, для которых вы хотите просмотреть размещение баннеров:',
7000 - 'centralnotice-project-language' => 'Язык проекта',
70016971 'centralnotice-country' => 'Страна',
70026972 'centralnotice-no-allocation' => 'Баннеры не размещены',
70036973 'centralnotice-allocation-description' => 'Размещение баннеров для $1.$2 в $3:',
@@ -7097,7 +7067,7 @@
70987068 'centralnotice-add-template' => 'Халыып эбэргэ',
70997069 'centralnotice-show-notices' => 'Биллэриилэри көрдөр',
71007070 'centralnotice-list-templates' => 'Халыыптар тиһиктэрэ',
7101 - 'centralnotice-multiple_languages' => 'хас да ($1)',
 7071+ 'centralnotice-multiple' => 'хас да ($1)',
71027072 'centralnotice-translations' => 'Тылбаастар',
71037073 'centralnotice-translate-to' => 'Манна тылбаас',
71047074 'centralnotice-translate' => 'Тылбаас',
@@ -7733,7 +7703,6 @@
77347704 'centralnotice-message' => 'செய்தி',
77357705 'centralnotice-clone-name' => 'பெயர்:',
77367706 'centralnotice-countries' => 'நாடுகள்',
7737 - 'centralnotice-project-language' => 'திட்டத்தின் மொழி',
77387707 'centralnotice-country' => 'நாடு',
77397708 'centralnotice-percentage' => 'சதவிகிதம்/விழுக்காடு',
77407709 'centralnotice-preferred' => 'விரும்பத்தக்கது',
@@ -7799,7 +7768,6 @@
78007769 'centralnotice-banner-anonymous' => 'అజ్ఞాత వాడుకరులు',
78017770 'centralnotice-banner-logged-in' => 'ప్రవేశించిన వాడుకరులు',
78027771 'centralnotice-countries' => 'దేశాలు',
7803 - 'centralnotice-project-language' => 'ప్రాజెక్టు భాష',
78047772 'centralnotice-country' => 'దేశం',
78057773 'centralnotice-percentage' => 'శాతం',
78067774 'right-centralnotice-admin' => 'కేంద్రీయ గమనికలని నిర్వహించగలగడం',
@@ -8210,7 +8178,7 @@
82118179 'centralnotice-add-template' => 'Magdagdag ng isang suleras',
82128180 'centralnotice-show-notices' => 'Ipagkita ang mga pabatid',
82138181 'centralnotice-list-templates' => 'Itala ang mga suleras',
8214 - 'centralnotice-multiple_languages' => 'maramihan ($1)',
 8182+ 'centralnotice-multiple' => 'maramihan ($1)',
82158183 'centralnotice-translations' => 'Mga salinwika',
82168184 'centralnotice-translate-to' => 'Isalinwika patungong',
82178185 'centralnotice-translate' => 'Isalinwika',
@@ -8302,7 +8270,6 @@
83038271 'centralnotice-allocation' => 'Paglalaan',
83048272 'centralnotice-view-allocation' => 'Tingnan ang kabahagi ng bandera',
83058273 'centralnotice-allocation-instructions' => 'Piliin ang kapaligirang nais mong tingnan ang kabahagi ng bandera:',
8306 - 'centralnotice-project-language' => 'Wika ng proyekto',
83078274 'centralnotice-country' => 'Bansa',
83088275 'centralnotice-no-allocation' => 'Walang bandera ibinahagi.',
83098276 'centralnotice-allocation-description' => 'Ang banderang kabahagi para sa $1.$2 sa loob ng $3:',
@@ -8633,7 +8600,7 @@
86348601 'centralnotice-add-template' => 'Zonta un modèl',
86358602 'centralnotice-show-notices' => 'Mostra notifiche',
86368603 'centralnotice-list-templates' => 'Elenca i modèi',
8637 - 'centralnotice-multiple_languages' => 'multipli ($1)',
 8604+ 'centralnotice-multiple' => 'multipli ($1)',
86388605 'centralnotice-translations' => 'Tradussioni',
86398606 'centralnotice-translate-to' => 'Tradusi con',
86408607 'centralnotice-translate' => 'Tradusi',
@@ -8740,7 +8707,7 @@
87418708 'centralnotice-add-template' => 'Thêm bảng',
87428709 'centralnotice-show-notices' => 'Xem các thông báo',
87438710 'centralnotice-list-templates' => 'Liệt kê các bảng',
8744 - 'centralnotice-multiple_languages' => 'đa ngữ ($1)',
 8711+ 'centralnotice-multiple' => 'đa ngữ ($1)',
87458712 'centralnotice-translations' => 'Bản dịch',
87468713 'centralnotice-translate-to' => 'Dịch ra',
87478714 'centralnotice-translate' => 'Biên dịch',
@@ -8821,7 +8788,6 @@
88228789 'centralnotice-allocation' => 'Phân bổ',
88238790 'centralnotice-view-allocation' => 'Xem cách phân phối bảng',
88248791 'centralnotice-allocation-instructions' => 'Chọn môi trường để xem cách phân phối bảng:',
8825 - 'centralnotice-project-language' => 'Ngôn ngữ dự án',
88268792 'centralnotice-country' => 'Quốc gia',
88278793 'centralnotice-no-allocation' => 'Chưa có phân phối bảng nào.',
88288794 'centralnotice-allocation-description' => 'Phân phối bảng cho $1.$2 tại $3:',
Index: branches/wmf/1.16wmf4/extensions/CentralNotice/CentralNotice.db.php
@@ -27,17 +27,23 @@
2828 }
2929
3030 $tables = array( 'cn_notices' );
 31+ if ( $project ) {
 32+ $tables[] = 'cn_notice_projects';
 33+ }
3134 if ( $language ) {
3235 $tables[] = 'cn_notice_languages';
3336 }
3437
3538 $conds = array(
36 - 'not_project' => array( '', $project ),
3739 'not_geo' => 0,
3840 "not_start <= $encTimestamp",
3941 "not_end >= $encTimestamp",
4042 );
4143 // Use whatever conditional arguments got passed in
 44+ if ( $project ) {
 45+ $conds[] = 'np_notice_id = cn_notices.not_id';
 46+ $conds['np_project'] = $project;
 47+ }
4248 if ( $language ) {
4349 $conds[] = 'nl_notice_id = cn_notices.not_id';
4450 $conds['nl_language'] = $language;
@@ -65,19 +71,25 @@
6672 // If a location is passed, also pull geotargeted campaigns that match the location
6773 if ( $location ) {
6874 $tables = array( 'cn_notices', 'cn_notice_countries' );
 75+ if ( $project ) {
 76+ $tables[] = 'cn_notice_projects';
 77+ }
6978 if ( $language ) {
7079 $tables[] = 'cn_notice_languages';
7180 }
7281
7382 // Use whatever conditional arguments got passed in
7483 $conds = array(
75 - 'not_project' => array( '', $project ),
7684 'not_geo' => 1,
7785 'nc_notice_id = cn_notices.not_id',
7886 'nc_country' => $location,
7987 "not_start <= $encTimestamp",
8088 "not_end >= $encTimestamp",
8189 );
 90+ if ( $project ) {
 91+ $conds[] = 'np_notice_id = cn_notices.not_id';
 92+ $conds['np_project'] = $project;
 93+ }
8294 if ( $language ) {
8395 $conds[] = "nl_notice_id = cn_notices.not_id";
8496 $conds['nl_language'] = $language;
Index: branches/wmf/1.16wmf4/extensions/CentralNotice/centralnotice.js
@@ -1,3 +1,10 @@
 2+function selectProjects( selectAll ) {
 3+ var selectBox = document.getElementById('projects[]');
 4+ var firstSelect = selectBox.options.length - 1;
 5+ for (var i = firstSelect; i >= 0; i--) {
 6+ selectBox.options[i].selected = selectAll;
 7+ }
 8+}
29 function selectLanguages( selectAll ) {
310 var selectBox = document.getElementById('project_languages[]');
411 var firstSelect = selectBox.options.length - 1;
Property changes on: branches/wmf/1.16wmf4/extensions/CentralNotice
___________________________________________________________________
Modified: svn:mergeinfo
512 Merged /trunk/extensions/CentralNotice:r76333,76347,76351,76356-76358,76361,76363,76462

Status & tagging log