cvs: doc-editor / error_type.php /php ToolsError.php

From: Date: Sun, 19 Apr 2009 13:15:15 +0000
Subject: cvs: doc-editor / error_type.php /php ToolsError.php
Groups: php.doc.cvs 
Request: Send a blank email to doc-cvs+get-3801@lists.php.net to get a copy of this message
yannick Sun Apr 19 13:15:15 2009 UTC Modified files: /doc-editor/php ToolsError.php /doc-editor error_type.php Log: - Add new check : nbTipTags - fix spelling http://cvs.php.net/viewvc.cgi/doc-editor/php/ToolsError.php?r1=1.2&r2=1.3&diff_format=u Index: doc-editor/php/ToolsError.php diff -u doc-editor/php/ToolsError.php:1.2 doc-editor/php/ToolsError.php:1.3 --- doc-editor/php/ToolsError.php:1.2 Sun Apr 19 13:10:10 2009 +++ doc-editor/php/ToolsError.php Sun Apr 19 13:15:15 2009 @@ -327,6 +327,7 @@ $this->nbMemberInSeeAlso(); $this->nbNoteTag(); $this->nbParaTag(); + $this->nbTipTag(); // $this->nbVarnameTag(); $this->spaceOrPeriodRefpurposeTags(); @@ -1290,6 +1291,37 @@ } /** + * Check Nb <tip> tags + * Add an entry into the error's stack if an error is found + * + */ + function nbTipTag() + { + + $reg = '/<tip>/s'; + + $en_tip = 0; + $match = array(); + if (preg_match_all($reg, $this->en_content, $match)) { + $en_tip = count($match[0]); + } + + $lang_tip = 0; + $match = array(); + if (preg_match_all($reg, $this->lang_content, $match)) { + $lang_tip = count($match[0]); + } + + if ($en_tip != $lang_tip ) { + $this->addError(array( + "value_en" => $en_tip, + "value_lang" => $lang_tip, + "type" => "nbTipTags" + )); + } + } + + /** * Check Nb <varname> tags * Add an entry into the error's stack if an error is found * http://cvs.php.net/viewvc.cgi/doc-editor/error_type.php?r1=1.5&r2=1.6&diff_format=u Index: doc-editor/error_type.php diff -u doc-editor/error_type.php:1.5 doc-editor/error_type.php:1.6 --- doc-editor/error_type.php:1.5 Sun Apr 19 13:10:10 2009 +++ doc-editor/error_type.php Sun Apr 19 13:15:15 2009 @@ -120,16 +120,19 @@ $error['nbChapterTags']['head'] = 'Chapter tags'; $error['nbChapterTags']['desc'] = 'Throw if the number of <b>chapter</b> tags is different from english version.'; +$error['nbTipTags']['head'] = 'Tip tags'; +$error['nbTipTags']['desc'] = 'Throw if the number of <b>tip</b> tags is different from english version.'; + $error['nbEntryTags']['head'] = 'Entry tags'; $error['nbEntryTags']['desc'] = 'Throw if the number of <b>entry</b> tags is different from english version.'; $error['nbCommandTags']['head'] = 'Command tags'; $error['nbCommandTags']['desc'] = 'Throw if the number of <b>command</b> tags is different from english version.'; -$error['nbEmphasisTags']['head'] = 'Entry tags'; +$error['nbEmphasisTags']['head'] = 'Emphasis tags'; $error['nbEmphasisTags']['desc'] = 'Throw if the number of <b>emphasis</b> tags is different from english version.'; -$error['nbVarnameTags']['head'] = 'Entry tags'; +$error['nbVarnameTags']['head'] = 'Varname tags'; $error['nbVarnameTags']['desc'] = 'Throw if the number of <b>varname</b> tags is different from english version.'; $error['errorFieldsynopsisInitializer']['head'] = 'Fieldsynopsis tags';

« previous php.doc.cvs (#3801) next »