cvs: phpdoc /scripts check-trans.php

From: Date: Sun, 08 Jun 2008 07:42:06 +0000
Subject: cvs: phpdoc /scripts check-trans.php
Groups: php.doc.cvs 
Request: Send a blank email to doc-cvs+get-1768@lists.php.net to get a copy of this message
yannick Sun Jun 8 07:42:06 2008 UTC Modified files: /phpdoc/scripts check-trans.php Log: modify section tag check http://cvs.php.net/viewvc.cgi/phpdoc/scripts/check-trans.php?r1=1.10&r2=1.11&diff_format=u Index: phpdoc/scripts/check-trans.php diff -u phpdoc/scripts/check-trans.php:1.10 phpdoc/scripts/check-trans.php:1.11 --- phpdoc/scripts/check-trans.php:1.10 Tue Apr 29 14:50:33 2008 +++ phpdoc/scripts/check-trans.php Sun Jun 8 07:42:06 2008 @@ -369,14 +369,12 @@ // section $en_section = array(); -preg_match_all("/<section(\s.*?)xml:id=\"(.*?)\"(\s.*?)xmlns=\"(.*?)\"(\s.*?)?>/s", $en_content, $match); -$en_section["xmlid"] = $match[2]; -$en_section["xmlns"] = $match[4]; +preg_match_all("/<section(\s.*?)xml:id=(\"|')(.*?)(\"|')(\s.*?)?>/s", $en_content, $match); +$en_section["xmlid"] = $match[3]; $lang_section = array(); -preg_match_all("/<section(\s.*?)xml:id=\"(.*?)\"(\s.*?)xmlns=\"(.*?)\"(\s.*?)?>/s", $lang_content, $match); -$lang_section["xmlid"] = $match[2]; -$lang_section["xmlns"] = $match[4]; +preg_match_all("/<section(\s.*?)xml:id=(\"|')(.*?)(\"|')(\s.*?)?>/s", $lang_content, $match); +$lang_section["xmlid"] = $match[3]; for( $i=0; $i < count($en_section["xmlid"]); $i ++ ) { if( $en_section["xmlid"][$i] != $lang_section["xmlid"][$i] ) { @@ -390,18 +388,6 @@ } } -for( $i=0; $i < count($en_section["xmlns"]); $i ++ ) { - if( $en_section["xmlns"][$i] != $lang_section["xmlns"][$i] ) { - $nb_error['section'] ++; - $result_error[] = array( - "libel" => "Error in section, attribut : xmlns", - "value_en" => $en_section["xmlns"][$i], - "value_lang" => $lang_section["xmlns"][$i] - ); - - } -} - // END : section

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