Re: [PHP-DOC] Cygwin troubles (absolute paths) (Was: dropping the unix
Gabor Hojtsy wrote: I'm having troubles compiling the manual under Cygwin. Absolute paths don't work, sometimes I get /phpdoc (the Cygwin absolute path), sometimes c:\cygwin\phpdoc (the Windows absolute path). This is the common 'cd' problem. First when you launch the bash shell, you need to get to the phpdoc folder with *Windows* cd calls, and not relative cd calls. So enter cd c:/work/phpdoc (assmuing you have phpdoc checked out to c:/work). This will make all the cygwin tools (eg 'pwd' return windows paths instead of cygwin paths). Thank you, that was (part of) the problem. I had my CVS tree inside the Cygwin tree (c:\cygwin\phpdoc), and that doesn't seem to work. `./configure` and `make test` work, but `make html` crashes. That's a problem I'll handle tomorrow. This is the list of Cygwin packages that I think is the minimum for testing the manual. It's already 90 Mb, so if I could throw anything out, that would be great (Perl alone is 25 Mb). Entries starting with an arrow are basic requirements for the automake and configure step, entries after the : are their requirements. Well, since autoconf seems to require perl, unfortunately we cannot drop that requirement... Is perl an atomic part in cygwin? It's just a simple .tar.gz file, but I'll repackage it for the SDK MSI, so I think I can leave a lot of CPAN packages out. I think the uncompressed package will be 75 Mb. Compressed maybe 25 Mb. That's still a lot, but it's a start. Greetings, Jan Fabry
[PHP-DOC] Cygwin troubles (absolute paths) (Was: dropping the unix tools)
I'm having troubles compiling the manual under Cygwin. Absolute paths don't work, sometimes I get /phpdoc (the Cygwin absolute path), sometimes c:\cygwin\phpdoc (the Windows absolute path). First I tried a minimal Cygwin installation, with PHP (4.3.4 CLI) and OpenJade in /opt/php and /opt/openjade. This didn't work. Then I installed the rest of the Cygwin standard distribution, and used the ../phpdoc-tools/ directory. This doesn't seem to work with OpenJade (somebody please update the configure.in script, I'm no autoconf expert), so I put Jade in. This still didn't work. How have others solved this problem? I know this is a very basic problem, but I'm stuck on it. And if I can't get Cygwin working, I can't continue with the SDK MSI package. Greetings, Jan Fabry This is the list of Cygwin packages that I think is the minimum for testing the manual. It's already 90 Mb, so if I could throw anything out, that would be great (Perl alone is 25 Mb). Entries starting with an arrow are basic requirements for the automake and configure step, entries after the : are their requirements. _update-info-dir: texinfo ash ash: cygwin -> autoconf: ash autoconf-devel autoconf-stable autoconf-devel: m4 perl mktemp texinfo _update-info-dir autoconf-stable: m4 perl mktemp base-passwd: cygwin ash bash: cygwin termcap _update-info-dir crypt: cygwin -> cvs: ash cygwin libgdbm4 crypt textutils _update-info-dir cygwin: libintl2 _update-info-dir base-passwd fileutils: ash cygwin libncurses5 terminfo libintl2 libiconv2 -> gawk: ash cygwin libiconv2 libintl2 -> grep: ash cygwin libintl1 libpcre libdb4.1: cygwin libgdbm3: cygwin libgdbm4: cygwin libgettextpo0: cygwin libintl2 libiconv2 libiconv2: cygwin libintl2 libintl1: cygwin libintl2: cygwin libiconv2 libncurses5: cygwin terminfo libpcre: cygwin libxml: cygwin libiconv2 zlib -> libxslt: cygwin libxml2 libiconv2 zlib m4: [none] -> make: cygwin fileutils ash libintl2 libiconv2 mktemp: cygwin perl: cygwin libgdbm3 libdb4.1 crypt termcap: cygwin terminfo: [none] texinfo: cygwin libintl1 libgettextpo0 textutils: ash cygwin libintl1 zlib: cygwin
[PHP-DOC] Re: dropping the unix tools
I'm playing a bit with MSI (Windows Installer) packages, to get a 'PHP-doc SDK' for Windows. It will include: - PHP CLI, configured and ready to use (from Cygwin) - OpenJade (some builds still need it), configured and ready to use - Cygwin, a minimal install to get you running (this is hard to determine) Because I do this work on an old computer with Windows 98 and only the SDK's I can get for free from Microsoft's website (my other computers run Linux and Mac OS X Panther :-) ), and I knew nothing about MSI's until yesterday, I would be very happy if I could show you something on Sunday evening. Greetings, Jan Fabry Jan Fabry wrote: Would it be possible to create a special version of Cygwin, with only those apps we need for building? The only extra thing you need now is (Open)Jade, all the other tools come with the standard Cygwin. If we could add (Open)Jade to Cygwin, remove the other applications, and call the result 'The PHP-Doc Windows SDK', would that help some people? We could also add PHP to the mix of course, I don't know how hard that is to set up on Windows. This is just an idea, I don't have any experience with extending Cygwin or changing the installer. Greetings, Jan Fabry
[PHP-DOC] Re: dropping the unix tools
Would it be possible to create a special version of Cygwin, with only those apps we need for building? The only extra thing you need now is (Open)Jade, all the other tools come with the standard Cygwin. If we could add (Open)Jade to Cygwin, remove the other applications, and call the result 'The PHP-Doc Windows SDK', would that help some people? We could also add PHP to the mix of course, I don't know how hard that is to set up on Windows. This is just an idea, I don't have any experience with extending Cygwin or changing the installer. Greetings, Jan Fabry
[PHP-DOC] Tag reference
Hello, Since we are going to transfer to LiveDocs, and LiveDocs only translates some of the DocBook tags, should we add our own tag reference to the Documentation howto? Just a thought... Greetings, Jan Fabry
[PHP-DOC] RFE: Add version info in the documentation
Hello, I was thinking about adding version info in the documentation. If we encode version info in attributes of the documentation, we can generate multiple version of the manual, for example for PHP 4 and PHP 5, from the same source. Instead of: In PHP 4, blah blah. But in PHP 5, bleh bleh. You would get: blah blah. bleh bleh. Then we could choose to generate manuals for PHP 4 only, or PHP 5 only, or maybe just PHP 4.3.0, ... This would also reduce confusion with changing function prototypes, new functions, CVS-only stuff, ... Of course, we could also add ranges, like version-from and version-until. This would require a little extension to the DocBook DTD, but more importantly a (big) change in the build process. It's just an idea, any reactions? Greetings, and meery Christmas to those who celebrate it, Jan Fabry
Re: [PHP-DOC] Downloadable w/User Comments
Derek Ford wrote: Gabor Hojtsy wrote: Only a special CHM version is available with all the notes, and only in English currently. We have nice plans but we are also short on time. :( It would take a l(insert a large amount of o's here)ooong time to translate the comments into other languages. I don't think Goba was talking about translating the comments, only the manual itself. Right now, you have CHM versions in all languages, but if you want a version with comments, you can only choose the English manual. It would be nice if there would be a French, Dutch, German, ... version with the (original, English) comments, just like you can see them on the on-line version. Greetings, Jan Fabry
[PHP-DOC] Re: Idea: quickref.swf
B Ferguson wrote: I agree that it would be better to have a only gnu software running on the php site but swf is completely free. I would also like to know where you get your statistics from to show that less people are running js then are swf. I would also like to know the difference in the numbers. Brendan This is not about GNU software, or free/open software: JavaScript is natively supported in all current browsers with a GUI. To view SWF, you need a plugin. All browsers that support the SWF plugin also support JavaScript, however, there are no browsers that support the SWF plugin, but do not support JavaScript. This means there cannot be more browsers supporting SWF then there are supporting JavaScript. I can't give you real numbers, but the difference is at least 1: I use Mozilla without the SWF plugin. SWF also breaks common GUI widgets, and switching between them. You can tab around a HTML form, but this no longer works when you mix it with SWF widgets. If we would choose SWF, this would completely replace the current search box. If we choose JS, this would only be an extension to the current search box. This means users without SWF can't see the search box at all, while users without JS can use the search box, they just don't get instant results. Think about users in a limited situation: sometimes SSH and Lynx is all you have, when you need to search for the correct syntax of a function. Greetings, Jan Fabry
[PHP-DOC] Re: quickref.swf
B Ferguson wrote: I would have tried a different compression, however, this one may work better as long as the list is all ways alphabetical. If we want to use binary searching, the list should be alphabetical. I see no problem with that: the list is auto-generated, so why not sort it first? To optimize the list further, I would pick several hex characters, preferably in a row that will not occur in a function name. We use these instead of the 123 characters because we can add a default of no value. We would have to pick what the best default value was. It will probably end up being the value that was before it. This would effectively reduce some space and would also make it near to imposable for someone to edit the file in a text editor. This means the file will have to be created by a bot. I don't really understand what you are saying here. Could you give an example of this type of compression, or some pointers to more information about it? I only used this 'prefix compression' because I knew it, and it is easy to decompress in JavaScript. It is also quite effective with this list (lots of common prefixes). The second idea that I think may be good was discussed a little earlier. Break the string up into a single string per letter. Do you mean "break the array up into a single array per letter"? After the user types the first letter of the search word, the drop down list would download and appear. Lets think about how may users are going to type e.. c.. h.o and wait for all the words to come up? Most (I think) would type something like ech..o after they see that the last letter is in fact o. This should give us a little time to load a little file. In my case, I would rather wait a bit for a small file to load rather then go to a search not found page. But I would also rather not wait for a file to load(even if it did load at the begining) if I know what I wanted (and I normally do.) Is anyone following my argument? Fast first page. If you know what you want, don't wait for small file (if you can beat it) and if you don't know what you want, wait a sec. Dynamically loading files using JavaScript is not so easy. I really think loading the full file at once is the best way to go. If the file hasn't loaded yet, you can use the search box like it works now: enter a function name, and press enter to go to the correct manual page. Only if the file has loaded, a list appears when you enter values. If you enter an existing function name, the script will recognise this, and send you directly to the correct manual page. So it is only an addition, which doesn't make the loading of the main page any slower, just like loading an image doesn't prevent you from reading the text on the same page. If we offer the user a direct search function, it should work instantly. That means either it doesn't give any results (if the JS file hasn't loaded yet), or it gives results as you type. You don't have time to wait for an additional file to load. Greetings, Jan Fabry
[PHP-DOC] Re: Idea: quickref.swf
Curt Zirzow wrote: * Thus wrote Jan Fabry ([EMAIL PROTECTED]): I have created some sort of compression. [ ... ] If someone knows a script that does this kind of compression, or would like to write it, you're welcome. Done :) http://zirzow.dyndns.org/prefix_worddic/ Thanks for the script! You can test the full decompression on my site. Mozilla is really fast, Safari and Internet Explorer take some time. [ http://lumumba.luc.ac.be/cheezy/misc/php/prefix_compression.html ] The full list is 42kB, the compressed list is 25kB. I have updated the main search script with this compressed list, it is now 32kB (with whitespace removed). It still contains some bugs, so be careful with it! [ http://lumumba.luc.ac.be/cheezy/misc/php/quickref_bs.html ] Greetings, Jan Fabry
[PHP-DOC] Re: Idea: quickref.swf
Gabor Hojtsy wrote: OK, we can reduce th size significantly if we use a function to build up the array of function names, like: addWithPrefix("cdpf_set_", new Array( "action_url", [ ... ] "viewer_preferences", "word_spacing")); This might not be the correct JS sytnax, but you can get it. We only use the cpdf_set_ prefix once instead of multiple times (all these function names start with that prefix). We need to make this prefix optimization automated if we would like to generate small files, so some PHP code can decide on what functions to add with this prefix trick. This does not mean that PHP will generate the JS on the fly. It can be generated on the rsync server to a static file. It will be updated if the function list changes. Would someone have some motivation to look into this prefix optimization (or any other size decrease ideas for that matter)? I beleive we can significantly reduce the size of the JS this way. I have created some sort of compression. It assigns a number to each word, which says how much of the first letters are in common with the previous word. It's only one hexadecimal character, so it is in the range 0-15. I don't know the official name, but I saw it in ispell dictionary files. I call it 'prefix compression', but this name already stands for another type of compression. An example to make this clear: _ abs acos acosh add addaction addcolor addcslashes addentry addfill addshape addslashes addstring aggregate aggregate_methods aggregate_methods_by_list aggregate_methods_by_regexp aggregate_properties aggregate_properties_by_list aggregate_properties_by_regexp becomes 0_ 0abs 1cos 4h 1dd 3action 3color 4slashes 3entry 3fill 3shape 4lashes 4tring 1ggregate 9_methods Fds_by_list Fds_by_regexp Aproperties Frties_by_list Frties_by_regexp If someone knows a script that does this kind of compression, or would like to write it, you're welcome. You can find an example with the function names from '_' till 'cyrus_unbind' (with manual compression!) on [ http://lumumba.luc.ac.be/cheezy/misc/php/prefix_compression.html ] This gives a compression from 3588 bytes to 2261 bytes (that would reduce the full lists from 42kB to 25-30kB, so the complete file would be about 45kB (or 40kB if we remove all whitespace)). The 'uncompression code' is really short, and it doesn't give a noticable speed difference. Last version for reference: But still with lots of bugs. Maybe I can do the searching on the compressed text, this might give a speedup. [ http://lumumba.luc.ac.be/cheezy/misc/php/quickref_bs.html ] Goba Jan Fabry
[PHP-DOC] Re: Idea: quickref.swf
So it seems I really learned something useful during my first CS year... I have reworked the search function, it now uses 'binary searching'. This greatly reduces the search times. It needs some debugging, but the first results seem promising. I have also changed the array loading code, it should load faster this way (due to the way arrays are handled internally). The file size is about 56kB (which is just over twice the size of the PHP main page, without images). You can see the result at: [ http://lumumba.luc.ac.be/cheezy/misc/php/quickref_bs.html ] I'm not saying this should go on the main site, but if I would have to choose between a swf and this js solution, I would chose JavaScript. Greetings, Jan Fabry
[PHP-DOC] Re: Documentation translation
Pur Si Simplu wrote: Hello! I would like to translate in Romanian some of the PHP docs. How should I proceed? Thank You! There already is a Romanian translation effort, you should join that group. I don't think there is a real 'leader', so you should check one of the five people with a CVS account (they are the ones that can change the files on the central PHP server. They are: - Adrian Jurjica [ [EMAIL PROTECTED] ] - Adrian Spinei [ [EMAIL PROTECTED] ] - Adrian Ciutureanu [ [EMAIL PROTECTED] ] - Paul Dorneanun [ [EMAIL PROTECTED] ] - Dan Bajarca [ [EMAIL PROTECTED] ] They co-ordinate the Romanian Translation effort, so you can contact them and ask how to join them. Greetings, Jan Fabry
Re: [PHP-DOC] cvs: phpdoc /en/reference/image/functionsimagecreatetruecolor.xml
On Tue, 2003-08-26 at 09:30, Dallas Thunder wrote: > dallasTue Aug 26 03:30:24 2003 EDT > > Modified files: > /phpdoc/en/reference/image/functions imagecreatetruecolor.xml > Log: > I suppose it is blank. You suppose so, but have you tried it? I have, and it returns a *black* image. Please restore the correct version. Greetings, Jan Fabry > > Index: phpdoc/en/reference/image/functions/imagecreatetruecolor.xml > diff -u phpdoc/en/reference/image/functions/imagecreatetruecolor.xml:1.6 > phpdoc/en/reference/image/functions/imagecreatetruecolor.xml:1.7 > --- phpdoc/en/reference/image/functions/imagecreatetruecolor.xml:1.6 Fri Jun 20 > 09:00:52 2003 > +++ phpdoc/en/reference/image/functions/imagecreatetruecolor.xml Tue Aug 26 > 03:30:23 2003 > @@ -1,5 +1,5 @@ > > - > + > > > > @@ -15,7 +15,7 @@ > > > imagecreatetruecolor returns an image identifier > -representing a black image of size x_size > +representing a blank image of size x_size > by y_size. > > > @@ -33,8 +33,8 @@ > imagestring ($im, 1, 5, 5, "A Simple Text String", $text_color); > imagepng ($im); > imagedestroy ($im); > -?> > -]]> > +?> > +]]> > > >
Re: [PHP-DOC] cvs: phpdoc /en/faq html.xml
Hello, I didn't notice this until translating it, so it's a bit late, but... On Sun, 2003-08-17 at 21:09, Derick Rethans wrote: > derickSun Aug 17 15:09:25 2003 EDT > > Modified files: > /phpdoc/en/faqhtml.xml > Log: > - Pretty up examples > > > Index: phpdoc/en/faq/html.xml > diff -u phpdoc/en/faq/html.xml:1.21 phpdoc/en/faq/html.xml:1.22 > --- phpdoc/en/faq/html.xml:1.21 Tue Apr 8 23:22:19 2003 > +++ phpdoc/en/faq/html.xmlSun Aug 17 15:09:25 2003 [ snip ] > @@ -233,7 +233,7 @@ >are all passed with the same widget name. ie. > > > >Each selected option will arrive at the action handler as: > @@ -248,7 +248,7 @@ >should be used: > > > >This tells PHP to treat $var as an array and Greetings, Jan Fabry
[PHP-DOC] Working on Mac OS X
Hello, I would like to hear from people who write or translate the manual on Max OS X. I haven't found a simple XML editor for it yet, so I'm using the Eclipse platform (which might be overkill for this type of work). I installed OpenJade using Fink, but it segfaults while compiling the manual. I'm not afraid of using the console. I used to work with vi, but the vi(m) that comes with OS X or Fink isn't as nice as the one that comes with Red Hat 9, which I used before. Any pointers to programs that might help me are welcome. GPL software preferred, of course. Greetings, Jan Fabry -- PHP Documentation Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DOC] my CVS blues :(
On Tue, 2003-08-12 at 18:42, Gabor Hojtsy wrote: > Hi! > > I have tried to set up several visual CVS clients to my new RedHat9, but > I was unable to make at least one provide the basic functions. In case > anyone has suggestions on this, please do not hesitate to inform me :) > > Cervisia: > > This does not start at all, and provides no error message... Have you tried starting it from the Terminal (shell window, command line, whatever)? This way, you could see what gets written to STDOUT and I was able to use Cervisia in Red Hat 9, but I don't know what other packages I installed for it. If that doesn't work, maybe you can use jCVS [ http://www.jcvs.org/ ], which is written in Java. It's not as elegant as Cervisia (it doesn't follow the Bluecurve theme), but it works. I hope this helps you a bit further, Greetings, Jan Fabry -- PHP Documentation Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-DOC] Files with executable permissions
Hello, Some XML source files in the en/ tree have their executable permissions set [1]. Is there a specific reason for this? This is a bit confusing, for example for translators: I first thought it meant something like "Do not translate", or another warning about the file. Maybe they were inserted into the repository from a Windows computer? I have noticed that files on a Windows computer, when accessed from a Linux computer, have their executable permissions set. Greetings, Jan Fabry [1]: To see these files for yourself, you can do `find -perm -111 -type f` in the en/ tree. I found 33 matches. -- PHP Documentation Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-DOC] Character encoding (UTF-8 vs ISO-8859-1)
Hello, The default encoding for the PHP manual is ISO-8859-1. Some other languages get special encodings (you can find these in configure.in, around line 655). This gives problems for some common languages. If you take a look at the French translation of the echo function [ http://php.net/manual/fr/function.echo.php ], you see the character entities (like é) in the code example aren't replaced by the correct character. This is because in the XML source file, code examples appear inside sections, and entities aren't read there. If we could place the correct character instead of the entity there (and in the rest of the manual), these problems wouldn't occur. I have noticed that this gives problems if the compilation happens in the default ISO-8859-1 encoding, but not with UTF-8. What would be the implication of changing the default encoding from ISO-8859-1 to UTF-8? What would break? What changes in the source files would be needed? I have searched the list archives for an earlier discussion of this subject, but couldn't find anything. Greetings, Jan Fabry -- PHP Documentation Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-DOC] cvs: phpdoc /scripts revcheck.php
cheezy Wed Jul 23 18:29:04 2003 EDT Modified files: /phpdoc/scripts revcheck.php Log: Show file sizes in summary, link to English version in CVS for untranslated files Index: phpdoc/scripts/revcheck.php diff -u phpdoc/scripts/revcheck.php:1.34 phpdoc/scripts/revcheck.php:1.35 --- phpdoc/scripts/revcheck.php:1.34Sun Dec 22 04:45:57 2002 +++ phpdoc/scripts/revcheck.php Wed Jul 23 18:29:04 2003 @@ -17,6 +17,7 @@ # | Authors:Thomas Schöfbeck <[EMAIL PROTECTED]> | # | Gabor Hojtsy <[EMAIL PROTECTED]> | # | Mark Kronsbein <[EMAIL PROTECTED]> | +# | Jan Fabry <[EMAIL PROTECTED]> # +--+ */ if ($argc < 2 || $argc > 3) { @@ -40,6 +41,7 @@ Authors: Thomas Schöfbeck <[EMAIL PROTECTED]> Gabor Hojtsy <[EMAIL PROTECTED]> Mark Kronsbein <[EMAIL PROTECTED]> + Jan Fabry <[EMAIL PROTECTED]> $file, @@ -679,10 +687,13 @@ File status type Number of files Percent of files +Size of files (kB) +Percent of size END_OF_MULTILINE; $files_sum = array_sum($files_by_mark); +$file_sizes_sum = array_sum($file_sizes_by_mark); $file_types = array( array (REV_UPTODATE, "Up to date files"), @@ -699,10 +710,13 @@ "".$type[1]."". "".intval($files_by_mark[$type[0]])."". "".number_format($files_by_mark[$type[0]] * 100 / $files_sum, 2 ). - "%\n"; + "%". + "".intval($file_sizes_by_mark[$type[0]])."". + "".number_format($file_sizes_by_mark[$type[0]] * 100 / $file_sizes_sum, 2). + "%\n"; } - print "Files total$files_sum100%\n". + print "Files total$files_sum100%$file_sizes_sum100%\n". "\n \n"; } @@ -923,7 +937,7 @@ $prev_dir = $new_dir; } -print "$short_file" . +print "http://cvs.php.net/co.php/phpdoc/en/$file\";>$short_file" . "$info[0]\n"; } print "\n \n$navbar \n"; @@ -933,4 +947,4 @@ // All OK, end the file print "\n\n"; -?> \ No newline at end of file +?> -- PHP Documentation Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-DOC] cvs: phpdoc /dtds translation.dtd
cheezy Wed Jul 23 17:56:02 2003 EDT Modified files: /phpdoc/dtdstranslation.dtd Log: Make the DTD valid Index: phpdoc/dtds/translation.dtd diff -u phpdoc/dtds/translation.dtd:1.2 phpdoc/dtds/translation.dtd:1.3 --- phpdoc/dtds/translation.dtd:1.2 Tue Apr 16 13:44:33 2002 +++ phpdoc/dtds/translation.dtd Wed Jul 23 17:56:02 2003 @@ -44,6 +44,6 @@ name CDATA#REQUIRED person IDREF#REQUIRED type CDATA#REQUIRED -date CDATA -revision CDATA +date CDATA#IMPLIED +revision CDATA#IMPLIED > -- PHP Documentation Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-DOC] Translation priority (popular pages)
Hello, Is it possible to get detailed statistics about the most read (visited) manual pages? That way, translators know what chapters to translate first. I have seen some mirror site statistics [1], but they only list the top-10 or top-15 of the whole site, not only the manual, and only of that mirror. Greetings, Jan Fabry [1]: To see which mirror has stats, go to [ http://php.net/source.php?url=/include/mirrors.inc ]. If the third key in the array is TRUE, this site has stats, and you can visit them at [ http://MIRROR.php.net/stats ]. -- PHP Documentation Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DOC] File sizes in revcheck.php
On Tue, 2003-07-22 at 14:09, Gabor Hojtsy wrote: > Feel free to add this to the script. I don't have a CVS account (yet), because I've joined the nl team only a few weeks ago, and I first want to work with a more experienced reviewer above me. And I try to stay inside the nl/ tree, so if one of the original authors of the script thinks it's a good addition, (s)he can add it. Greetings, Jan Fabry -- PHP Documentation Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-DOC] File sizes in revcheck.php
Hello, We all know size doesn't matter, but to have a better overview of the status of a translation, I've modified scripts/revcheck.php to include file sizes in the "File summary by type". This patch also adds links to the "Untranslated files", so you can see the English version of those files in the CVS. I hope this patch is useful to someone, Greetings, Jan Fabry --- revcheck.php2003-07-12 12:54:08.0 +0200 +++ revcheck.size.php 2003-07-13 02:47:27.0 +0200 @@ -173,6 +173,7 @@ { // The information is contained in these global arrays and vars global $DOCDIR, $LANG, $MAINT, $files_by_mark, $files_by_maint; +global $file_sizes_by_mark; global $missing_files, $missing_tags, $using_rev; // Transform english file name to translated file name @@ -182,7 +183,9 @@ if ([EMAIL PROTECTED]($trans_file)) { $files_by_mark[REV_NOTRANS]++; $trans_name = substr($trans_file, strlen($DOCDIR) + strlen($LANG) + 1); -$missing_files[$trans_name] = array( round(filesize($file)/1024, 1) ); +$size = round(filesize($file)/1024, 1); +$missing_files[$trans_name] = array( $size ); +$file_sizes_by_mark[REV_NOTRANS] += $size; // compute en-tags just if they're needed in the WIP-Table if($using_rev) { $missing_files[$trans_name][] = "1.".get_tags($file); @@ -220,6 +223,7 @@ // file in the missing tags list if (count($trans_tag) == 0) { $files_by_mark[REV_NOTAG]++; +$file_sizes_by_mark[REV_NOTAG] += $en_size; $missing_tags[] = array(substr($trans_file, strlen($DOCDIR)), $en_size, $trans_size, $size_diff); return FALSE; } @@ -247,6 +251,7 @@ // Store file by status and maintainer $files_by_mark[REV_UPTODATE]++; $files_by_maint[$this_maint][REV_UPTODATE]++; +$file_sizes_by_mark[REV_UPTODATE] += $en_size; return FALSE; } @@ -268,6 +273,7 @@ // Store files by status, and by maintainer too $files_by_mark[$status_mark]++; $files_by_maint[$this_maint][$status_mark]++; +$file_sizes_by_mark[$status_mark] += $en_size; return array( "full_name" => $file, @@ -679,10 +685,13 @@ File status type Number of files Percent of files +Size of files (kB) +Percent of size END_OF_MULTILINE; $files_sum = array_sum($files_by_mark); +$file_sizes_sum = array_sum($file_sizes_by_mark); $file_types = array( array (REV_UPTODATE, "Up to date files"), @@ -699,10 +708,13 @@ "".$type[1]."". "".intval($files_by_mark[$type[0]])."". "".number_format($files_by_mark[$type[0]] * 100 / $files_sum, 2 ). - "%\n"; + "%". + "".intval($file_sizes_by_mark[$type[0]])."". + "".number_format($file_sizes_by_mark[$type[0]] * 100 / $file_sizes_sum, 2). + "%\n"; } - print "Files total$files_sum100%\n". + print "Files total$files_sum100%$file_sizes_sum100%\n". "\n \n"; } @@ -923,7 +935,7 @@ $prev_dir = $new_dir; } -print "$short_file" . +print "http://cvs.php.net/co.php/phpdoc/en/$file\";>$short_file" . "$info[0]\n"; } print "\n \n$navbar \n"; -- PHP Documentation Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DOC] request for splitting
(of course, I didn't 'Reply to list' - sorry Friedhelm!) On Sat, 2003-07-19 at 16:00, Friedhelm Betz wrote: > some files under /language are really huge and a pain ;-) to translate. > What do you think about splitting them up to make them a bit easier to handle > and translate? How would this make the translation easier? If you split up a large file into smaller parts, you still have to translate all those parts. I don't see an improvement in splitting up the files, unless you also rewrite parts of the documentation, to make things clearer or so. Greetings, Jan Fabry -- PHP Documentation Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DOC] cvs: phpdoc /en/chaptersinstall.configure.servers.xml
I've seen more diff's like this that list many lines as modified while they aren't. This makes it hard to see real differences. Is there a way to prevent this situation? Greetings, Jan Fabry -- PHP Documentation Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DOC] Compilation errors (file-entities.ent cannot befopen'ed)
I figured out what the problem was: the PHP that ships with Red Hat is configured with --enable-safe-mode, and this directive is commented out in scripts/php.ini. If I re-enable it, everything works. safe_mode seems to be commented out in php.ini since the first version in CVS, is there a specific reason for this? Are there any pointers to 'uncommenting' this directive? I couldn't find anything about it in the PHP Documentation HOWTO (like, "what to do if compilation doesn't work" or something like that). Anyway, I'm glad it works, so I can start real translation work. Greetings, Jan Fabry PS: Good that I found this on my own, it seems everybody is at LinuxTag ;) On Wed, 2003-07-09 at 04:10, Jan Fabry wrote: > Hello, > > When trying to compile the PHP documentation, I keep getting the same > error: > > ERROR: Failed to open /home/cheezy/phpdoc-nl/entities/file-entities.ent > for writing > > I have searched the list archives, but could only find older articles > dealing with this problem, and they couldn't help me. It seems that all > calls to fopen in scripts/file-entities.php fail, but I have no idea > why. If I try to fopen file-entities.ent from another php file, it > works. > > I am using the PHP that came with Red Hat 9 (one upgrade), 4.2.2[-17.2]. > The directory is writeable, if I `touch` the file and test if it > is_writable from file-entities.php, it all works, only the fopen fails. > > I have checked out the latest version of the documentation as phpdoc-nl, > autoconf works, and then configure fails. > > Any pointers to more information are appreciated. > > Greetings, > > Jan Fabry > -- PHP Documentation Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-DOC] Compilation errors (file-entities.ent cannot be fopen'ed)
Hello, When trying to compile the PHP documentation, I keep getting the same error: ERROR: Failed to open /home/cheezy/phpdoc-nl/entities/file-entities.ent for writing I have searched the list archives, but could only find older articles dealing with this problem, and they couldn't help me. It seems that all calls to fopen in scripts/file-entities.php fail, but I have no idea why. If I try to fopen file-entities.ent from another php file, it works. I am using the PHP that came with Red Hat 9 (one upgrade), 4.2.2[-17.2]. The directory is writeable, if I `touch` the file and test if it is_writable from file-entities.php, it all works, only the fopen fails. I have checked out the latest version of the documentation as phpdoc-nl, autoconf works, and then configure fails. Any pointers to more information are appreciated. Greetings, Jan Fabry -- PHP Documentation Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php