From d4f129d7bffa41f19d807ced17baaaa796aebc72 Mon Sep 17 00:00:00 2001 From: Prateek Saxena Date: Tue, 17 Nov 2015 11:57:21 +0530 Subject: [PATCH] mw.Upload.BookletLayout: Add help text for name and description fields Copied the following string from UploadWizard into core to be shown as help text near the input fields: * mwe-upwiz-tooltip-title * mwe-upwiz-tooltip-description Bug: T116086 Change-Id: Iaaac4908c71b416888921a4e45de66fa87ab448d --- languages/i18n/en.json | 2 ++ languages/i18n/qqq.json | 2 ++ resources/Resources.php | 2 ++ .../mediawiki.ForeignStructuredUpload.BookletLayout.js | 6 ++++-- resources/src/mediawiki/mediawiki.Upload.BookletLayout.js | 6 ++++-- 5 files changed, 14 insertions(+), 4 deletions(-) diff --git a/languages/i18n/en.json b/languages/i18n/en.json index 349cac6c0f..a34a597445 100644 --- a/languages/i18n/en.json +++ b/languages/i18n/en.json @@ -1428,7 +1428,9 @@ "upload-form-label-select-file": "Select file", "upload-form-label-infoform-title": "Details", "upload-form-label-infoform-name": "Name", + "upload-form-label-infoform-name-tooltip": "A unique descriptive title for the file, which will serve as a filename. You may use plain language with spaces. Do not include the file extension.", "upload-form-label-infoform-description": "Description", + "upload-form-label-infoform-description-tooltip": "Briefly describe everything notable about the work.\nFor a photo, mention the main things that are depicted, the occasion, or the place.", "upload-form-label-usage-title": "Usage", "upload-form-label-usage-filename": "File name", "foreign-structured-upload-form-label-own-work": "This is my own work", diff --git a/languages/i18n/qqq.json b/languages/i18n/qqq.json index 87470bfc30..4f2a005f42 100644 --- a/languages/i18n/qqq.json +++ b/languages/i18n/qqq.json @@ -1603,7 +1603,9 @@ "upload-form-label-select-file": "Label for the select file widget\n{{Identical|Select file}}", "upload-form-label-infoform-title": "Title for the information form\n{{Identical|Detail}}", "upload-form-label-infoform-name": "Label for the file name input\n{{Identical|Name}}", + "upload-form-label-infoform-name-tooltip": "The tooltip documenting the title field for the file - used as the filename on-wiki.", "upload-form-label-infoform-description": "Label for the file description input\n{{Identical|Description}}", + "upload-form-label-infoform-description-tooltip": "The tooltip documenting the description fields on the details page.", "upload-form-label-usage-title": "Title for the insert form showing how to use the uploaded item.\n{{Identical|Usage}}", "upload-form-label-usage-filename": "Label for the file name input\n{{Identical|Filename}}", "foreign-structured-upload-form-label-own-work": "[[File:Cross-wiki media upload dialog, December 2015 AB test option 1.png|thumb]] Label for own work confirmation checkbox", diff --git a/resources/Resources.php b/resources/Resources.php index ca82c84949..8dd78abe5f 100644 --- a/resources/Resources.php +++ b/resources/Resources.php @@ -1195,7 +1195,9 @@ return array( 'upload-form-label-select-file', 'upload-form-label-infoform-title', 'upload-form-label-infoform-name', + 'upload-form-label-infoform-name-tooltip', 'upload-form-label-infoform-description', + 'upload-form-label-infoform-description-tooltip', 'upload-form-label-usage-title', 'upload-form-label-usage-filename', 'api-error-unknownerror', diff --git a/resources/src/mediawiki/mediawiki.ForeignStructuredUpload.BookletLayout.js b/resources/src/mediawiki/mediawiki.ForeignStructuredUpload.BookletLayout.js index d896756ac0..ddf7f2b37e 100644 --- a/resources/src/mediawiki/mediawiki.ForeignStructuredUpload.BookletLayout.js +++ b/resources/src/mediawiki/mediawiki.ForeignStructuredUpload.BookletLayout.js @@ -498,11 +498,13 @@ fieldset.addItems( [ new OO.ui.FieldLayout( this.filenameWidget, { label: mw.msg( 'upload-form-label-infoform-name' ), - align: 'top' + align: 'top', + help: mw.msg( 'upload-form-label-infoform-name-tooltip' ) } ), new OO.ui.FieldLayout( this.descriptionWidget, { label: mw.msg( 'upload-form-label-infoform-description' ), - align: 'top' + align: 'top', + help: mw.msg( 'upload-form-label-infoform-description-tooltip' ) } ), new OO.ui.FieldLayout( this.categoriesWidget, { label: mw.msg( 'foreign-structured-upload-form-label-infoform-categories' ), diff --git a/resources/src/mediawiki/mediawiki.Upload.BookletLayout.js b/resources/src/mediawiki/mediawiki.Upload.BookletLayout.js index 3f04bb1814..26eabc7c53 100644 --- a/resources/src/mediawiki/mediawiki.Upload.BookletLayout.js +++ b/resources/src/mediawiki/mediawiki.Upload.BookletLayout.js @@ -434,11 +434,13 @@ fieldset.addItems( [ new OO.ui.FieldLayout( this.filenameWidget, { label: mw.msg( 'upload-form-label-infoform-name' ), - align: 'top' + align: 'top', + help: mw.msg( 'upload-form-label-infoform-name-tooltip' ) } ), new OO.ui.FieldLayout( this.descriptionWidget, { label: mw.msg( 'upload-form-label-infoform-description' ), - align: 'top' + align: 'top', + help: mw.msg( 'upload-form-label-infoform-description-tooltip' ) } ) ] ); this.infoForm = new OO.ui.FormLayout( { items: [ fieldset ] } ); -- 2.20.1