Skip to content

Commit

Permalink
Docs - Review the CONTRIBUTING.md
Browse files Browse the repository at this point in the history
  • Loading branch information
Gustry committed Jan 31, 2025
1 parent 58954f1 commit d8126b4
Showing 1 changed file with 26 additions and 28 deletions.
54 changes: 26 additions & 28 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,10 @@

## Getting in touch

- People working on Lizmap are available through email on the Lizmap mailing list
at https://lists.osgeo.org/pipermail/lizmap/
- We are also hanging out on #lizmap on https://libera.chat
* People working on Lizmap are available through email on :
* [Discourse](https://discourse.osgeo.org/c/qgis/lizmap/48)
* the [Lizmap mailing list](https://lists.osgeo.org/pipermail/lizmap/)
* We are also hanging out on #lizmap on https://libera.chat

## Localization and translation

Expand All @@ -14,7 +15,7 @@ The locale files (except for `en_US` language) are stored into the `lizmap/app/l
The files are `*.properties`. You can find [documentation about localizing Jelix](https://docs.jelix.org/en/manual-1.6/locales).

Locale files for `en_US` language are stored into modules directly (see `locales/`
directory into sub-directories of `lizmap/modules/`).
directory into subdirectories of `lizmap/modules/`).

Only modifications on `en_US` locales are accepted in Pull Requests.

Expand All @@ -23,11 +24,12 @@ Only modifications on `en_US` locales are accepted in Pull Requests.
All locales are translated with [Transifex](https://www.transifex.com/) with the **help of the opensource community**.
So to help us to translate, please go on Transifex, create an account and ask to join these projects :

- https://www.transifex.com/3liz-1/lizmap-locales/ to translate Lizmap Web Client and Lizmap QGIS plugin strings
- https://www.transifex.com/3liz-1/jelix/ to translate Jelix strings (the web framework used in Lizmap Web Client)
- https://www.transifex.com/3liz-1/lizmap-documentation/dashboard/ to translate the [documentation](https://docs.lizmap.com)
* [Lizmap-locales](https://www.transifex.com/3liz-1/lizmap-locales/) to translate Lizmap Web Client and Lizmap QGIS plugin strings
- [Jelix](https://www.transifex.com/3liz-1/jelix/) to translate Jelix strings (the web framework used in Lizmap Web Client)
- [Documentation](https://www.transifex.com/3liz-1/lizmap-documentation/) to translate the [documentation](https://docs.lizmap.com)

If the language is not yet available, you **request** the language on Transifex.
If the language is not yet available, you can **request** the language on Transifex.
Please check carefully existing languages before requesting a new one, about the language code. (with 2 or 4 characters).

For **core developers**, see the repository https://github.com/3liz/lizmap-locales/
and https://github.com/jelix/jelix-langpacks.
Expand Down Expand Up @@ -98,16 +100,15 @@ If you just want to modify and/or test the docker image of Lizmap (the

You need some developer tools in order to build and install dependencies.

* The cli version of PHP (prefered version: 7.4). Be sure that following extensions are also installed:
json, curl, mbstring, xml.
* [Composer](http://getcomposer.org), the package manager of PHP. You should have at least version 2.0.0
* Nodejs (we are using 12.x or 14.x) and npm:
* The CLI version of PHP. Be sure that following extensions are also installed:
`json`, `curl`, `mbstring`, `xml`.
* [Composer](http://getcomposer.org), the package manager of PHP.
* Nodejs and npm:
* with [binaries](https://nodejs.org/en/download/)
* or with the package manager for your Linux distribution, but prefer to install
directly from nodesource: https://github.com/nodesource/distributions/blob/master/README.md#debinstall
directly from [nodesource](https://github.com/nodesource/distributions/blob/master/README.md#debinstall)
* `Make` and `zip`.


### Building a zip with Javascript and PHP

- Run `make package` in your terminal.
Expand All @@ -120,24 +121,20 @@ You need some developer tools in order to build and install dependencies.

#### Requirements

* Install dependencies :
* `npm install` in root directory of the repository.
* Install dependencies with `npm install` in the root directory.

It creates a `node_modules/` directory. Don't commit it into the git repository!


#### Installation

* Build for production (minified JS files) :
* From root directory :
`npm run build`
* From root directory : `npm run build`

Don't commit minified JS files into the git repository. They will be built by our
continuous integration and added into zip packages that are available on github.
continuous integration and added into zip packages that are available on GitHub.

* Build for development (source mapping, build is executed at every change on a JS file) :
* From root directory :
`npm run watch`
* From root directory : `npm run watch`

Look at [webpack documentation](https://webpack.js.org/guides/development/) for other development options (e.g. live reloading)

Expand All @@ -159,27 +156,28 @@ Launch it at the root of the repository.
php-cs-fixer fix
```

Configuration of php-cs-fixer has been setup into .php-cs.dist.
Configuration of `php-cs-fixer` has been set up into `.php-cs.dist`.

### JavaScript

Please run `npm run pretest` in the root directory and fix errors before any commit.

## Issues

Go to https://github.com/3liz/lizmap-web-client/issues and post issues you find.
Go to [GitHub](https://github.com/3liz/lizmap-web-client/issues) and post issues you find.

## Testing your changes

Tests is highly recommended for any new commits. Tests can be provided with :
* End-to-end tests with Cypress

* End-to-end tests with Playwright
* PHP Unit tests
* Manual tests

You can test your changes, or you can launch unit tests, by running some
Docker containers. Go into tests/ and read the README.md file.
A docker-compose.yml file is provided, launching a full stack of softwares to
run Lizmap (nginx, php-fpm, qgis, postgresql...).
Docker containers. Go into `tests/` and read the [README.md](./tests/README.md) file.
A `docker-compose.yml` file is provided, launching a full stack of softwares to
run Lizmap (NGINX, PHP-FPM, QGIS, PostgreSQL...).

You can test with Android browsers in your Ubuntu Desktop thanks to [Anbox](https://docs.anbox.io/userguide/install.html#install-anbox).
For example, you can [download a x86 version of Firefox Mobile](https://ftp.mozilla.org/pub/mobile/) then
Expand Down

0 comments on commit d8126b4

Please sign in to comment.