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

From: Date: Sun, 19 Apr 2009 18:15:21 +0000
Subject: cvs: doc-editor / error_type.php /php ToolsError.php
Groups: php.doc.cvs 
Request: Send a blank email to doc-cvs+get-3810@lists.php.net to get a copy of this message
yannick Sun Apr 19 18:15:21 2009 UTC Modified files: /doc-editor/php ToolsError.php /doc-editor error_type.php Log: - Add a new check : nbProductnameTag http://cvs.php.net/viewvc.cgi/doc-editor/php/ToolsError.php?r1=1.6&r2=1.7&diff_format=u Index: doc-editor/php/ToolsError.php diff -u doc-editor/php/ToolsError.php:1.6 doc-editor/php/ToolsError.php:1.7 --- doc-editor/php/ToolsError.php:1.6 Sun Apr 19 14:30:40 2009 +++ doc-editor/php/ToolsError.php Sun Apr 19 18:15:21 2009 @@ -332,6 +332,7 @@ $this->nbMemberInSeeAlso(); $this->nbNoteTag(); $this->nbParaTag(); + $this->nbProductnameTag(); $this->nbSimparaTag(); $this->nbTipTag(); $this->nbVarnameTag(); @@ -1391,6 +1392,37 @@ } /** + * Check Nb <productname> tag + * Add an entry into the error's stack if an error is found + * + */ + function nbProductnameTag() + { + + $reg = '/<productname>/s'; + + $en_productname = 0; + $match = array(); + if (preg_match_all($reg, $this->en_content, $match)) { + $en_productname = count($match[0]); + } + + $lang_productname = 0; + $match = array(); + if (preg_match_all($reg, $this->lang_content, $match)) { + $lang_productname = count($match[0]); + } + + if ($en_productname != $lang_productname ) { + $this->addError(array( + "value_en" => $en_productname, + "value_lang" => $lang_productname, + "type" => "nbProductnameTag" + )); + } + } + + /** * Check Nb <acronym> tag * 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.9&r2=1.10&diff_format=u Index: doc-editor/error_type.php diff -u doc-editor/error_type.php:1.9 doc-editor/error_type.php:1.10 --- doc-editor/error_type.php:1.9 Sun Apr 19 14:28:58 2009 +++ doc-editor/error_type.php Sun Apr 19 18:15:21 2009 @@ -166,6 +166,9 @@ $error['nbLiteralTag']['head'] = 'Literal tag'; $error['nbLiteralTag']['desc'] = 'Throw if the number of <b>literal</b> tags is different from english version.'; +$error['nbProductnameTag']['head'] = 'Productname tag'; +$error['nbProductnameTag']['desc'] = 'Throw if the number of <b>productname</b> tags is different from english version.'; + $error['nbFilenameTag']['head'] = 'Filename tag'; $error['nbFilenameTag']['desc'] = 'Throw if the number of <b>filename</b> tags is different from english version.';

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