[web-doc] master: Document how to generate translation status data (closes #62)
| From: | Jim Winstead | Date: | Thu, 12 Dec 2024 19:48:41 +0000 |
| Subject: | [web-doc] master: Document how to generate translation status data (closes #62) | ||
| Groups: | php.doc.web | ||
| Request: | Send a blank email to doc-web+get-2541@lists.php.net to get a copy of this message | ||
Author: Jim Winstead (jimwins)
Date: 2024-12-12T11:37:36-08:00
Commit: https://github.com/php/web-doc/commit/5e42e512f1c7bad9f77ca69fc89958297c0080a8
Raw diff: https://github.com/php/web-doc/commit/5e42e512f1c7bad9f77ca69fc89958297c0080a8.diff
Document how to generate translation status data (closes #62)
Also remove out of date information about scripts that no longer exist
Changed paths:
M README.md
Diff:
diff --git a/README.md b/README.md
index 02d780d..253dd69 100644
--- a/README.md
+++ b/README.md
@@ -9,59 +9,23 @@ This can be run using PHP's [built-in web server][webserver]
for local development. For the guide pages to work, you also
need a local clone of the
doc-base repository.
+To generate the images for translation status, the GD extension
+is required.
+
+To generate the translation status, you'll also need the English version
+of the documentation and whatever languages you want to generate data
+about.
+
```sh
+# Leave empty to do all languages, must include 'en' if any listed
+$ PHP_LANGS=""
$ git clone https://github.com/php/web-doc.git
$ git clone https://github.com/php/doc-base.git
+$ php doc-base/languages.php --clone ${PHP_LANGS:---all}
+$ SQLITE_DIR="${PWD}/web-doc/sqlite"
+$ mkdir -p ${SQLITE_DIR}
+$ php doc-base/scripts/translation/genrevdb.php ${SQLITE_DIR}/status.sqlite.tmp ${PHP_LANGS:-$(php
doc-base/languages.php --all --list-ssv)}
$ cd web-doc
$ git clone https://github.com/php/web-shared.git shared
$ BASE_DOCS_PATH="${PWD}/../doc-base/docs" php -S localhost:8080 router.php
```
-
-The instructions below here are older and you may need to adapt them to
-run the tools for showing translation information.
-
----
-
-## Installation
-Requirements:
-- PHP 8
-- GD extension (for generating charts)
-- SQLite3
-
-1. Unpack a copy of JpGraph 4.3.4 into /include/jpgraph/
([here](http://jpgraph.net/download/download.php?p=1))
-2. Increase memory limit for PHP scripts to at least 32MB
-3. Fill in two configuration files
-- build-ops.php.sample (rename it to build-ops.php)
-- @GITDIR@ - absolute path to dir where scripts will clone GIT repos to and then use
them for generating data
-- @SQLITEDIR@ - absolute path to /sqlite/ directory
-- build-ops.sample (rename it to build-ops [no ext])
-- @PHP@ - path to the PHP executable file
-- @DOCWEB@ - absolute path to /www/ directory
-- @PHDDIR@ - absolute path to directory with PhD installed from Git master
-- @SCRIPTSDIR@- absolute path to /scripts/ directory
-- @SQLITEDIR@ - absolute path to /sqlite/ directory
-- @SRCDIR@ - path to the directory with PHP source code in GIT repo
-4. You need to run the scripts/populatedocs.sh to fetch all the required documentation for the
site.
-5. You need to run the scripts/generation.sh to generate the database and graphs (Time of
generation: 2.5009639263153 s)
-6. Configure the virtual host under Apache. Current suggested settings are:
-```
-<VirtualHost 127.0.0.1:80>
- ServerName doc.php.net
- ServerAdmin doc-web@lists.php.net
-
- DocumentRoot /path/to/docweb/www
-
- ErrorDocument 404 /error.php
- php_flag register_globals Off
- php_flag magic_quotes_gpc Off
- php_flag magic_quotes_runtime Off
-
- <Directory /path/to/docweb/www>
- Allowoverride FileInfo Options Limit
- Options -Indexes
- </Directory>
-</VirtualHost>
-```
-
-## TODO
-- add more cowbell