Mooeypoo has uploaded a new change for review.

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

Change subject: Adjusting error message for invalid inputs
......................................................................

Adjusting error message for invalid inputs

The invalid characters ('|', '=', and '}}') will be displayed through
individual parameters, for consistency, and to avoid parsing problems
in translatewiki.

Change-Id: Ic87541419aab5664f3530209e1ad8689deec33a5
---
M TemplateData.i18n.php
M modules/ext.templateDataGenerator.core.js
2 files changed, 8 insertions(+), 4 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/TemplateData 
refs/changes/76/110976/1

diff --git a/TemplateData.i18n.php b/TemplateData.i18n.php
index 68da8bf..75f2dfc 100644
--- a/TemplateData.i18n.php
+++ b/TemplateData.i18n.php
@@ -41,7 +41,7 @@
        'templatedata-modal-button-cancel' => 'Cancel',
        'templatedata-modal-button-delparam' => 'Delete parameter',
        'templatedata-modal-button-importParams' => 'Import parameters',
-       'templatedata-modal-errormsg' => 'Errors found. Please make sure there 
are no empty or duplicate parameter names, and that the parameter name does not 
include "|", "=" or "$1".',
+       'templatedata-modal-errormsg' => 'Errors found. Please make sure there 
are no empty or duplicate parameter names, and that the parameter name does not 
include "$1", "$2" or "$3".',
        'templatedata-modal-errormsg-import-noparams' => 'No new parameters 
found during import.',
        'templatedata-modal-notice-import-numparams' => '$1 new 
{{PLURAL:$1|parameter was|parameters were}} imported.',
        'templatedata-modal-table-param-actions' => 'Actions',
@@ -130,8 +130,12 @@
 {{Identical|Cancel}}',
        'templatedata-modal-button-delparam' => 'Button to delete a parameter',
        'templatedata-modal-button-importParams' => 'Label of the import 
button',
-       'templatedata-modal-errormsg' => 'Error message that appears in the 
TemplateData generator GUI in case there are empty, duplicate or invalid 
parameter names
-* $1 - double curly brackets, supplied as a parameter to avoid parsing errors 
in translation strings.',
+       'templatedata-modal-errormsg' => 'Error message that appears in the 
TemplateData generator GUI in case there are empty, duplicate or invalid 
parameter names.
+Invalid characters are supplied as parameters to avoid parsing errors in 
translation strings.
+
+* $1 - pipe
+* $2 - equal sign
+* $3 - double curly brackets',
        'templatedata-modal-errormsg-import-noparams' => 'message that appears 
in the TemplateData generator GUI in case no template parameters were found 
during the import attempt.',
        'templatedata-modal-notice-import-numparams' => 'message that appears 
in the TemplateData generator GUI showing how many new parameters were imported 
into the GUI from an existing template.',
        'templatedata-modal-table-param-actions' => 'Label for a table heading: 
Parameter actions in the table',
diff --git a/modules/ext.templateDataGenerator.core.js 
b/modules/ext.templateDataGenerator.core.js
index 58581f7..4eb8c07 100644
--- a/modules/ext.templateDataGenerator.core.js
+++ b/modules/ext.templateDataGenerator.core.js
@@ -482,7 +482,7 @@
                        // Validate
                        if ( !doNotCheckForm ) {
                                if ( !isFormValid() ) {
-                                       showErrorModal( mw.msg( 
'templatedata-modal-errormsg', '}}' ) );
+                                       showErrorModal( mw.msg( 
'templatedata-modal-errormsg', '|', '=', '}}' ) );
                                        return;
                                }
                        }

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ic87541419aab5664f3530209e1ad8689deec33a5
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/TemplateData
Gerrit-Branch: master
Gerrit-Owner: Mooeypoo <mor...@gmail.com>

_______________________________________________
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to