makeConfig( 'visualeditor' ); $messages = array_merge( $messages, array_filter( $veConfig->get( 'VisualEditorTabMessages' ) ) ); // Skin-dependent messages for the edit tab (same as generated by SkinTemplate). // We only need the message for the current skin, but we don't know which skin will be used. // Only some skins use these (e.g. Vector), others just use default 'edit' and 'create'. foreach ( SkinFactory::getDefaultInstance()->getSkinNames() as $skname => $unused ) { foreach ( [ 'edit', 'create' ] as $msgKey ) { // e.g. vector-view-edit, vector-view-create if ( wfMessage( "$skname-view-$msgKey" )->inContentLanguage()->exists() ) { $messages[] = "$skname-view-$msgKey"; } } } return $messages; } }