mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/TemplateData
synced 2024-11-28 01:30:00 +00:00
Merge "Remove empty Default, Example and Auto value sections of the output table"
This commit is contained in:
commit
49f1201621
|
@ -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",
|
||||
|
|
|
@ -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}}",
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue