Request a new language by creating a new issue ; the translation is managed via Crowdin, once the language is added to Crowndin, you'll be able to translate it here: https://crowdin.com/project/osm-welcome-tool
Translation is managed via Crowdin, go to https://crowdin.com/project/osm-welcome-tool to contribute!
A region can be any geographical region defined by a geometry. It can be a whole country, a province, a city, a neighborhood, ...
There are only 2 steps to add a new region to the tool:
- Add your region to the
config/regions.yaml
file:- Create a new key (lowerspace, not special characters, in English) ;
- Add the
name
property with the name (in English) of your region ; - Add the
flag
property with the flag emoji of the country your region is in ; - You don't have to worry about the
osmcha.id
id, we'll take care of that ;
- Add a GeoJSON for your region in the
assets/regions
folder.
You can use http://polygons.openstreetmap.fr/ to easily create a (simplified) GeoJSON file for a specific OSM relation.
Create a Pull Request with those 2 steps and we'll take it from there!
All messages templates are Markdown files stored in the templates/messages
folder.
The messages templates Markdown files are classified under
- a region folder (key of the region in
regions.yaml
file) - a language folder (ISO 639-1 language code)
The filename can be anything you want but should be a "slug" version of the template name
property (see below): all lowercase, separated with dashes, no special characters.
Each message template file has a YAML front matter containing the following properties:
name
: name of the template (that's what will be displayed in the templates list) ;title
: title of the message that will be sent to the user ;
After the YAML front matter, you can put any text using Markdown formatting. You can also use placeholders (for example, {{ mapper.displayName }}
will be replaced by the username of the mapper).
Create a Pull Request with the new (or updated files)!
-
Region (see
regions.yaml
):region.name
: Name of the regionregion.flag
: Flag (emoji) of the regionregion.key
: Name key of the regionregion.continent
: Continent key of the region
-
Mapper (see
Mapper.php
):mapper.id
: Mapper's OpenStreetMap identifiermapper.displayName
: Mapper's OpenStreetMap display namemapper.image
: Mapper's OpenStreetMap profile picture (URL)mapper.accountCreated|format_datetime()
: Mapper's OpenStreetMap account creation datetime (see Twig documentation)mapper.changesetsCount
: Mapper's count of OpenStreetMap changesest (at the time of detection by the Welcome Tool)
-
Current user connected to the app (see
User.php
):app.user.id
: OpenStreetMap identifier of the userapp.user.displayName
: OpenStreetMap display name of the userapp.user.image
: OpenStreetMap profile picture (URL) of the user