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 @@ |
57 | 57 | * Generate JSON for the specified site |
58 | 58 | */ |
59 | 59 | function getJsonList() { |
60 | | - |
61 | | - // Quick short circuit to be able to show preferred notices |
62 | 60 | $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 ); |
72 | 69 | } |
73 | 70 | |
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 |
86 | 72 | if ( !$templates ) { |
87 | 73 | $templates = CentralNotice::selectNoticeTemplates( |
88 | 74 | $this->project, $this->language, $this->location ); |
Index: branches/wmf/1.16wmf4/extensions/CentralNotice/CentralNotice.php |
— | — | @@ -20,6 +20,7 @@ |
21 | 21 | 'commons', |
22 | 22 | 'meta', |
23 | 23 | 'wikispecies', |
| 24 | + 'test' |
24 | 25 | ); |
25 | 26 | |
26 | 27 | // Enable the notice-hosting infrastructure on this wiki... |
— | — | @@ -133,6 +134,8 @@ |
134 | 135 | $base . '/patches/patch-template_settings.sql' ); |
135 | 136 | $wgExtNewTables[] = array( 'cn_notice_countries', |
136 | 137 | $base . '/patches/patch-notice_countries.sql' ); |
| 138 | + $wgExtNewTables[] = array( 'cn_notice_projects', |
| 139 | + $base . '/patches/patch-notice_projects.sql' ); |
137 | 140 | } |
138 | 141 | } else { |
139 | 142 | if ( $updater->getDB()->getType() == 'mysql' ) { |
— | — | @@ -146,6 +149,8 @@ |
147 | 150 | $base . '/patches/patch-template_settings.sql' ) ); |
148 | 151 | $updater->addExtensionUpdate( array( 'addTable', 'cn_notice_countries', |
149 | 152 | $base . '/patches/patch-notice_countries.sql' ) ); |
| 153 | + $updater->addExtensionUpdate( array( 'addTable', 'cn_notice_projects', |
| 154 | + $base . '/patches/patch-notice_projects.sql' ) ); |
150 | 155 | } |
151 | 156 | } |
152 | 157 | return true; |
Index: branches/wmf/1.16wmf4/extensions/CentralNotice/SpecialCentralNotice.php |
— | — | @@ -140,14 +140,14 @@ |
141 | 141 | if ( $method == 'addNotice' ) { |
142 | 142 | $noticeName = $wgRequest->getVal( 'noticeName' ); |
143 | 143 | $start = $wgRequest->getArray( 'start' ); |
144 | | - $project_name = $wgRequest->getVal( 'project_name' ); |
| 144 | + $projects = $wgRequest->getArray( 'projects' ); |
145 | 145 | $project_languages = $wgRequest->getArray( 'project_languages' ); |
146 | 146 | $geotargeted = $wgRequest->getCheck( 'geotargeted' ); |
147 | 147 | $geo_countries = $wgRequest->getArray( 'geo_countries' ); |
148 | 148 | if ( $noticeName == '' ) { |
149 | 149 | $this->showError( 'centralnotice-null-string' ); |
150 | 150 | } else { |
151 | | - $this->addNotice( $noticeName, '0', $start, $project_name, |
| 151 | + $this->addNotice( $noticeName, '0', $start, $projects, |
152 | 152 | $project_languages, $geotargeted, $geo_countries ); |
153 | 153 | } |
154 | 154 | } |
— | — | @@ -282,10 +282,10 @@ |
283 | 283 | } |
284 | 284 | |
285 | 285 | /** |
286 | | - * Print out all campaigns found in db |
| 286 | + * Show all campaigns found in the database, show "Add a campaign" form |
287 | 287 | */ |
288 | 288 | function listNotices() { |
289 | | - global $wgOut, $wgUser, $wgLang, $wgRequest; |
| 289 | + global $wgOut, $wgUser, $wgLang, $wgRequest, $wgNoticeProjects; |
290 | 290 | |
291 | 291 | // Get connection |
292 | 292 | $dbr = wfGetDB( DB_SLAVE ); |
— | — | @@ -304,7 +304,6 @@ |
305 | 305 | 'not_end', |
306 | 306 | 'not_enabled', |
307 | 307 | 'not_preferred', |
308 | | - 'not_project', |
309 | 308 | 'not_locked' |
310 | 309 | ), |
311 | 310 | null, |
— | — | @@ -337,8 +336,8 @@ |
338 | 337 | // Table headers |
339 | 338 | $headers = array( |
340 | 339 | wfMsgHtml( 'centralnotice-notice-name' ), |
341 | | - wfMsgHtml( 'centralnotice-project-name' ), |
342 | | - wfMsgHtml( 'centralnotice-project-lang' ), |
| 340 | + wfMsgHtml( 'centralnotice-projects' ), |
| 341 | + wfMsgHtml( 'centralnotice-languages' ), |
343 | 342 | wfMsgHtml( 'centralnotice-start-date' ), |
344 | 343 | wfMsgHtml( 'centralnotice-end-date' ), |
345 | 344 | wfMsgHtml( 'centralnotice-enabled' ), |
— | — | @@ -359,15 +358,34 @@ |
360 | 359 | htmlspecialchars( $row->not_name ), |
361 | 360 | 'method=listNoticeDetail¬ice=' . urlencode( $row->not_name ) ); |
362 | 361 | |
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; |
365 | 383 | |
366 | 384 | // Languages |
367 | 385 | $project_langs = $this->getNoticeLanguages( $row->not_name ); |
368 | 386 | $language_count = count( $project_langs ); |
369 | 387 | $languageList = ''; |
370 | 388 | if ( $language_count > 3 ) { |
371 | | - $languageList = wfMsg ( 'centralnotice-multiple_languages', $language_count ); |
| 389 | + $languageList = wfMsg ( 'centralnotice-multiple', $language_count ); |
372 | 390 | } elseif ( $language_count > 0 ) { |
373 | 391 | $languageList = $wgLang->commaList( $project_langs ); |
374 | 392 | } |
— | — | @@ -463,11 +481,11 @@ |
464 | 482 | $startArray['hour'] . |
465 | 483 | $startArray['min'] . '00' |
466 | 484 | ; |
467 | | - $projectSelected = $wgRequest->getVal( 'project_name' ); |
| 485 | + $noticeProjects = $wgRequest->getArray( 'projects', array() ); |
468 | 486 | $noticeLanguages = $wgRequest->getArray( 'project_languages', array() ); |
469 | 487 | } else { // Defaults |
470 | 488 | $startTimestamp = null; |
471 | | - $projectSelected = ''; |
| 489 | + $noticeProjects = array(); |
472 | 490 | $noticeLanguages = array(); |
473 | 491 | } |
474 | 492 | |
— | — | @@ -500,12 +518,14 @@ |
501 | 519 | $htmlOut .= Xml::closeElement( 'tr' ); |
502 | 520 | // Project |
503 | 521 | $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 ) ); |
506 | 525 | $htmlOut .= Xml::closeElement( 'tr' ); |
507 | 526 | // Languages |
508 | 527 | $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' ) ); |
510 | 530 | $htmlOut .= Xml::tags( 'td', array(), |
511 | 531 | $this->languageMultiSelector( $noticeLanguages ) ); |
512 | 532 | $htmlOut .= Xml::closeElement( 'tr' ); |
— | — | @@ -544,6 +564,10 @@ |
545 | 565 | $wgOut->addHTML( $htmlOut ); |
546 | 566 | } |
547 | 567 | |
| 568 | + /** |
| 569 | + * Show the interface for viewing/editing an individual campaign |
| 570 | + * @param $notice The name of the campaign to view |
| 571 | + */ |
548 | 572 | function listNoticeDetail( $notice ) { |
549 | 573 | global $wgOut, $wgRequest, $wgUser; |
550 | 574 | |
— | — | @@ -648,10 +672,10 @@ |
649 | 673 | } |
650 | 674 | } |
651 | 675 | |
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 ); |
656 | 680 | } |
657 | 681 | |
658 | 682 | // Handle new project languages |
— | — | @@ -754,7 +778,6 @@ |
755 | 779 | 'not_end', |
756 | 780 | 'not_enabled', |
757 | 781 | 'not_preferred', |
758 | | - 'not_project', |
759 | 782 | 'not_locked', |
760 | 783 | 'not_geo' |
761 | 784 | ), |
— | — | @@ -783,7 +806,7 @@ |
784 | 807 | $isEnabled = $wgRequest->getCheck( 'enabled' ); |
785 | 808 | $isPreferred = $wgRequest->getCheck( 'preferred' ); |
786 | 809 | $isLocked = $wgRequest->getCheck( 'locked' ); |
787 | | - $projectSelected = $wgRequest->getVal( 'project_name' ); |
| 810 | + $noticeProjects = $wgRequest->getArray( 'projects', array() ); |
788 | 811 | $noticeLanguages = $wgRequest->getArray( 'project_languages', array() ); |
789 | 812 | $isGeotargeted = $wgRequest->getCheck( 'geotargeted' ); |
790 | 813 | $countries = $wgRequest->getArray( 'geo_countries', array() ); |
— | — | @@ -793,7 +816,7 @@ |
794 | 817 | $isEnabled = ( $row->not_enabled == '1' ); |
795 | 818 | $isPreferred = ( $row->not_preferred == '1' ); |
796 | 819 | $isLocked = ( $row->not_locked == '1' ); |
797 | | - $projectSelected = $row->not_project; |
| 820 | + $noticeProjects = $this->getNoticeProjects( $notice ); |
798 | 821 | $noticeLanguages = $this->getNoticeLanguages( $notice ); |
799 | 822 | $isGeotargeted = ( $row->not_geo == '1' ); |
800 | 823 | $countries = $this->getNoticeCountries( $notice ); |
— | — | @@ -827,12 +850,15 @@ |
828 | 851 | $htmlOut .= Xml::closeElement( 'tr' ); |
829 | 852 | // Project |
830 | 853 | $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 ) ); |
833 | 858 | $htmlOut .= Xml::closeElement( 'tr' ); |
834 | 859 | // Languages |
835 | 860 | $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' ) ); |
837 | 863 | $htmlOut .= Xml::tags( 'td', array(), |
838 | 864 | $this->languageMultiSelector( $noticeLanguages ) ); |
839 | 865 | $htmlOut .= Xml::closeElement( 'tr' ); |
— | — | @@ -1051,6 +1077,7 @@ |
1052 | 1078 | $campaignResults1 = $dbr->select( |
1053 | 1079 | array( |
1054 | 1080 | 'cn_notices', |
| 1081 | + 'cn_notice_projects', |
1055 | 1082 | 'cn_notice_languages' |
1056 | 1083 | ), |
1057 | 1084 | array( |
— | — | @@ -1061,9 +1088,10 @@ |
1062 | 1089 | "not_end >= $encTimestamp", |
1063 | 1090 | 'not_enabled = 1', // enabled |
1064 | 1091 | 'not_geo = 0', // not geotargeted |
| 1092 | + 'np_notice_id = cn_notices.not_id', |
| 1093 | + 'np_project' => $project, |
1065 | 1094 | 'nl_notice_id = cn_notices.not_id', |
1066 | | - 'nl_language' => $language, |
1067 | | - 'not_project' => array( '', $project ) |
| 1095 | + 'nl_language' => $language |
1068 | 1096 | ), |
1069 | 1097 | __METHOD__ |
1070 | 1098 | ); |
— | — | @@ -1081,6 +1109,7 @@ |
1082 | 1110 | $campaignResults2 = $dbr->select( |
1083 | 1111 | array( |
1084 | 1112 | 'cn_notices', |
| 1113 | + 'cn_notice_projects', |
1085 | 1114 | 'cn_notice_languages', |
1086 | 1115 | 'cn_notice_countries' |
1087 | 1116 | ), |
— | — | @@ -1094,9 +1123,10 @@ |
1095 | 1124 | 'not_geo = 1', // geotargeted |
1096 | 1125 | 'nc_notice_id = cn_notices.not_id', |
1097 | 1126 | 'nc_country' => $location, |
| 1127 | + 'np_notice_id = cn_notices.not_id', |
| 1128 | + 'np_project' => $project, |
1098 | 1129 | 'nl_notice_id = cn_notices.not_id', |
1099 | | - 'nl_language' => $language, |
1100 | | - 'not_project' => array( '', $project ) |
| 1130 | + 'nl_language' => $language |
1101 | 1131 | ), |
1102 | 1132 | __METHOD__ |
1103 | 1133 | ); |
— | — | @@ -1114,12 +1144,15 @@ |
1115 | 1145 | return $templates; |
1116 | 1146 | } |
1117 | 1147 | |
1118 | | - function addNotice( $noticeName, $enabled, $start, $project_name, |
| 1148 | + function addNotice( $noticeName, $enabled, $start, $projects, |
1119 | 1149 | $project_languages, $geotargeted, $geo_countries ) |
1120 | 1150 | { |
1121 | 1151 | if ( $this->noticeExists( $noticeName ) ) { |
1122 | 1152 | $this->showError( 'centralnotice-notice-exists' ); |
1123 | 1153 | return; |
| 1154 | + } elseif ( empty( $projects ) ) { |
| 1155 | + $this->showError( 'centralnotice-no-project' ); |
| 1156 | + return; |
1124 | 1157 | } elseif ( empty( $project_languages ) ) { |
1125 | 1158 | $this->showError( 'centralnotice-no-language' ); |
1126 | 1159 | return; |
— | — | @@ -1152,12 +1185,19 @@ |
1153 | 1186 | 'not_enabled' => $enabled, |
1154 | 1187 | 'not_start' => $dbw->timestamp( $startTs ), |
1155 | 1188 | 'not_end' => $dbw->timestamp( $endTs ), |
1156 | | - 'not_project' => $project_name, |
1157 | 1189 | 'not_geo' => $geotargeted |
1158 | 1190 | ) |
1159 | 1191 | ); |
1160 | 1192 | $not_id = $dbw->insertId(); |
1161 | 1193 | |
| 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 | + |
1162 | 1202 | // Do multi-row insert for campaign languages |
1163 | 1203 | $insertArray = array(); |
1164 | 1204 | foreach( $project_languages as $code ) { |
— | — | @@ -1249,6 +1289,21 @@ |
1250 | 1290 | return null; |
1251 | 1291 | } |
1252 | 1292 | } |
| 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 | + } |
1253 | 1308 | |
1254 | 1309 | function getNoticeLanguages( $noticeName ) { |
1255 | 1310 | $dbr = wfGetDB( DB_SLAVE ); |
— | — | @@ -1406,26 +1461,6 @@ |
1407 | 1462 | ); |
1408 | 1463 | } |
1409 | 1464 | |
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 | | - |
1430 | 1465 | /** |
1431 | 1466 | * Generates a multiple select list of all languages. |
1432 | 1467 | * @param $selected The language codes of the selected languages |
— | — | @@ -1484,6 +1519,54 @@ |
1485 | 1520 | return $htmlOut; |
1486 | 1521 | } |
1487 | 1522 | |
| 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 | + |
1488 | 1571 | function getProjectName( $value ) { |
1489 | 1572 | return $value; // @fixme -- use wfMsg() |
1490 | 1573 | } |
— | — | @@ -1497,6 +1580,35 @@ |
1498 | 1581 | ) |
1499 | 1582 | ); |
1500 | 1583 | } |
| 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 | + } |
1501 | 1613 | |
1502 | 1614 | function updateProjectLanguages( $notice, $newLanguages ) { |
1503 | 1615 | $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. |
2 | 3 | |
3 | 4 | CREATE TABLE IF NOT EXISTS /*$wgDBprefix*/cn_notice_languages ( |
4 | 5 | `nl_notice_id` int unsigned NOT NULL, |
Index: branches/wmf/1.16wmf4/extensions/CentralNotice/CentralNotice.i18n.php |
— | — | @@ -34,7 +34,8 @@ |
35 | 35 | 'centralnotice-add-template' => 'Add a banner', |
36 | 36 | 'centralnotice-show-notices' => 'Show campaigns', |
37 | 37 | 'centralnotice-list-templates' => 'List banners', |
38 | | - 'centralnotice-multiple_languages' => 'multiple ($1)', |
| 38 | + 'centralnotice-multiple' => 'Multiple ($1)', |
| 39 | + 'centralnotice-all-projects' => 'All projects', |
39 | 40 | 'centralnotice-language-listing' => '$1 - $2', |
40 | 41 | 'centralnotice-translations' => 'Translations', |
41 | 42 | 'centralnotice-translate-to' => 'Translate to', |
— | — | @@ -52,6 +53,7 @@ |
53 | 54 | 'centralnotice-notice-exists' => 'Campaign already exists. |
54 | 55 | Not adding.', |
55 | 56 | '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.', |
56 | 58 | 'centralnotice-template-exists' => 'Banner already exists. |
57 | 59 | Not adding.', |
58 | 60 | 'centralnotice-notice-doesnt-exist' => 'Campaign does not exist.', |
— | — | @@ -127,7 +129,8 @@ |
128 | 130 | 'centralnotice-allocation' => 'Allocation', |
129 | 131 | 'centralnotice-view-allocation' => 'View banner allocation', |
130 | 132 | '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', |
132 | 135 | 'centralnotice-country' => 'Country', |
133 | 136 | 'centralnotice-no-allocation' => 'No banners allocated.', |
134 | 137 | 'centralnotice-allocation-description' => 'Banner allocation for $1.$2 in $3:', |
— | — | @@ -168,7 +171,7 @@ |
169 | 172 | 'centralnotice-remove' => '{{Identical|Remove}}', |
170 | 173 | 'centralnotice-translate-heading' => 'Fieldset label. $1 is a name of a template.', |
171 | 174 | '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.', |
173 | 176 | '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.', |
174 | 177 | 'centralnotice-translate' => '{{Identical|Translate}}', |
175 | 178 | '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 @@ |
582 | 585 | 'centralnotice-add-template' => 'Ҡалып өҫтәргә', |
583 | 586 | 'centralnotice-show-notices' => 'Белдереүҙәрҙе күрһәтергә', |
584 | 587 | 'centralnotice-list-templates' => 'Ҡалыптар исемлеге', |
585 | | - 'centralnotice-multiple_languages' => 'бер нисә ($1)', |
| 588 | + 'centralnotice-multiple' => 'бер нисә ($1)', |
586 | 589 | 'centralnotice-translations' => 'Тәржемәләр', |
587 | 590 | 'centralnotice-translate-to' => 'Тәржемә:', |
588 | 591 | 'centralnotice-translate' => 'Тәржемә', |
— | — | @@ -645,7 +648,6 @@ |
646 | 649 | 'centralnotice-countries' => 'Илдәр', |
647 | 650 | 'centralnotice-allocation' => 'Урынлашыу', |
648 | 651 | 'centralnotice-view-allocation' => 'Баннерҙарҙың урынлашыуын ҡарау', |
649 | | - 'centralnotice-project-language' => 'Проект теле', |
650 | 652 | 'centralnotice-country' => 'Ил', |
651 | 653 | 'centralnotice-no-allocation' => 'Баннерҙар урынлаштырылмаған', |
652 | 654 | 'centralnotice-allocation-description' => '$1.$2 өсөн $3 эсендә баннерҙар урынлашыуы', |
— | — | @@ -719,7 +721,7 @@ |
720 | 722 | 'centralnotice-add-template' => 'Дадаць паведамленьне', |
721 | 723 | 'centralnotice-show-notices' => 'Паказаць кампаніі', |
722 | 724 | 'centralnotice-list-templates' => 'Сьпіс паведамленьняў', |
723 | | - 'centralnotice-multiple_languages' => 'некалькі ($1)', |
| 725 | + 'centralnotice-multiple' => 'некалькі ($1)', |
724 | 726 | 'centralnotice-translations' => 'Пераклады', |
725 | 727 | 'centralnotice-translate-to' => 'Пераклад на', |
726 | 728 | 'centralnotice-translate' => 'Пераклад', |
— | — | @@ -811,7 +813,6 @@ |
812 | 814 | 'centralnotice-allocation' => 'Прызначэньне', |
813 | 815 | 'centralnotice-view-allocation' => 'Паказаць разьмяшчэньне банэра', |
814 | 816 | 'centralnotice-allocation-instructions' => 'Выберыце рэжым, для якога Вы жадаеце праглядзець разьмяшчэньне банэра:', |
815 | | - 'centralnotice-project-language' => 'Мова праекту', |
816 | 817 | 'centralnotice-country' => 'Краіна', |
817 | 818 | 'centralnotice-no-allocation' => 'Няма разьмешчаных банэраў.', |
818 | 819 | 'centralnotice-allocation-description' => 'Разьмяшчэньне банэра для $1.$2 у $3:', |
— | — | @@ -1020,7 +1021,7 @@ |
1021 | 1022 | 'centralnotice-add-template' => 'Ouzhpennañ ur patrom', |
1022 | 1023 | 'centralnotice-show-notices' => 'Diskouez ar menegoù', |
1023 | 1024 | 'centralnotice-list-templates' => 'Rollañ ar patromoù', |
1024 | | - 'centralnotice-multiple_languages' => 'lies ($1)', |
| 1025 | + 'centralnotice-multiple' => 'lies ($1)', |
1025 | 1026 | 'centralnotice-translations' => 'Troidigezhioù', |
1026 | 1027 | 'centralnotice-translate-to' => 'Treiñ e', |
1027 | 1028 | 'centralnotice-translate' => 'Treiñ', |
— | — | @@ -1112,7 +1113,6 @@ |
1113 | 1114 | 'centralnotice-allocation' => 'Skorenn', |
1114 | 1115 | 'centralnotice-view-allocation' => 'Gwelout skorenn ar giton', |
1115 | 1116 | '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', |
1117 | 1117 | 'centralnotice-country' => 'Bro', |
1118 | 1118 | 'centralnotice-no-allocation' => 'Giton skorennet ebet.', |
1119 | 1119 | 'centralnotice-allocation-description' => 'Skorenn giton evit $1.$2 e $3 :', |
— | — | @@ -1154,7 +1154,7 @@ |
1155 | 1155 | 'centralnotice-add-template' => 'Dodaj šablon', |
1156 | 1156 | 'centralnotice-show-notices' => 'Prikaži obavještenja', |
1157 | 1157 | 'centralnotice-list-templates' => 'Spisak šablona', |
1158 | | - 'centralnotice-multiple_languages' => 'više ($1)', |
| 1158 | + 'centralnotice-multiple' => 'više ($1)', |
1159 | 1159 | 'centralnotice-translations' => 'Prijevodi', |
1160 | 1160 | 'centralnotice-translate-to' => 'Prevedi na', |
1161 | 1161 | 'centralnotice-translate' => 'Prijevod', |
— | — | @@ -1246,7 +1246,6 @@ |
1247 | 1247 | 'centralnotice-allocation' => 'Raspoređivanje', |
1248 | 1248 | 'centralnotice-view-allocation' => 'Pogledaj dodjelu obavještenja', |
1249 | 1249 | 'centralnotice-allocation-instructions' => 'Odaberi okruženje za koje želite vidjeti dodjelu obavještenja:', |
1250 | | - 'centralnotice-project-language' => 'Jezik projekta', |
1251 | 1250 | 'centralnotice-country' => 'Država', |
1252 | 1251 | 'centralnotice-no-allocation' => 'Nema dodijeljenih obavještenja.', |
1253 | 1252 | 'centralnotice-allocation-description' => 'Dodjela obavještenja za $1.$2 u $3:', |
— | — | @@ -1388,7 +1387,7 @@ |
1389 | 1388 | 'centralnotice-add-template' => 'Přidat šablonu', |
1390 | 1389 | 'centralnotice-show-notices' => 'Zobrazit oznámení', |
1391 | 1390 | 'centralnotice-list-templates' => 'Seznam šablon', |
1392 | | - 'centralnotice-multiple_languages' => 'více ($1)', |
| 1391 | + 'centralnotice-multiple' => 'více ($1)', |
1393 | 1392 | 'centralnotice-translations' => 'Překlady', |
1394 | 1393 | 'centralnotice-translate-to' => 'Přeložit do jazyka', |
1395 | 1394 | 'centralnotice-translate' => 'Přeložit', |
— | — | @@ -1471,7 +1470,6 @@ |
1472 | 1471 | 'centralnotice-allocation' => 'Přidělení', |
1473 | 1472 | 'centralnotice-view-allocation' => 'Zobrazit přidělení bannerů', |
1474 | 1473 | 'centralnotice-allocation-instructions' => 'Vyberte si prostředí, pro které chcete zobrazit přidělení bannerů:', |
1475 | | - 'centralnotice-project-language' => 'Jazyk projektu', |
1476 | 1474 | 'centralnotice-country' => 'Země', |
1477 | 1475 | 'centralnotice-no-allocation' => 'Žádné bannery nejsou přiděleny.', |
1478 | 1476 | 'centralnotice-allocation-description' => 'Přidělení bannerů na $1.$2 v $3:', |
— | — | @@ -1614,7 +1612,7 @@ |
1615 | 1613 | 'centralnotice-add-template' => 'Hinzufügen einer Vorlage', |
1616 | 1614 | 'centralnotice-show-notices' => 'Zeige Meldungen', |
1617 | 1615 | 'centralnotice-list-templates' => 'Vorlagen auflisten', |
1618 | | - 'centralnotice-multiple_languages' => 'mehrere ($1)', |
| 1616 | + 'centralnotice-multiple' => 'mehrere ($1)', |
1619 | 1617 | 'centralnotice-translations' => 'Übersetzungen', |
1620 | 1618 | 'centralnotice-translate-to' => 'Übersetzen in', |
1621 | 1619 | 'centralnotice-translate' => 'Übersetzen', |
— | — | @@ -1706,7 +1704,6 @@ |
1707 | 1705 | 'centralnotice-allocation' => 'Anordnung', |
1708 | 1706 | 'centralnotice-view-allocation' => 'Anordnung der Vorlagen ansehen', |
1709 | 1707 | 'centralnotice-allocation-instructions' => 'Die Ausgabeumgebung für die Ansicht der Vorlagenanordnung auswählen:', |
1710 | | - 'centralnotice-project-language' => 'Projektsprache', |
1711 | 1708 | 'centralnotice-country' => 'Land', |
1712 | 1709 | 'centralnotice-no-allocation' => 'Es wurden keine Vorlagen angeordnet.', |
1713 | 1710 | 'centralnotice-allocation-description' => 'Vorlagenanordnung für $1.$2 in $3:', |
— | — | @@ -1847,7 +1844,7 @@ |
1848 | 1845 | 'centralnotice-add-template' => 'Pśedłogu pśidaś', |
1849 | 1846 | 'centralnotice-show-notices' => 'Powěźeńki pokazaś', |
1850 | 1847 | 'centralnotice-list-templates' => 'Pśedłogi nalistowaś', |
1851 | | - 'centralnotice-multiple_languages' => 'někotare ($1)', |
| 1848 | + 'centralnotice-multiple' => 'někotare ($1)', |
1852 | 1849 | 'centralnotice-translations' => 'Pśełožki', |
1853 | 1850 | 'centralnotice-translate-to' => 'Pśełoźiś do', |
1854 | 1851 | 'centralnotice-translate' => 'Pśełožiś', |
— | — | @@ -2069,7 +2066,7 @@ |
2070 | 2067 | 'centralnotice-add-template' => 'Aldoni ŝablonon', |
2071 | 2068 | 'centralnotice-show-notices' => 'Montri noticojn', |
2072 | 2069 | 'centralnotice-list-templates' => 'Rigardi ŝablonojn', |
2073 | | - 'centralnotice-multiple_languages' => 'multlingve ($1)', |
| 2070 | + 'centralnotice-multiple' => 'multlingve ($1)', |
2074 | 2071 | 'centralnotice-translations' => 'Tradukoj', |
2075 | 2072 | 'centralnotice-translate-to' => 'Traduki al', |
2076 | 2073 | 'centralnotice-translate' => 'Traduki', |
— | — | @@ -2152,7 +2149,6 @@ |
2153 | 2150 | 'centralnotice-banner-hidable' => 'Statika/Kaŝebla', |
2154 | 2151 | 'centralnotice-banner-collapsible' => 'Maletendebla', |
2155 | 2152 | 'centralnotice-countries' => 'Landoj', |
2156 | | - 'centralnotice-project-language' => 'Lingvo de projekto', |
2157 | 2153 | 'centralnotice-country' => 'Lando', |
2158 | 2154 | 'centralnotice-no-allocation' => 'Neniuj rekamrubandoj estas asignitaj.', |
2159 | 2155 | 'right-centralnotice-admin' => 'Administri centralajn noticojn', |
— | — | @@ -2198,7 +2194,7 @@ |
2199 | 2195 | 'centralnotice-add-template' => 'Añadir una plantilla', |
2200 | 2196 | 'centralnotice-show-notices' => 'Mostrar avisos', |
2201 | 2197 | 'centralnotice-list-templates' => 'Listar plantillas', |
2202 | | - 'centralnotice-multiple_languages' => 'múltiples ($1)', |
| 2198 | + 'centralnotice-multiple' => 'múltiples ($1)', |
2203 | 2199 | 'centralnotice-translations' => 'Traducciones', |
2204 | 2200 | 'centralnotice-translate-to' => 'Traducir al', |
2205 | 2201 | 'centralnotice-translate' => 'Traducir', |
— | — | @@ -2436,7 +2432,6 @@ |
2437 | 2433 | 'centralnotice-clone-notice' => 'Txantiloia honen kopia sortu', |
2438 | 2434 | 'centralnotice-clone-name' => 'Izena:', |
2439 | 2435 | 'centralnotice-countries' => 'Herrialdeak', |
2440 | | - 'centralnotice-project-language' => 'Proiektuaren hizkuntza', |
2441 | 2436 | 'centralnotice-country' => 'Herrialdea', |
2442 | 2437 | 'centralnotice-percentage' => 'Ehunekoa', |
2443 | 2438 | ); |
— | — | @@ -2474,7 +2469,7 @@ |
2475 | 2470 | 'centralnotice-add-template' => 'اضافه کردن الگو', |
2476 | 2471 | 'centralnotice-show-notices' => 'نمایش اعلانها', |
2477 | 2472 | 'centralnotice-list-templates' => 'فهرست الگوها', |
2478 | | - 'centralnotice-multiple_languages' => 'چندگانه ($1)', |
| 2473 | + 'centralnotice-multiple' => 'چندگانه ($1)', |
2479 | 2474 | 'centralnotice-translations' => 'ترجمهها', |
2480 | 2475 | 'centralnotice-translate-to' => 'ترجمه به', |
2481 | 2476 | 'centralnotice-translate' => 'ترجمه کردن', |
— | — | @@ -2566,7 +2561,6 @@ |
2567 | 2562 | 'centralnotice-allocation' => 'تخصیص', |
2568 | 2563 | 'centralnotice-view-allocation' => 'نمایش تخصیص آگهی', |
2569 | 2564 | 'centralnotice-allocation-instructions' => 'محیطی که میخواهید تخصیص نشان را برایش مشاهده کنید، برگزینید:', |
2570 | | - 'centralnotice-project-language' => 'زبان پروژه', |
2571 | 2565 | 'centralnotice-country' => 'کشور', |
2572 | 2566 | 'centralnotice-no-allocation' => 'هیچ آگهیای اختصاص نیافته است.', |
2573 | 2567 | 'centralnotice-allocation-description' => 'اختصاص آگهی برای $1.$2 در $3:', |
— | — | @@ -2711,7 +2705,7 @@ |
2712 | 2706 | 'centralnotice-add-template' => 'Ajouter un modèle', |
2713 | 2707 | 'centralnotice-show-notices' => 'Afficher les avis', |
2714 | 2708 | 'centralnotice-list-templates' => 'Lister les modèles', |
2715 | | - 'centralnotice-multiple_languages' => 'multiple ($1)', |
| 2709 | + 'centralnotice-multiple' => 'multiple ($1)', |
2716 | 2710 | 'centralnotice-translations' => 'Traductions', |
2717 | 2711 | 'centralnotice-translate-to' => 'Traduire en', |
2718 | 2712 | 'centralnotice-translate' => 'Traduire', |
— | — | @@ -2803,7 +2797,6 @@ |
2804 | 2798 | 'centralnotice-allocation' => 'Allocation', |
2805 | 2799 | 'centralnotice-view-allocation' => 'Voir la disposition de bannière', |
2806 | 2800 | 'centralnotice-allocation-instructions' => 'Choisissez l’environnement pour lequel vous souhaitez afficher la disposition de bannière :', |
2807 | | - 'centralnotice-project-language' => 'Langue du projet', |
2808 | 2801 | 'centralnotice-country' => 'Pays', |
2809 | 2802 | 'centralnotice-no-allocation' => 'Pas de bannières disposées.', |
2810 | 2803 | 'centralnotice-allocation-description' => 'Disposition de bannière pour $1.$2 en $3 :', |
— | — | @@ -2845,7 +2838,7 @@ |
2846 | 2839 | 'centralnotice-add-template' => 'Apondre una baniére', |
2847 | 2840 | 'centralnotice-show-notices' => 'Fâre vêre les propagandes', |
2848 | 2841 | 'centralnotice-list-templates' => 'Listar les baniéres', |
2849 | | - 'centralnotice-multiple_languages' => 'un mouél ($1)', |
| 2842 | + 'centralnotice-multiple' => 'un mouél ($1)', |
2850 | 2843 | 'centralnotice-translations' => 'Traduccions', |
2851 | 2844 | 'centralnotice-translate-to' => 'Traduire en', |
2852 | 2845 | 'centralnotice-translate' => 'Traduire', |
— | — | @@ -2936,7 +2929,6 @@ |
2937 | 2930 | 'centralnotice-allocation' => 'Alocacion', |
2938 | 2931 | 'centralnotice-view-allocation' => 'Vêre l’alocacion de baniére', |
2939 | 2932 | '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', |
2941 | 2933 | 'centralnotice-country' => 'Payis', |
2942 | 2934 | 'centralnotice-no-allocation' => 'Gins de baniére balyê.', |
2943 | 2935 | 'centralnotice-allocation-description' => 'Alocacion de baniére por $1.$2 en $3 :', |
— | — | @@ -2983,7 +2975,7 @@ |
2984 | 2976 | 'centralnotice-add-template' => 'Engadir un modelo', |
2985 | 2977 | 'centralnotice-show-notices' => 'Amosar os avisos', |
2986 | 2978 | 'centralnotice-list-templates' => 'Listar os modelos', |
2987 | | - 'centralnotice-multiple_languages' => 'múltiple ($1)', |
| 2979 | + 'centralnotice-multiple' => 'múltiple ($1)', |
2988 | 2980 | 'centralnotice-translations' => 'Traducións', |
2989 | 2981 | 'centralnotice-translate-to' => 'Traducir ao', |
2990 | 2982 | 'centralnotice-translate' => 'Traducir', |
— | — | @@ -3075,7 +3067,6 @@ |
3076 | 3068 | 'centralnotice-allocation' => 'Asignación', |
3077 | 3069 | 'centralnotice-view-allocation' => 'Ollar a asignación do modelo', |
3078 | 3070 | 'centralnotice-allocation-instructions' => 'Escolla o entorno onde desexa mostrar a asignación do modelo:', |
3079 | | - 'centralnotice-project-language' => 'Lingua do proxecto', |
3080 | 3071 | 'centralnotice-country' => 'País', |
3081 | 3072 | 'centralnotice-no-allocation' => 'Non hai asignación de modelos.', |
3082 | 3073 | 'centralnotice-allocation-description' => 'Asignación de modelos de $1.$2 en $3:', |
— | — | @@ -3142,7 +3133,7 @@ |
3143 | 3134 | 'centralnotice-add-template' => 'Zuefiege vun ere Vorlag', |
3144 | 3135 | 'centralnotice-show-notices' => 'Zeig Mäldige', |
3145 | 3136 | 'centralnotice-list-templates' => 'Vorlage uflischte', |
3146 | | - 'centralnotice-multiple_languages' => 'mehreri ($1)', |
| 3137 | + 'centralnotice-multiple' => 'mehreri ($1)', |
3147 | 3138 | 'centralnotice-translations' => 'Ibersetzige', |
3148 | 3139 | 'centralnotice-translate-to' => 'Ibersetze in', |
3149 | 3140 | 'centralnotice-translate' => 'Ibersetze', |
— | — | @@ -3233,7 +3224,6 @@ |
3234 | 3225 | 'centralnotice-allocation' => 'Zuewysig', |
3235 | 3226 | 'centralnotice-view-allocation' => 'Aaornig vu dr Banner aaluege', |
3236 | 3227 | 'centralnotice-allocation-instructions' => 'D Umgäbig uuswehle, wu d Verteilig vu dr Banner witt aaluege:', |
3237 | | - 'centralnotice-project-language' => 'Projäktsproch', |
3238 | 3228 | 'centralnotice-country' => 'Land', |
3239 | 3229 | 'centralnotice-no-allocation' => 'Kei Banner aagordnet.', |
3240 | 3230 | 'centralnotice-allocation-description' => 'Banneraaornig fir $1.$2 in $3:', |
— | — | @@ -3375,7 +3365,7 @@ |
3376 | 3366 | 'centralnotice-add-template' => 'Dodaj predložak', |
3377 | 3367 | 'centralnotice-show-notices' => 'Pokaži obavijesti', |
3378 | 3368 | 'centralnotice-list-templates' => 'Popis predložaka', |
3379 | | - 'centralnotice-multiple_languages' => 'više ($1)', |
| 3369 | + 'centralnotice-multiple' => 'više ($1)', |
3380 | 3370 | 'centralnotice-translations' => 'Prijevodi', |
3381 | 3371 | 'centralnotice-translate-to' => 'Prevedi na', |
3382 | 3372 | 'centralnotice-translate' => 'Prevedi', |
— | — | @@ -3467,7 +3457,6 @@ |
3468 | 3458 | 'centralnotice-allocation' => 'Dodjela', |
3469 | 3459 | 'centralnotice-view-allocation' => 'Prikaži raspodjelu obavijesti', |
3470 | 3460 | 'centralnotice-allocation-instructions' => 'Odaberi okruženje za koje želite vidjeti dodjelu obavijesti:', |
3471 | | - 'centralnotice-project-language' => 'Jezik projekta', |
3472 | 3461 | 'centralnotice-country' => 'Država', |
3473 | 3462 | 'centralnotice-no-allocation' => 'Nema dodijeljenih obavijesti.', |
3474 | 3463 | 'centralnotice-allocation-description' => 'Dodjela obavijesti za $1.$2 u $3:', |
— | — | @@ -3508,7 +3497,7 @@ |
3509 | 3498 | 'centralnotice-add-template' => 'Předłohu přidać', |
3510 | 3499 | 'centralnotice-show-notices' => 'Zdźělenki pokazać', |
3511 | 3500 | 'centralnotice-list-templates' => 'Předłohi nalistować', |
3512 | | - 'centralnotice-multiple_languages' => 'wjacore ($1)', |
| 3501 | + 'centralnotice-multiple' => 'wjacore ($1)', |
3513 | 3502 | 'centralnotice-translations' => 'Přełožki', |
3514 | 3503 | 'centralnotice-translate-to' => 'Přełožić do', |
3515 | 3504 | 'centralnotice-translate' => 'Přełožić', |
— | — | @@ -3684,7 +3673,6 @@ |
3685 | 3674 | 'centralnotice-clone-name' => 'Név:', |
3686 | 3675 | 'centralnotice-preview-all-template-translations' => 'A sablon összes fordításának megtekintése', |
3687 | 3676 | 'centralnotice-banner-anonymous' => 'Névtelen szerkesztők', |
3688 | | - 'centralnotice-project-language' => 'A projekt nyelve', |
3689 | 3677 | 'centralnotice-percentage' => 'Százalék', |
3690 | 3678 | 'right-centralnotice-admin' => 'központi üzenetek beállítása', |
3691 | 3679 | 'right-centralnotice-translate' => 'központi üzenetek fordítása', |
— | — | @@ -3721,7 +3709,7 @@ |
3722 | 3710 | 'centralnotice-add-template' => 'Adder un bandiera', |
3723 | 3711 | 'centralnotice-show-notices' => 'Monstrar campanias', |
3724 | 3712 | 'centralnotice-list-templates' => 'Listar bandieras', |
3725 | | - 'centralnotice-multiple_languages' => 'multiple ($1)', |
| 3713 | + 'centralnotice-multiple' => 'multiple ($1)', |
3726 | 3714 | 'centralnotice-translations' => 'Traductiones', |
3727 | 3715 | 'centralnotice-translate-to' => 'Traducer in', |
3728 | 3716 | 'centralnotice-translate' => 'Traducer', |
— | — | @@ -3813,7 +3801,6 @@ |
3814 | 3802 | 'centralnotice-allocation' => 'Allocation', |
3815 | 3803 | 'centralnotice-view-allocation' => 'Vider allocation de bandieras', |
3816 | 3804 | 'centralnotice-allocation-instructions' => 'Selige le ambiente pro le qual tu vole vider le allocation de bandieras:', |
3817 | | - 'centralnotice-project-language' => 'Lingua del projecto', |
3818 | 3805 | 'centralnotice-country' => 'Pais', |
3819 | 3806 | 'centralnotice-no-allocation' => 'Nulle bandiera allocate.', |
3820 | 3807 | 'centralnotice-allocation-description' => 'Allocation de bandieras pro $1.$2 in $3:', |
— | — | @@ -3859,7 +3846,7 @@ |
3860 | 3847 | 'centralnotice-add-template' => 'Tambah templat', |
3861 | 3848 | 'centralnotice-show-notices' => 'Tampilkan pengumuman', |
3862 | 3849 | 'centralnotice-list-templates' => 'Daftar templat', |
3863 | | - 'centralnotice-multiple_languages' => 'ganda ($1)', |
| 3850 | + 'centralnotice-multiple' => 'ganda ($1)', |
3864 | 3851 | 'centralnotice-translations' => 'Terjemahan', |
3865 | 3852 | 'centralnotice-translate-to' => 'Terjemahkan ke', |
3866 | 3853 | 'centralnotice-translate' => 'Terjemahkan', |
— | — | @@ -3951,7 +3938,6 @@ |
3952 | 3939 | 'centralnotice-allocation' => 'Alokasi', |
3953 | 3940 | 'centralnotice-view-allocation' => 'Lihat alokasi pengumuman', |
3954 | 3941 | 'centralnotice-allocation-instructions' => 'Pilih lingkungan yang ingin Anda lihat alokasi pengumumannya:', |
3955 | | - 'centralnotice-project-language' => 'Bahasa proyek', |
3956 | 3942 | 'centralnotice-country' => 'Negara', |
3957 | 3943 | 'centralnotice-no-allocation' => 'Tidak ada pengumuman yang dialokasikan.', |
3958 | 3944 | 'centralnotice-allocation-description' => 'Alokasi pengumuman untuk $1.$2 di $3:', |
— | — | @@ -4094,7 +4080,6 @@ |
4095 | 4081 | 'centralnotice-banner-anonymous' => 'Utenti anonimi', |
4096 | 4082 | 'centralnotice-banner-logged-in' => 'Utenti collegati', |
4097 | 4083 | 'centralnotice-countries' => 'Paesi', |
4098 | | - 'centralnotice-project-language' => 'Lingua progetto', |
4099 | 4084 | 'centralnotice-country' => 'Nazione', |
4100 | 4085 | 'centralnotice-percentage' => 'Percentuale', |
4101 | 4086 | 'right-centralnotice-admin' => 'Gestisce gli avvisi centralizzati', |
— | — | @@ -4136,7 +4121,7 @@ |
4137 | 4122 | 'centralnotice-add-template' => 'テンプレートを追加', |
4138 | 4123 | 'centralnotice-show-notices' => '告知を表示', |
4139 | 4124 | 'centralnotice-list-templates' => 'テンプレートを一覧表示', |
4140 | | - 'centralnotice-multiple_languages' => '複数($1)', |
| 4125 | + 'centralnotice-multiple' => '複数($1)', |
4141 | 4126 | 'centralnotice-translations' => '翻訳', |
4142 | 4127 | 'centralnotice-translate-to' => '翻訳先', |
4143 | 4128 | 'centralnotice-translate' => '翻訳', |
— | — | @@ -4225,7 +4210,6 @@ |
4226 | 4211 | 'centralnotice-allocation' => '割り当て', |
4227 | 4212 | 'centralnotice-view-allocation' => 'テンプレートの割り当てを表示', |
4228 | 4213 | 'centralnotice-allocation-instructions' => 'テンプレートの割り当てを表示したい環境を選んでください:', |
4229 | | - 'centralnotice-project-language' => 'プロジェクトの言語', |
4230 | 4214 | 'centralnotice-country' => '国', |
4231 | 4215 | 'centralnotice-no-allocation' => 'テンプレートが割り当てられていません。', |
4232 | 4216 | 'centralnotice-allocation-description' => '$3での$1.$2へのテンプレートの割り当て:', |
— | — | @@ -4475,7 +4459,7 @@ |
4476 | 4460 | 'centralnotice-add-template' => '틀을 추가하기', |
4477 | 4461 | 'centralnotice-show-notices' => '공지 표시하기', |
4478 | 4462 | 'centralnotice-list-templates' => '템플릿 목록 표시하기', |
4479 | | - 'centralnotice-multiple_languages' => '다수 ($1)', |
| 4463 | + 'centralnotice-multiple' => '다수 ($1)', |
4480 | 4464 | 'centralnotice-translations' => '번역', |
4481 | 4465 | 'centralnotice-translate-to' => '번역할 언어', |
4482 | 4466 | 'centralnotice-translate' => '번역하기', |
— | — | @@ -4532,7 +4516,6 @@ |
4533 | 4517 | 'centralnotice-clone-notice' => '이 틀의 사본을 만들기', |
4534 | 4518 | 'centralnotice-clone-name' => '이름:', |
4535 | 4519 | 'centralnotice-preview-all-template-translations' => '템플렛의 모든 번역 미리 보기', |
4536 | | - 'centralnotice-project-language' => '프로젝트 언어', |
4537 | 4520 | 'centralnotice-country' => '국가', |
4538 | 4521 | 'right-centralnotice-admin' => '중앙 공지 관리', |
4539 | 4522 | 'right-centralnotice-translate' => '중앙 공지 번역', |
— | — | @@ -4565,7 +4548,7 @@ |
4566 | 4549 | 'centralnotice-add-template' => 'En Schabloon dobei donn', |
4567 | 4550 | 'centralnotice-show-notices' => 'Zentrale Nohreschte zeije', |
4568 | 4551 | 'centralnotice-list-templates' => 'Schablone opleßte', |
4569 | | - 'centralnotice-multiple_languages' => 'etlijje ($1)', |
| 4552 | + 'centralnotice-multiple' => 'etlijje ($1)', |
4570 | 4553 | 'centralnotice-translations' => 'Övversäzonge', |
4571 | 4554 | 'centralnotice-translate-to' => 'Övversäze noh', |
4572 | 4555 | 'centralnotice-translate' => 'Övversäze', |
— | — | @@ -4677,7 +4660,7 @@ |
4678 | 4661 | 'centralnotice-add-template' => 'E Banner derbäisetzen', |
4679 | 4662 | 'centralnotice-show-notices' => 'Matdeelunge weisen', |
4680 | 4663 | 'centralnotice-list-templates' => 'Lëscht vun de Banneren', |
4681 | | - 'centralnotice-multiple_languages' => 'méi ($1)', |
| 4664 | + 'centralnotice-multiple' => 'méi ($1)', |
4682 | 4665 | 'centralnotice-translations' => 'Iwwersetzungen', |
4683 | 4666 | 'centralnotice-translate-to' => 'Iwwersetzen op', |
4684 | 4667 | 'centralnotice-translate' => 'Iwwersetzen', |
— | — | @@ -4768,7 +4751,6 @@ |
4769 | 4752 | 'centralnotice-countries' => 'Länner', |
4770 | 4753 | 'centralnotice-allocation' => 'Dispositioun', |
4771 | 4754 | 'centralnotice-view-allocation' => 'Dispositioun vum Banner weisen', |
4772 | | - 'centralnotice-project-language' => 'Sprooch vum Projet', |
4773 | 4755 | 'centralnotice-country' => 'Land', |
4774 | 4756 | 'centralnotice-no-allocation' => 'Keng Banneren zougedeelt.', |
4775 | 4757 | 'centralnotice-allocation-description' => 'Dispositioun vum Banner fir $1.$2 a(n) $3:', |
— | — | @@ -4821,7 +4803,7 @@ |
4822 | 4804 | 'centralnotice-add-template' => 'Sjabloon biedoon', |
4823 | 4805 | 'centralnotice-show-notices' => 'Sitemitdeilinge waergaeve', |
4824 | 4806 | 'centralnotice-list-templates' => 'Sjablone waergaeve', |
4825 | | - 'centralnotice-multiple_languages' => 'meerdere ($1)', |
| 4807 | + 'centralnotice-multiple' => 'meerdere ($1)', |
4826 | 4808 | 'centralnotice-translations' => 'Euverzèttinge', |
4827 | 4809 | 'centralnotice-translate-to' => 'Euverzètte nao', |
4828 | 4810 | 'centralnotice-translate' => 'Euverzètte', |
— | — | @@ -4914,7 +4896,6 @@ |
4915 | 4897 | 'centralnotice-allocation' => 'Toewiezing', |
4916 | 4898 | 'centralnotice-view-allocation' => 'Betrach vaantoewiezing', |
4917 | 4899 | 'centralnotice-allocation-instructions' => 'Kees de ómgaeving woveur se de vaantoewiezing wils bekieke:', |
4918 | | - 'centralnotice-project-language' => 'Projektaal', |
4919 | 4900 | 'centralnotice-country' => 'Landj', |
4920 | 4901 | 'centralnotice-no-allocation' => 'Geine vaan toegeweze.', |
4921 | 4902 | 'centralnotice-allocation-description' => 'Vaantoewiezing veur $1.$2 in $3:', |
— | — | @@ -5002,7 +4983,6 @@ |
5003 | 4984 | 'centralnotice-end-time' => 'Beigu laiks (UTC)', |
5004 | 4985 | 'centralnotice-clone-name' => 'Nosaukums:', |
5005 | 4986 | 'centralnotice-countries' => 'Valstis', |
5006 | | - 'centralnotice-project-language' => 'Projekta valoda', |
5007 | 4987 | 'centralnotice-country' => 'Valsts', |
5008 | 4988 | ); |
5009 | 4989 | |
— | — | @@ -5098,7 +5078,7 @@ |
5099 | 5079 | 'centralnotice-add-template' => 'Додај шаблон', |
5100 | 5080 | 'centralnotice-show-notices' => 'Прикажи известувања', |
5101 | 5081 | 'centralnotice-list-templates' => 'Наведи шаблони', |
5102 | | - 'centralnotice-multiple_languages' => 'повеќе ($1)', |
| 5082 | + 'centralnotice-multiple' => 'повеќе ($1)', |
5103 | 5083 | 'centralnotice-translations' => 'Преводи', |
5104 | 5084 | 'centralnotice-translate-to' => 'Преведи на', |
5105 | 5085 | 'centralnotice-translate' => 'Преведи', |
— | — | @@ -5190,7 +5170,6 @@ |
5191 | 5171 | 'centralnotice-allocation' => 'Распределба', |
5192 | 5172 | 'centralnotice-view-allocation' => 'Преглед на распределбата на плакати', |
5193 | 5173 | 'centralnotice-allocation-instructions' => 'Одберете во која околина сакате да ја погледате распределбата на плакати:', |
5194 | | - 'centralnotice-project-language' => 'Јазик на проектот', |
5195 | 5174 | 'centralnotice-country' => 'Земја', |
5196 | 5175 | 'centralnotice-no-allocation' => 'Нема распределени плакати', |
5197 | 5176 | 'centralnotice-allocation-description' => 'Распределба на плакати за $1.$2 iво $3:', |
— | — | @@ -5232,7 +5211,7 @@ |
5233 | 5212 | 'centralnotice-add-template' => 'ഫലകം കൂട്ടിച്ചേർക്കുക', |
5234 | 5213 | 'centralnotice-show-notices' => 'അറിയിപ്പുകൾ പ്രദർശിപ്പിക്കുക', |
5235 | 5214 | 'centralnotice-list-templates' => 'ഫലകങ്ങൾ പട്ടികവത്കരിക്കുക', |
5236 | | - 'centralnotice-multiple_languages' => 'നിരവധി ($1)', |
| 5215 | + 'centralnotice-multiple' => 'നിരവധി ($1)', |
5237 | 5216 | 'centralnotice-translations' => 'തർജ്ജമകൾ', |
5238 | 5217 | 'centralnotice-translate-to' => 'ഇതിലേയ്ക്ക് തർജ്ജമ ചെയ്യുക', |
5239 | 5218 | 'centralnotice-translate' => 'തർജ്ജമ ചെയ്യുക', |
— | — | @@ -5324,7 +5303,6 @@ |
5325 | 5304 | 'centralnotice-allocation' => 'വിന്യാസം', |
5326 | 5305 | 'centralnotice-view-allocation' => 'എഴുത്തുപട്ടയ്ക്ക് അനുവദിച്ചിരിക്കുന്ന സ്ഥാനം കാണുക', |
5327 | 5306 | 'centralnotice-allocation-instructions' => 'എഴുത്തുപട്ട അനുവദിക്കൽ പ്രദർശിപ്പിക്കാനായി താങ്കൾ തിരഞ്ഞെടുക്കുന്ന പരിതസ്ഥിതി:', |
5328 | | - 'centralnotice-project-language' => 'പദ്ധതിയുടെ ഭാഷ', |
5329 | 5307 | 'centralnotice-country' => 'രാജ്യം', |
5330 | 5308 | 'centralnotice-no-allocation' => 'എഴുത്തുപട്ടകൾക്ക് ഇടയനുവദിച്ചിട്ടില്ല.', |
5331 | 5309 | 'centralnotice-allocation-description' => '$1.$2 സംരംഭത്തിൽ അനുവദിച്ചിരിക്കുന്ന എഴുത്തുപട്ട (രാജ്യം: $3):', |
— | — | @@ -5621,7 +5599,7 @@ |
5622 | 5600 | 'centralnotice-add-template' => 'Sjabloon toevoegen', |
5623 | 5601 | 'centralnotice-show-notices' => 'Sitenotices weergeven', |
5624 | 5602 | 'centralnotice-list-templates' => 'Sjablonen weergeven', |
5625 | | - 'centralnotice-multiple_languages' => 'meerdere ($1)', |
| 5603 | + 'centralnotice-multiple' => 'meerdere ($1)', |
5626 | 5604 | 'centralnotice-translations' => 'Vertalingen', |
5627 | 5605 | 'centralnotice-translate-to' => 'Vertalen naar', |
5628 | 5606 | 'centralnotice-translate' => 'Vertalen', |
— | — | @@ -5713,7 +5691,6 @@ |
5714 | 5692 | 'centralnotice-allocation' => 'Toewijzing', |
5715 | 5693 | 'centralnotice-view-allocation' => 'Bannertoewijzing bekijken', |
5716 | 5694 | 'centralnotice-allocation-instructions' => 'Kies de omgeving waarvoor u de bannertoewijzing wilt bekijken:', |
5717 | | - 'centralnotice-project-language' => 'Projecttaal', |
5718 | 5695 | 'centralnotice-country' => 'Land', |
5719 | 5696 | 'centralnotice-no-allocation' => 'Geen banners toegewezen.', |
5720 | 5697 | 'centralnotice-allocation-description' => 'Bannertoewijzing voor $1.$2 in $3:', |
— | — | @@ -5838,7 +5815,7 @@ |
5839 | 5816 | 'centralnotice-add-template' => 'Legg til en mal', |
5840 | 5817 | 'centralnotice-show-notices' => 'Vis meldinger', |
5841 | 5818 | 'centralnotice-list-templates' => 'Vis maler', |
5842 | | - 'centralnotice-multiple_languages' => 'flere ($1)', |
| 5819 | + 'centralnotice-multiple' => 'flere ($1)', |
5843 | 5820 | 'centralnotice-translations' => 'Oversettelser', |
5844 | 5821 | 'centralnotice-translate-to' => 'Oversett til', |
5845 | 5822 | 'centralnotice-translate' => 'Oversett', |
— | — | @@ -5930,7 +5907,6 @@ |
5931 | 5908 | 'centralnotice-allocation' => 'Tildeling', |
5932 | 5909 | 'centralnotice-view-allocation' => 'Vis bannertildeling', |
5933 | 5910 | 'centralnotice-allocation-instructions' => 'Velg miljøet du ønsker å se bannertildelingen for:', |
5934 | | - 'centralnotice-project-language' => 'Prosjektspråk', |
5935 | 5911 | 'centralnotice-country' => 'Land', |
5936 | 5912 | 'centralnotice-no-allocation' => 'Ingen bannere tildelt.', |
5937 | 5913 | 'centralnotice-allocation-description' => 'Bannertildeling for $1.$2 i $3:', |
— | — | @@ -6093,7 +6069,7 @@ |
6094 | 6070 | 'centralnotice-add-template' => 'Dodaj szablon', |
6095 | 6071 | 'centralnotice-show-notices' => 'Pokaż komunikaty', |
6096 | 6072 | 'centralnotice-list-templates' => 'Lista szablonów', |
6097 | | - 'centralnotice-multiple_languages' => 'wiele ($1)', |
| 6073 | + 'centralnotice-multiple' => 'wiele ($1)', |
6098 | 6074 | 'centralnotice-translations' => 'Tłumaczenia', |
6099 | 6075 | 'centralnotice-translate-to' => 'Przetłumacz na', |
6100 | 6076 | 'centralnotice-translate' => 'Przetłumacz', |
— | — | @@ -6178,7 +6154,6 @@ |
6179 | 6155 | 'centralnotice-allocation' => 'Przydział', |
6180 | 6156 | 'centralnotice-view-allocation' => 'Zobacz przydziały dla banera', |
6181 | 6157 | 'centralnotice-allocation-instructions' => 'Określ środowisko, w którym chcesz zobaczyć baner', |
6182 | | - 'centralnotice-project-language' => 'Język projektu', |
6183 | 6158 | 'centralnotice-country' => 'Kraj', |
6184 | 6159 | 'centralnotice-no-allocation' => 'Brak przypisanych banerów.', |
6185 | 6160 | 'centralnotice-allocation-description' => 'Przydział banera dla $1.$2 w $3:', |
— | — | @@ -6221,7 +6196,7 @@ |
6222 | 6197 | 'centralnotice-add-template' => 'Gionta në stamp', |
6223 | 6198 | 'centralnotice-show-notices' => 'Mostra neuva', |
6224 | 6199 | 'centralnotice-list-templates' => 'Lista stamp', |
6225 | | - 'centralnotice-multiple_languages' => 'mùltipl ($1)', |
| 6200 | + 'centralnotice-multiple' => 'mùltipl ($1)', |
6226 | 6201 | 'centralnotice-translations' => 'Tradussion', |
6227 | 6202 | 'centralnotice-translate-to' => 'Volté an', |
6228 | 6203 | 'centralnotice-translate' => 'Volté', |
— | — | @@ -6313,7 +6288,6 @@ |
6314 | 6289 | 'centralnotice-allocation' => 'Alocassion', |
6315 | 6290 | 'centralnotice-view-allocation' => 'Vëdde la disposission dël tilèt', |
6316 | 6291 | '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', |
6318 | 6292 | 'centralnotice-country' => 'Nassion', |
6319 | 6293 | 'centralnotice-no-allocation' => 'Gnun tilèt butà.', |
6320 | 6294 | 'centralnotice-allocation-description' => 'Disposission dël tilèt për $1.$2 an $3:', |
— | — | @@ -6397,7 +6371,7 @@ |
6398 | 6372 | 'centralnotice-add-template' => 'Adicionar um modelo', |
6399 | 6373 | 'centralnotice-show-notices' => 'Mostrar avisos', |
6400 | 6374 | 'centralnotice-list-templates' => 'Listar modelos', |
6401 | | - 'centralnotice-multiple_languages' => 'múltiplas ($1)', |
| 6375 | + 'centralnotice-multiple' => 'múltiplas ($1)', |
6402 | 6376 | 'centralnotice-translations' => 'Traduções', |
6403 | 6377 | 'centralnotice-translate-to' => 'Traduzir para', |
6404 | 6378 | 'centralnotice-translate' => 'Traduzir', |
— | — | @@ -6489,7 +6463,6 @@ |
6490 | 6464 | 'centralnotice-allocation' => 'Atribuição', |
6491 | 6465 | 'centralnotice-view-allocation' => 'Ver atribuição de modelos', |
6492 | 6466 | 'centralnotice-allocation-instructions' => 'Escolha o ambiente para o qual deseja ver a atribuição de modelos:', |
6493 | | - 'centralnotice-project-language' => 'Língua do projecto', |
6494 | 6467 | 'centralnotice-country' => 'País', |
6495 | 6468 | 'centralnotice-no-allocation' => 'Não há modelos atribuídos.', |
6496 | 6469 | 'centralnotice-allocation-description' => 'Atribuição de modelos para $1.$2 em $3:', |
— | — | @@ -6533,7 +6506,7 @@ |
6534 | 6507 | 'centralnotice-add-template' => 'Adicionar um modelo', |
6535 | 6508 | 'centralnotice-show-notices' => 'Mostrar avisos', |
6536 | 6509 | 'centralnotice-list-templates' => 'Listar modelos', |
6537 | | - 'centralnotice-multiple_languages' => 'múltiplas ($1)', |
| 6510 | + 'centralnotice-multiple' => 'múltiplas ($1)', |
6538 | 6511 | 'centralnotice-translations' => 'Traduções', |
6539 | 6512 | 'centralnotice-translate-to' => 'Traduzir para', |
6540 | 6513 | 'centralnotice-translate' => 'Traduzir', |
— | — | @@ -6625,7 +6598,6 @@ |
6626 | 6599 | 'centralnotice-allocation' => 'Atribuição', |
6627 | 6600 | 'centralnotice-view-allocation' => 'Ver atribuição de modelos', |
6628 | 6601 | 'centralnotice-allocation-instructions' => 'Escolha o ambiente para o qual deseja ver a atribuição de modelos:', |
6629 | | - 'centralnotice-project-language' => 'Língua do projeto', |
6630 | 6602 | 'centralnotice-country' => 'País', |
6631 | 6603 | 'centralnotice-no-allocation' => 'Não há modelos atribuídos.', |
6632 | 6604 | 'centralnotice-allocation-description' => 'Atribuição de modelos para $1.$2 em $3:', |
— | — | @@ -6667,7 +6639,7 @@ |
6668 | 6640 | 'centralnotice-add-template' => 'Plantillata yapay', |
6669 | 6641 | 'centralnotice-show-notices' => 'Willaykunata rikuchiy', |
6670 | 6642 | 'centralnotice-list-templates' => 'Plantillakunata sutisuyupi rikuchiy', |
6671 | | - 'centralnotice-multiple_languages' => 'imaymana ($1)', |
| 6643 | + 'centralnotice-multiple' => 'imaymana ($1)', |
6672 | 6644 | 'centralnotice-translations' => "T'ikrasqakuna", |
6673 | 6645 | 'centralnotice-translate-to' => "Kayman t'ikray:", |
6674 | 6646 | 'centralnotice-translate' => "T'ikray", |
— | — | @@ -6754,7 +6726,6 @@ |
6755 | 6727 | 'centralnotice-banner-hidable' => 'Ranuy/Pakana', |
6756 | 6728 | 'centralnotice-banner-collapsible' => 'Thuñichina', |
6757 | 6729 | 'centralnotice-countries' => 'Mama llaqtakuna', |
6758 | | - 'centralnotice-project-language' => 'Ruraykamaypa rimaynin', |
6759 | 6730 | 'centralnotice-country' => 'Mama llaqta', |
6760 | 6731 | 'right-centralnotice-admin' => 'Chawpi willaykunata kamachiy', |
6761 | 6732 | 'right-centralnotice-translate' => "Chawpi willaykunata t'ikray", |
— | — | @@ -6904,7 +6875,7 @@ |
6905 | 6876 | 'centralnotice-add-template' => 'Добавить шаблон', |
6906 | 6877 | 'centralnotice-show-notices' => 'Показать уведомления', |
6907 | 6878 | 'centralnotice-list-templates' => 'Вывести список шаблонов', |
6908 | | - 'centralnotice-multiple_languages' => 'несколько ($1)', |
| 6879 | + 'centralnotice-multiple' => 'несколько ($1)', |
6909 | 6880 | 'centralnotice-translations' => 'Переводы', |
6910 | 6881 | 'centralnotice-translate-to' => 'Перевод на', |
6911 | 6882 | 'centralnotice-translate' => 'Перевод', |
— | — | @@ -6996,7 +6967,6 @@ |
6997 | 6968 | 'centralnotice-allocation' => 'Распределение', |
6998 | 6969 | 'centralnotice-view-allocation' => 'Просмотр размещения баннеров', |
6999 | 6970 | 'centralnotice-allocation-instructions' => 'Выберите среды, для которых вы хотите просмотреть размещение баннеров:', |
7000 | | - 'centralnotice-project-language' => 'Язык проекта', |
7001 | 6971 | 'centralnotice-country' => 'Страна', |
7002 | 6972 | 'centralnotice-no-allocation' => 'Баннеры не размещены', |
7003 | 6973 | 'centralnotice-allocation-description' => 'Размещение баннеров для $1.$2 в $3:', |
— | — | @@ -7097,7 +7067,7 @@ |
7098 | 7068 | 'centralnotice-add-template' => 'Халыып эбэргэ', |
7099 | 7069 | 'centralnotice-show-notices' => 'Биллэриилэри көрдөр', |
7100 | 7070 | 'centralnotice-list-templates' => 'Халыыптар тиһиктэрэ', |
7101 | | - 'centralnotice-multiple_languages' => 'хас да ($1)', |
| 7071 | + 'centralnotice-multiple' => 'хас да ($1)', |
7102 | 7072 | 'centralnotice-translations' => 'Тылбаастар', |
7103 | 7073 | 'centralnotice-translate-to' => 'Манна тылбаас', |
7104 | 7074 | 'centralnotice-translate' => 'Тылбаас', |
— | — | @@ -7733,7 +7703,6 @@ |
7734 | 7704 | 'centralnotice-message' => 'செய்தி', |
7735 | 7705 | 'centralnotice-clone-name' => 'பெயர்:', |
7736 | 7706 | 'centralnotice-countries' => 'நாடுகள்', |
7737 | | - 'centralnotice-project-language' => 'திட்டத்தின் மொழி', |
7738 | 7707 | 'centralnotice-country' => 'நாடு', |
7739 | 7708 | 'centralnotice-percentage' => 'சதவிகிதம்/விழுக்காடு', |
7740 | 7709 | 'centralnotice-preferred' => 'விரும்பத்தக்கது', |
— | — | @@ -7799,7 +7768,6 @@ |
7800 | 7769 | 'centralnotice-banner-anonymous' => 'అజ్ఞాత వాడుకరులు', |
7801 | 7770 | 'centralnotice-banner-logged-in' => 'ప్రవేశించిన వాడుకరులు', |
7802 | 7771 | 'centralnotice-countries' => 'దేశాలు', |
7803 | | - 'centralnotice-project-language' => 'ప్రాజెక్టు భాష', |
7804 | 7772 | 'centralnotice-country' => 'దేశం', |
7805 | 7773 | 'centralnotice-percentage' => 'శాతం', |
7806 | 7774 | 'right-centralnotice-admin' => 'కేంద్రీయ గమనికలని నిర్వహించగలగడం', |
— | — | @@ -8210,7 +8178,7 @@ |
8211 | 8179 | 'centralnotice-add-template' => 'Magdagdag ng isang suleras', |
8212 | 8180 | 'centralnotice-show-notices' => 'Ipagkita ang mga pabatid', |
8213 | 8181 | 'centralnotice-list-templates' => 'Itala ang mga suleras', |
8214 | | - 'centralnotice-multiple_languages' => 'maramihan ($1)', |
| 8182 | + 'centralnotice-multiple' => 'maramihan ($1)', |
8215 | 8183 | 'centralnotice-translations' => 'Mga salinwika', |
8216 | 8184 | 'centralnotice-translate-to' => 'Isalinwika patungong', |
8217 | 8185 | 'centralnotice-translate' => 'Isalinwika', |
— | — | @@ -8302,7 +8270,6 @@ |
8303 | 8271 | 'centralnotice-allocation' => 'Paglalaan', |
8304 | 8272 | 'centralnotice-view-allocation' => 'Tingnan ang kabahagi ng bandera', |
8305 | 8273 | 'centralnotice-allocation-instructions' => 'Piliin ang kapaligirang nais mong tingnan ang kabahagi ng bandera:', |
8306 | | - 'centralnotice-project-language' => 'Wika ng proyekto', |
8307 | 8274 | 'centralnotice-country' => 'Bansa', |
8308 | 8275 | 'centralnotice-no-allocation' => 'Walang bandera ibinahagi.', |
8309 | 8276 | 'centralnotice-allocation-description' => 'Ang banderang kabahagi para sa $1.$2 sa loob ng $3:', |
— | — | @@ -8633,7 +8600,7 @@ |
8634 | 8601 | 'centralnotice-add-template' => 'Zonta un modèl', |
8635 | 8602 | 'centralnotice-show-notices' => 'Mostra notifiche', |
8636 | 8603 | 'centralnotice-list-templates' => 'Elenca i modèi', |
8637 | | - 'centralnotice-multiple_languages' => 'multipli ($1)', |
| 8604 | + 'centralnotice-multiple' => 'multipli ($1)', |
8638 | 8605 | 'centralnotice-translations' => 'Tradussioni', |
8639 | 8606 | 'centralnotice-translate-to' => 'Tradusi con', |
8640 | 8607 | 'centralnotice-translate' => 'Tradusi', |
— | — | @@ -8740,7 +8707,7 @@ |
8741 | 8708 | 'centralnotice-add-template' => 'Thêm bảng', |
8742 | 8709 | 'centralnotice-show-notices' => 'Xem các thông báo', |
8743 | 8710 | 'centralnotice-list-templates' => 'Liệt kê các bảng', |
8744 | | - 'centralnotice-multiple_languages' => 'đa ngữ ($1)', |
| 8711 | + 'centralnotice-multiple' => 'đa ngữ ($1)', |
8745 | 8712 | 'centralnotice-translations' => 'Bản dịch', |
8746 | 8713 | 'centralnotice-translate-to' => 'Dịch ra', |
8747 | 8714 | 'centralnotice-translate' => 'Biên dịch', |
— | — | @@ -8821,7 +8788,6 @@ |
8822 | 8789 | 'centralnotice-allocation' => 'Phân bổ', |
8823 | 8790 | 'centralnotice-view-allocation' => 'Xem cách phân phối bảng', |
8824 | 8791 | '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', |
8826 | 8792 | 'centralnotice-country' => 'Quốc gia', |
8827 | 8793 | 'centralnotice-no-allocation' => 'Chưa có phân phối bảng nào.', |
8828 | 8794 | '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 @@ |
28 | 28 | } |
29 | 29 | |
30 | 30 | $tables = array( 'cn_notices' ); |
| 31 | + if ( $project ) { |
| 32 | + $tables[] = 'cn_notice_projects'; |
| 33 | + } |
31 | 34 | if ( $language ) { |
32 | 35 | $tables[] = 'cn_notice_languages'; |
33 | 36 | } |
34 | 37 | |
35 | 38 | $conds = array( |
36 | | - 'not_project' => array( '', $project ), |
37 | 39 | 'not_geo' => 0, |
38 | 40 | "not_start <= $encTimestamp", |
39 | 41 | "not_end >= $encTimestamp", |
40 | 42 | ); |
41 | 43 | // 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 | + } |
42 | 48 | if ( $language ) { |
43 | 49 | $conds[] = 'nl_notice_id = cn_notices.not_id'; |
44 | 50 | $conds['nl_language'] = $language; |
— | — | @@ -65,19 +71,25 @@ |
66 | 72 | // If a location is passed, also pull geotargeted campaigns that match the location |
67 | 73 | if ( $location ) { |
68 | 74 | $tables = array( 'cn_notices', 'cn_notice_countries' ); |
| 75 | + if ( $project ) { |
| 76 | + $tables[] = 'cn_notice_projects'; |
| 77 | + } |
69 | 78 | if ( $language ) { |
70 | 79 | $tables[] = 'cn_notice_languages'; |
71 | 80 | } |
72 | 81 | |
73 | 82 | // Use whatever conditional arguments got passed in |
74 | 83 | $conds = array( |
75 | | - 'not_project' => array( '', $project ), |
76 | 84 | 'not_geo' => 1, |
77 | 85 | 'nc_notice_id = cn_notices.not_id', |
78 | 86 | 'nc_country' => $location, |
79 | 87 | "not_start <= $encTimestamp", |
80 | 88 | "not_end >= $encTimestamp", |
81 | 89 | ); |
| 90 | + if ( $project ) { |
| 91 | + $conds[] = 'np_notice_id = cn_notices.not_id'; |
| 92 | + $conds['np_project'] = $project; |
| 93 | + } |
82 | 94 | if ( $language ) { |
83 | 95 | $conds[] = "nl_notice_id = cn_notices.not_id"; |
84 | 96 | $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 | +} |
2 | 9 | function selectLanguages( selectAll ) { |
3 | 10 | var selectBox = document.getElementById('project_languages[]'); |
4 | 11 | var firstSelect = selectBox.options.length - 1; |
Property changes on: branches/wmf/1.16wmf4/extensions/CentralNotice |
___________________________________________________________________ |
Modified: svn:mergeinfo |
5 | 12 | Merged /trunk/extensions/CentralNotice:r76333,76347,76351,76356-76358,76361,76363,76462 |