[prev in list] [next in list] [prev in thread] [next in thread] 

List:       php-doc-cvs
Subject:    [DOC-CVS] com doc/base: added "Not in EN Tree" section.: scripts/revcheck.php
From:       Yoshinari Takaoka <mumumu () php ! net>
Date:       2021-03-19 21:34:33
Message-ID: php-mail-f11cdb7a131499717411fe09f370f4cd1459686552 () git ! php ! net
[Download RAW message or body]

Commit:    79932f7dd943ac0a51ef90831f01c579ff04ef90
Author:    Yoshinari Takaoka <mumumu@mumumu.org>         Sat, 20 Mar 2021 06:34:33 +0900
Parents:   92a4f3c052af4b40a2fb7a0da14c2b3412257154
Branches:  master

Link:       http://git.php.net/?p=doc/base.git;a=commitdiff;h=79932f7dd943ac0a51ef90831f01c579ff04ef90

Log:
added "Not in EN Tree" section.

Changed paths:
  M  scripts/revcheck.php


Diff:
diff --git a/scripts/revcheck.php b/scripts/revcheck.php
index 99e91a361..65bd1aab2 100644
--- a/scripts/revcheck.php
+++ b/scripts/revcheck.php
@@ -281,7 +281,7 @@ function print_html_all( $enFiles , $trFiles , $lang )
     //print_html_wip();
     //print_html_revtagproblem();
     //print_html_untranslated();
-    //print_html_notinen();
+    print_html_notinen( $enFiles );
     print_html_footer();
 }
 
@@ -334,6 +334,58 @@ function print_html_menu( $href )
 HTML;
 }
 
+function print_html_notinen($enFiles)
+{
+    $exists = false;
+    $count = 0;
+    foreach( $enFiles as $key => $en )
+    {
+        if ( $en->syncStatus == FileStatusEnum::Untranslated ) {
+            $exists = true;
+            $count++;
+        }
+    }
+
+    if (!$exists) return;
+
+    print <<<HTML
+
+<p>&nbsp;</p>
+<a name="notinen"></a>
+<table width="600" border="0" cellpadding="3" cellspacing="1" align="center">
+ <tr>
+  <th>Not in EN Tree ($count files):</th>
+  <th>kb</th>
+ </tr>
+HTML;
+
+    $path = null;
+    foreach( $enFiles as $key => $en )
+    {
+        if ( $en->syncStatus != FileStatusEnum::Untranslated )
+            continue;
+        if ( !preg_match( "/^.*\.xml\$/", $en->name ) || $en->name === "versions.xml")
+            continue;
+        if ( $path !== $en->path )
+        {
+            $path = $en->path;
+            $path2 = $path == '' ? '/' : $path;
+            print " <tr><th class='blue' colspan='2'>$path2</th></tr>";
+        }
+        $size = $en->size < 1024 ? 1 : floor( $en->size / 1024 );
+
+    print <<<HTML
+
+ <tr class=bggray>
+  <td class="c">$en->name</td>
+  <td class="c">$size</td>
+ </tr>
+HTML;
+    }
+    print "</table>\n";
+    print "<p>&nbsp;</p>\n";
+}
+
 function print_html_footer()
 {
     print <<<HTML


--
PHP Documentation Commits Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic