Prtksxna has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/264226

Change subject: Add actionable placeholder text for the date input
......................................................................

Add actionable placeholder text for the date input

Change-Id: I5ef605bc15a50d742983003814f2cc1144e74485
Depends-on: I19a095ee19d60944ade975fdf3e13695642078a1
Bug: T123693
---
M UploadWizardHooks.php
M i18n/en.json
M i18n/qqq.json
M resources/details/uw.DateDetailsWidget.js
4 files changed, 7 insertions(+), 2 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/UploadWizard 
refs/changes/26/264226/1

diff --git a/UploadWizardHooks.php b/UploadWizardHooks.php
index aa8792c..8e364b8 100644
--- a/UploadWizardHooks.php
+++ b/UploadWizardHooks.php
@@ -276,6 +276,7 @@
                                'mwe-upwiz-categories-another',
                                'mwe-upwiz-media-type',
                                'mwe-upwiz-date-created',
+                               'mwe-upwiz-select-date',
                                'mwe-upwiz-location',
                                'mwe-upwiz-location-button',
                                'mwe-upwiz-location-lat',
diff --git a/i18n/en.json b/i18n/en.json
index 23b5d39..2dd347a 100644
--- a/i18n/en.json
+++ b/i18n/en.json
@@ -135,6 +135,7 @@
        "mwe-upwiz-desc-add-0": "Add a description",
        "mwe-upwiz-title": "Title",
        "mwe-upwiz-date-created": "Date created",
+       "mwe-upwiz-select-date": "Select a date",
        "mwe-upwiz-location": "Location",
        "mwe-upwiz-location-button": "Show on map",
        "mwe-upwiz-location-lat": "Latitude",
diff --git a/i18n/qqq.json b/i18n/qqq.json
index 4d3609d..9057141 100644
--- a/i18n/qqq.json
+++ b/i18n/qqq.json
@@ -159,6 +159,7 @@
        "mwe-upwiz-desc-add-0": "The button for adding the first description to 
an image.",
        "mwe-upwiz-title": "[[File:Commons-uw-L52P.png|right|thumb|Screenshot 
showing a sample of this message]]\n\n\n{{Identical|Title}}",
        "mwe-upwiz-date-created": 
"[[File:Commons-uw-L52P.png|right|thumb|Screenshot showing a sample of this 
message]]\n{{Identical|Date created}}",
+       "mwe-upwiz-select-date": "Placeholder text for date selection field",
        "mwe-upwiz-location": "The location the media exists on the planet, 
further described by lat and lon.\n{{Identical|Location}}",
        "mwe-upwiz-location-button": "Label for button which opens location on 
OpenStreetMap using entered input coordinates.",
        "mwe-upwiz-location-lat": "Latitude - the GPS coordinate, expressed in 
signed decimal degrees.\n{{Identical|Latitude}}",
diff --git a/resources/details/uw.DateDetailsWidget.js 
b/resources/details/uw.DateDetailsWidget.js
index 6959d45..bbc0234 100644
--- a/resources/details/uw.DateDetailsWidget.js
+++ b/resources/details/uw.DateDetailsWidget.js
@@ -57,11 +57,13 @@
 
                if ( mode === 'arbitrary' ) {
                        this.dateInputWidget = new OO.ui.TextInputWidget( {
-                               classes: [ 'mwe-date', 
'mwe-upwiz-dateDetailsWidget-date' ]
+                               classes: [ 'mwe-date', 
'mwe-upwiz-dateDetailsWidget-date' ],
+                               placeholder: mw.msg( 'mwe-upwiz-select-date' )
                        } );
                } else {
                        this.dateInputWidget = new mw.widgets.DateInputWidget( {
-                               classes: [ 'mwe-date', 
'mwe-upwiz-dateDetailsWidget-date' ]
+                               classes: [ 'mwe-date', 
'mwe-upwiz-dateDetailsWidget-date' ],
+                               placeholderLabel: mw.msg( 
'mwe-upwiz-select-date' )
                        } );
                        // If the user types '{{', assume that they are trying 
to input template wikitext and switch
                        // to 'arbitrary' mode. This might help confused 
power-users (T110026#1567714).

-- 
To view, visit https://gerrit.wikimedia.org/r/264226
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I5ef605bc15a50d742983003814f2cc1144e74485
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/UploadWizard
Gerrit-Branch: master
Gerrit-Owner: Prtksxna <[email protected]>

_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to