* wish to add a submit button to a form.
*
* Additional recognized configuration parameters include:
- * - flags: OOUI flags for the button, see OOUI\\FlaggedElement
+ * - flags: OOUI flags for the button, see OOUI\FlaggedElement
* - buttonlabel-message: Message to use for the button display text, instead
* of the value from 'default'. Overrides 'buttonlabel' and 'buttonlabel-raw'.
* - buttonlabel: Text to display for the button display text, instead
# Generate the label from a message, if possible
if ( isset( $info['buttonlabel-message'] ) ) {
- $msgInfo = $info['buttonlabel-message'];
-
- if ( is_array( $msgInfo ) ) {
- $msg = array_shift( $msgInfo );
- } else {
- $msg = $msgInfo;
- $msgInfo = [];
- }
-
- $this->buttonLabel = $this->msg( $msg, $msgInfo )->parse();
+ $this->buttonLabel = $this->getMessage( $info['buttonlabel-message'] )->parse();
} elseif ( isset( $info['buttonlabel'] ) ) {
if ( $info['buttonlabel'] === ' ' ) {
// Apparently some things set   directly and in an odd format