Robson » Code Viewer

<?
 
   function fault_text($id, $extra='')
   {
       $fault = 'The fault "'. $id . '" does not exist.';
       switch ($id)
       {
           case 'no_images':
               $fault = 'The article has no images.';
           break;
           case 'starts_with_heading':
               $fault = 'The article starts with a heading. It should start with a lead.';
           break;
           case 'day_or_month_linked':
               $fault = 'This may be inappropriate if it is not relevant to the context. See ' . wp_link('WP:CONTEXT') . ' and ' . wp_link('WP:MOSDATE') . ' for details.';
           break;
           case 'relative_dates':
               $fault = 'Articles should not contain relative times or dates. See ' . wp_link('WP:MOS#Time') . '. The following relative dates were found: ';
           break;
           case 'no_infobox':
               $fault = 'The article does not contain an infobox template. However, this may be fine if no infobox would be appropriate.';
           break;
           case 'no_persondata':
               $fault = 'If this is a biography, consider adding {{persondata}} with the required parameters. See ' . wp_link('WP:PERSON') . ' for details.';
           break;
           case 'space_before_unit':
               $fault = 'If this article contains units, they should have &quot;&amp;nbsp;&quot; between the number and the measurement. See ' . wp_link('WP:MOSNUM#Units_of_measurements') . ' for details. The following units are affected:';
           break;
           case 'heading_starts_with_the_a_an':
               $fault = 'Headings shouldn\'t start with "The", "A" or "An", see ' . wp_link('WP:MOS#Headings') . '. The following headings are affected:';
           break;
           case 'no_cats':
               $fault = 'No categories have been defined. However, categories may be included from templates.';
           break;
           case 'ref_placement':
               $fault = 'Ref tags should be placed directly after punctuation, as per ' . wp_link('WP:FOOTNOTE') . '. The following incorrect references were found: ';
           break;
           case 'long_page':
               $fault = 'This page is ' . $extra . ' kb long. This may be more than preffered, see ' . wp_link('Wikipedia:Article size') . '.';
           break;
           case 'weasel_words':
               $fault = 'This page may contain weasel words, see ' . wp_link('WP:WEASEL') . ' for details. They should be backed up by citations. The following weasel words were found: ';
           break;
           case 'peacock_words':
               $fault = 'This page may contain peacock terms, see ' . wp_link('WP:PEACOCK') . ' for details. They show off the subject of the article without providing real information. The following peacock words were found: ';
           break;
           case 'date_suffix':
               $fault = 'Dates shouldn\'t use st/nd/th, like this: <em>January 22<sup>nd</sup></em>. Use <em>22 January</em> instead, as per ' . wp_link('WP:MOSDATE') . '. The following incorrect dates were found: ';
           break;
           case 'heading_capitalisation':
               $fault = 'Words in headings should start with a lowercase letter, except the first word and proper nouns. Some titles that may be incorrect are: ';
           break;
           case 'langs_order':
               $fault = 'The interwiki language links should be in alphabetical order, like this: ';
           break;
           case 'mismatched_template_brackets':
               $fault = 'The number of {{ is different to the number of }}. This may indicate a problem with the inclusion of templates.';
           break;
           case 'mismatched_link_brackets':
               $fault = 'The number of [[ is different to the number of ]]. This may indicate a problem with the links.';
           break;
           case 'see_also_placement':
               $fault = 'The <em>See also</em> section should appear before references and notes sections, as per ' . wp_link('WP:GTL') . '.';
           break;
           case 'ext_links_placement':
               $fault = 'The <em>External links</em> section should appear after references and notes sections, as per ' . wp_link('WP:GTL') . '.';
           break;
           case 'see_also_ext_links_order':
               $fault = 'The <em>See also</em> section should appear before the <em>External links</em> section, as per ' . wp_link('WP:GTL') . '.';
           break;
           case 'trivia_section':
               $fault = 'Trivia sections should be avoided, as per ' . wp_link('Wikipedia:Avoid_trivia_sections_in_articles');
           break;
           case 'ampersand_in_title':
               $fault = 'Ampersands (&amp;) should be avoided in headings, unless it is part of a formal name. Use "and" instead. See ' . wp_link('WP:MOS#Headings') . '. The following titles are affected:';
           break;
           case 'links_in_heading':
               $fault = 'Headings shouldn\'t contain links, see ' . wp_link('WP:MOS#Headings') . '.';
           break;
           case 'and_or':
               $fault = 'Avoid using "and/or", use "x or y, or both" instead. See ' . wp_link('WP:MOS#Punctuation') . '.';
           break;
           case 'i_you':
               $fault = 'This article contains the word "I" or "You". This may not be encyclopedic, unless it is part of a quotation. See ' . wp_link('WP:MOS#Usage and spelling');
           break;
       }
       return $fault;
   }
 
?>