[DOC-CVS] [doc-base] master: Disable doc-ro in languages.php and document core.autocrlf usage (#248)

[email protected] (alfsb via GitHub)
Newsgroups php.doc.cvs
Message-ID <[email protected]>
Author: alfsb (alfsb)
Committer: GitHub (web-flow)
Pusher: alfsb
Date: 2025-08-22T13:07:16-03:00

Commit: https://github.com/php/doc-base/commit/bfa83674be77b56692dee782c1020f4ab6a42723
Raw diff: https://github.com/php/doc-base/commit/bfa83674be77b56692dee782c1020f4ab6a42723.diff

Disable doc-ro in languages.php and document core.autocrlf usage (#248)

* Disable doc-ro on languages.php and document core.autocrlf usage
* git add --renormalize does net revert on Windows, comment tweaks.
* Keep documented repositories, false/false to inactive a language.

Changed paths:
  M  docs/local-setup.md
  M  languages.php


Diff:

diff --git a/docs/local-setup.md b/docs/local-setup.md
index a96cba607..103d9add2 100644
--- a/docs/local-setup.md
+++ b/docs/local-setup.md
@@ -1,6 +1,6 @@
 # Setting up a local development environment
 
-This guide assumes that you are comfortable working with on the
+This guide assumes that you are comfortable working on the
 command line with tools like Git.
 
 There are instructions for building [with Docker](#with-docker) or
@@ -10,10 +10,10 @@ will be building with a version of PHP that is known to work.
 
 When working with multiple translations, or working on changes that may
 also require changing files in the `doc-base` or `phd` repositories, the
-suggested way to organize the local enviroment is to clone repositories
+suggested way to organize the local environment is to clone repositories
 into a single `phpdoc` directory, and for individual languages to be cloned
 into directories named `{LANG}` instead of `doc-{LANG}` as they are named
-on GitHub.
+on GitHub. See `doc-base/languages.php` script to automate this process.
 
 <a name="with-docker"></a>
 ## Building with make and Docker
@@ -38,7 +38,7 @@ building, otherwise the latest revision of those repositories from GitHub
 will be built into the Docker image used.
 
 To force the Docker image used for building to itself be rebuilt, run
-`make -B build`, otherwise the `Makefile` will only build it if does not
+`make -B build`, otherwise the `Makefile` will only build it if it does not
 already exist.
 
 The web version of the documentation with `make php` and the output will
@@ -103,3 +103,34 @@ To build the version for the website (with a [local web setup](local-web-setup.m
 $ php phd/render.php --docbook doc-base/.manual.xml --package PHP --format php
 $ open https://localhost:8080/manual/en/
 ```
+
+<a name="windows-eol"></a>
+## Translating on Windows
+
+When working on Windows, try to use text editors that preserve the end
+of line mark as `U+000A LINE FEED (LF)` only. If it's not possible,
+you may issue the commands below to instruct `git` in transforming
+the files in your local clone to use the Windows native end of line
+mark:
+
+```
+cd LANG
+git config core.autocrlf true
+git add --renormalize .
+git status
+```
+
+If the last comment above outputs no files, then the process works,
+and you can start translating.
+
+If the last command above shows a list of files, something went wrong,
+because these listed files will be changed at *repository level*
+in the next commit. There should be *none*. If any files are listed,
+revert the changes with commands below and open an issue on
+`doc-base` repository.
+
+```
+git config --unset core.autocrlf
+git reset
+git status
+```
\ No newline at end of file
diff --git a/languages.php b/languages.php
index 680261482..5926b777e 100644
--- a/languages.php
+++ b/languages.php
@@ -16,8 +16,8 @@
 +------------------------------------------------------------------------------+
 */
 
-//     dir     manual  revcheck  cloneUrl                          label
-
+// Languages repositories on GitHub
+//    dir     manual  revcheck  cloneUrl                          label
 lang( "de"    , true  , true  , "[email protected]:php/doc-de.git" , "German" );
 lang( "en"    , true  , false , "[email protected]:php/doc-en.git" , "English" );
 lang( "es"    , true  , true  , "[email protected]:php/doc-es.git" , "Spanish" );
@@ -26,7 +26,7 @@
 lang( "ja"    , true  , true  , "[email protected]:php/doc-ja.git" , "Japanese" );
 lang( "pl"    , false , true  , "[email protected]:php/doc-pl.git" , "Polish" );
 lang( "pt_BR" , true  , true  , "[email protected]:php/doc-pt_br.git" , "Brazilian Portuguese" );
-lang( "ro"    , false , true  , "[email protected]:php/doc-ro.git" , "Romanian" );
+lang( "ro"    , false , false , "[email protected]:php/doc-ro.git" , "Romanian" );
 lang( "ru"    , true  , true  , "[email protected]:php/doc-ru.git" , "Russian" );
 lang( "tr"    , true  , true  , "[email protected]:php/doc-tr.git" , "Turkish" );
 lang( "uk"    , true  , true  , "[email protected]:php/doc-uk.git" , "Ukrainian" );
@@ -70,8 +70,11 @@ function print_usage()
 
 function lang( string $code , bool $manual , bool $revcheck , string $cloneUrl , string $label )
 {
-    $lang = new Lang( $code , $manual , $revcheck , $cloneUrl , $label );
-    Conf::$knowLangs[ $code ] = $lang;
+    if ( $manual || $revcheck )
+    {
+        $lang = new Lang( $code , $manual , $revcheck , $cloneUrl , $label );
+        Conf::$knowLangs[ $code ] = $lang;
+    }
 }
 
 class Conf
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.