Amire80 has uploaded a new change for review.
https://gerrit.wikimedia.org/r/94610
Change subject: Convert two hardcoded strings to messages
......................................................................
Convert two hardcoded strings to messages
Change-Id: I76a8bd16b09802e4b509761c1ff838feee1ebe92
---
M CentralNotice.i18n.php
M CentralNotice.modules.php
M modules/ext.centralNotice.adminUi.bannerManager/bannermanager.js
M special/SpecialCentralNoticeBanners.php
4 files changed, 7 insertions(+), 2 deletions(-)
git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/CentralNotice
refs/changes/10/94610/1
diff --git a/CentralNotice.i18n.php b/CentralNotice.i18n.php
index 0a70630..89d42ee 100644
--- a/CentralNotice.i18n.php
+++ b/CentralNotice.i18n.php
@@ -129,6 +129,7 @@
'centralnotice-banner-hidable' => 'Static/Hidable',
'centralnotice-banner-collapsible' => 'Collapsible',
'centralnotice-banner-fundraising' => 'This is a fundraising banner',
+ 'centralnotice-banner-display-on' => 'Display on',
'centralnotice-banner-autolink' => 'Automatically create landing page
link',
'centralnotice-banner-autolink-help' => 'When enabled CentralNotice
will automatically create a localised link to $3 with a landing page selected
at random. There must be an anchor tag with $1 in the banner body.',
'centralnotice-banner-landing-pages' => 'Landing pages
(comma-separated)',
@@ -229,6 +230,7 @@
'centralnotice-archive-campaign-cancel' => 'Cancel',
'centralnotice-archive-edit-prevented' => 'Editing this campaign is
disabled because it is either locked or archived. Change either status from
[[Special:CentralNotice]].',
+ 'centralnotice-add-new-banner-title' => 'Add a new banner',
'centralnotice-delete-banner' => 'Delete',
'centralnotice-delete-banner-title' => 'Delete
{{PLURAL:$1|banner|banners}}?',
'centralnotice-delete-banner-confirm' => 'Deletion removes all settings
and messages. This action cannot be reversed. Consider archiving instead.',
@@ -483,6 +485,7 @@
'centralnotice-banner-hidable' => 'Unused at this time.',
'centralnotice-banner-collapsible' => 'Unused at this time.',
'centralnotice-banner-fundraising' => 'Label of checkbox',
+ 'centralnotice-banner-display-on' => 'A label in a form. The options to
select will be different platforms, such as "desktop", "Android" etc.',
'centralnotice-banner-autolink' => 'Label of checkbox',
'centralnotice-banner-autolink-help' => 'Brief instructions on how to
use the interface. Parameters:
* $1 - a bit of HTML
@@ -675,6 +678,7 @@
'centralnotice-archive-campaign-confirm' => 'Used as confirmation
message in the dialog box which has the title
{{msg-mw|Centralnotice-archive-campaign-title}}.',
'centralnotice-archive-campaign-cancel' => '{{Identical|Cancel}}',
'centralnotice-archive-edit-prevented' => 'Descriptive banner used on
the page to describe why it cannot be edited.',
+ 'centralnotice-add-new-banner-title' => 'A title for the dialog for
adding a new banner.',
'centralnotice-delete-banner' => 'Button label
{{Identical|Delete}}',
diff --git a/CentralNotice.modules.php b/CentralNotice.modules.php
index e70f7e3..467b590 100644
--- a/CentralNotice.modules.php
+++ b/CentralNotice.modules.php
@@ -78,6 +78,7 @@
'centralnotice-archive-banner-title',
'centralnotice-archive-banner-confirm',
'centralnotice-archive-banner-cancel',
+ 'centralnotice-add-new-banner-title',
'centralnotice-delete-banner',
'centralnotice-delete-banner-title',
'centralnotice-delete-banner-confirm',
diff --git a/modules/ext.centralNotice.adminUi.bannerManager/bannermanager.js
b/modules/ext.centralNotice.adminUi.bannerManager/bannermanager.js
index 431f88d..829b9bf 100644
--- a/modules/ext.centralNotice.adminUi.bannerManager/bannermanager.js
+++ b/modules/ext.centralNotice.adminUi.bannerManager/bannermanager.js
@@ -59,7 +59,7 @@
dialogObj[0].name = 'addBannerDialog';
dialogObj.append( $( '#cn-formsection-addBanner'
).children( 'div' ).clone().show() )
.dialog( {
- title: 'Add a new banner',
+ title: mw.message(
'centralnotice-add-new-banner-title' ).text(),
modal: true,
buttons: buttons,
width: 400
diff --git a/special/SpecialCentralNoticeBanners.php
b/special/SpecialCentralNoticeBanners.php
index a958495..0ea9222 100644
--- a/special/SpecialCentralNoticeBanners.php
+++ b/special/SpecialCentralNoticeBanners.php
@@ -396,7 +396,7 @@
'section' => 'settings',
'type' => 'multiselect',
'disabled' => !$this->editable,
- 'label' => 'Display on',
+ 'label-message' => 'centralnotice-banner-display-on',
'options' => $availableDevices,
'default' => $assignedDevices,
'cssclass' => 'separate-form-element',
--
To view, visit https://gerrit.wikimedia.org/r/94610
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I76a8bd16b09802e4b509761c1ff838feee1ebe92
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/CentralNotice
Gerrit-Branch: master
Gerrit-Owner: Amire80 <[email protected]>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits