diff --git a/i18n/en.json b/i18n/en.json index d90eb88c..f3e6e035 100644 --- a/i18n/en.json +++ b/i18n/en.json @@ -23,11 +23,8 @@ "templatedata-doc-format-inline": "This template prefers inline formatting of parameters.", "templatedata-doc-no-params-set": "No parameters specified", "templatedata-doc-param-autovalue": "Auto value", - "templatedata-doc-param-autovalue-empty": "empty", "templatedata-doc-param-default": "Default", - "templatedata-doc-param-default-empty": "empty", "templatedata-doc-param-example": "Example", - "templatedata-doc-param-example-empty": "empty", "templatedata-doc-param-desc": "Description", "templatedata-doc-param-desc-empty": "no description", "templatedata-doc-param-name": "Parameter", diff --git a/i18n/qqq.json b/i18n/qqq.json index cb5ac0ae..efd4b74c 100644 --- a/i18n/qqq.json +++ b/i18n/qqq.json @@ -34,11 +34,8 @@ "templatedata-doc-format-inline": "Use inline formatting of the template parameters in wikitext.", "templatedata-doc-no-params-set": "A message shown when there are no parameters set in the TemplateData string.", "templatedata-doc-param-autovalue": "Used as column heading in the table for auto fill value.\n{{Related|Templatedata-doc-param}}", - "templatedata-doc-param-autovalue-empty": "Displayed when a template parameter has no auto filled value (should not be a full sentence, used in a table).\n{{Identical|Empty}}", "templatedata-doc-param-default": "Used as column heading in the table.\n{{Related|Templatedata-doc-param}}\n{{Identical|Default}}", - "templatedata-doc-param-default-empty": "Displayed when a template parameter has no default value (should not be a full sentence, used in a table).\n{{Identical|Empty}}", "templatedata-doc-param-example": "Used as column heading in the table.\n{{Related|Templatedata-doc-param}}\n{{Identical|Example}}", - "templatedata-doc-param-example-empty": "Displayed when a template parameter has no example value (should be short, used in a table).\n{{Identical|Empty}}", "templatedata-doc-param-desc": "Used as column heading in the table.\n{{Related|Templatedata-doc-param}}\n{{Identical|Description}}", "templatedata-doc-param-desc-empty": "Displayed when a template parameter has no description (should not be a full sentence, used in a table cell).\n{{Identical|No description}}", "templatedata-doc-param-name": "Used as column heading in the table. Each cell (row) of this column contains the name of one parameter of the template described by the table.\n{{Related|Templatedata-doc-param}}\n{{Identical|Parameter}}", diff --git a/includes/TemplateDataBlob.php b/includes/TemplateDataBlob.php index f2875296..78e092f2 100644 --- a/includes/TemplateDataBlob.php +++ b/includes/TemplateDataBlob.php @@ -842,45 +842,27 @@ class TemplateDataBlob { wfMessage( 'templatedata-doc-param-desc-empty' )->inLanguage( $lang )->text() ) . Html::rawElement( 'dl', [], - Html::element( 'dt', [], + // Default + ( $paramObj->default !== null ? ( Html::element( 'dt', [], wfMessage( 'templatedata-doc-param-default' )->inLanguage( $lang )->text() ) - // Default - . Html::element( 'dd', [ - 'class' => [ - 'mw-templatedata-doc-muted' => $paramObj->default === null - ] - ], - $paramObj->default !== null ? - $paramObj->default : - wfMessage( 'templatedata-doc-param-default-empty' )->inLanguage( $lang )->text() - ) + . Html::element( 'dd', [], + $paramObj->default + ) ) : '' ) // Example - . Html::element( 'dt', [], + . ( $paramObj->example !== null ? ( Html::element( 'dt', [], wfMessage( 'templatedata-doc-param-example' )->inLanguage( $lang )->text() ) - . Html::element( 'dd', [ - 'class' => [ - 'mw-templatedata-doc-muted' => $paramObj->example === null - ] - ], - $paramObj->example !== null ? - $paramObj->example : - wfMessage( 'templatedata-doc-param-example-empty' )->inLanguage( $lang )->text() - ) + . Html::element( 'dd', [], + $paramObj->example + ) ) : '' ) // Auto value - . Html::element( 'dt', [], + . ( $paramObj->autovalue !== null ? ( Html::element( 'dt', [], wfMessage( 'templatedata-doc-param-autovalue' )->inLanguage( $lang )->text() ) - . Html::rawElement( 'dd', [ - 'class' => [ - 'mw-templatedata-doc-muted' => $paramObj->autovalue === null - ] - ], - $paramObj->autovalue !== null ? - Html::element( 'code', [], $paramObj->autovalue ) : - wfMessage( 'templatedata-doc-param-autovalue-empty' )->inLanguage( $lang )->escaped() - ) + . Html::rawElement( 'dd', [], + Html::element( 'code', [], $paramObj->autovalue ) + ) ) : '' ) ) ) // Type