1
1
# Setting up a local development environment
2
2
3
- This guide assumes that you are comfortable working with on the
3
+ This guide assumes that you are comfortable working on the
4
4
command line with tools like Git.
5
5
6
6
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.
10
10
11
11
When working with multiple translations, or working on changes that may
12
12
also require changing files in the ` doc-base ` or ` phd ` repositories, the
13
- suggested way to organize the local enviroment is to clone repositories
13
+ suggested way to organize the local environment is to clone repositories
14
14
into a single ` phpdoc ` directory, and for individual languages to be cloned
15
15
into directories named ` {LANG} ` instead of ` doc-{LANG} ` as they are named
16
- on GitHub.
16
+ on GitHub. See ` doc-base/languages.php ` script to automate this process.
17
17
18
18
<a name =" with-docker " ></a >
19
19
## Building with make and Docker
@@ -38,7 +38,7 @@ building, otherwise the latest revision of those repositories from GitHub
38
38
will be built into the Docker image used.
39
39
40
40
To force the Docker image used for building to itself be rebuilt, run
41
- ` make -B build ` , otherwise the ` Makefile ` will only build it if does not
41
+ ` make -B build ` , otherwise the ` Makefile ` will only build it if it does not
42
42
already exist.
43
43
44
44
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
103
103
$ php phd/render.php --docbook doc-base/.manual.xml --package PHP --format php
104
104
$ open https://localhost:8080/manual/en/
105
105
```
106
+
107
+ <a name =" windows-eol " ></a >
108
+ ## Translating on Windows
109
+
110
+ When working on Windows, try to use text editors that preserve the end
111
+ of line mark as ` U+000A LINE FEED (LF) ` only. If it's not possible,
112
+ you may issue the commands below to instruct ` git ` in transforming
113
+ the files in your local clone to use the Windows native end of line
114
+ mark:
115
+
116
+ ```
117
+ cd LANG
118
+ git config core.autocrlf true
119
+ git add --renormalize .
120
+ git status
121
+ ```
122
+
123
+ If the last comment above outputs no files, then the process works,
124
+ and you can start translating.
125
+
126
+ If the last command above shows a list of files, something went wrong,
127
+ because these listed files will be changed at * repository level*
128
+ in the next commit. There should be * none* . If any files are listed,
129
+ revert the changes with commands below and open an issue on
130
+ ` doc-base ` repository.
131
+
132
+ ```
133
+ git config --unset core.autocrlf
134
+ git reset
135
+ git status
136
+ ```
0 commit comments