Skip to content

Latest commit

 

History

History
132 lines (78 loc) · 3.77 KB

CONTRIBUTING.md

File metadata and controls

132 lines (78 loc) · 3.77 KB

Translate

You can translate Osm Go! at POEditor:

  • Add missing translations
  • Improve existing ones
  • Add comments on translations and so so...

⏩ Follow this link to improve the translations.

POEditor

After joining, the main site of the POEditor should list Osm Go! for logged in users.

iD presets

Some translations are from iD presets. For iD presets translation see their documentation.

TagInfo descriptions

Some translations are extracted from TagInfo like the element "descriptions". See the column "description" in TagInfo (example for a bench).

TagInfo get those descriptions from OSM wiki. Make sure to add the "| description = " in the infobox of the related article in the wiki (example for bench). Note you can also press the "pencil" icon in the description field of the infobox. It will redirect you to the corresponding wiki Item (example for bench).

Development

Compile/run

Osm Go! is a PWA application using:

  • Angular 12
  • Ionic 5
  • Capacitor 3
  • MapLibre GL

Osm Go! can be compiled on Linux and Windows (MacOs not tested yet)

Requirements

Osm Go! use angular-cli 12, given this compatibility list, you should install NodeJs 12 or 14. But it seems to work fine with NodeJs 16, you will just get some warning when installing dependencies via npm install.

💡 Be sure to checkout the branch develop to get the latest updates.

Get the code

git clone https://github.com/DoFabien/OsmGo.git
cd OsmGo
git checkout develop

Install

npm install -g @ionic/cli
npm install

Run

Test it in a browser

npm run start

Build for web (=> ./www)

npm run build

Build for android (make apk)

Requirements:

npm run buildAndroid

Then open Android Studio and you can compile the app and run it on your device.

Debug on Android

Requirements:

npm run buildAndroidDebug

Then open Android Studio, compile the app and run it on your device.

After you can use Google Chrome or Edge to attach a debugger to the web app on the device.

  • For Edge, visit edge://inspect
  • For Chrome, visit chrome://inspect

Find your device in those pages. Then click on the inspect button. You can set breakpoint in JavaScript files and inspect HTML code.

Known issues when developing

Running WebApp on Linux

You may have following error:

Watchpack Error (watcher): Error: ENOSPC: System limit for number of file watchers reached

If so, we are gonna increase the max number of watches from 16384 (default) to 524288:

echo fs.inotify.max_user_watches=524288 | sudo tee -a /etc/sysctl.conf && sudo sysctl -p

Building Android App on Linux

Set the following envvar to your Android Studio installation:

export CAPACITOR_ANDROID_STUDIO_PATH=/opt/android-studio-2021.2.1/android-studio/bin/studio.sh

Then you can use the buildAndroid target with npm

Update tags and presets

Add CHANGE_ME colors

Here is a simple jq query to list tags by "id : markerColor". It will help you to identify the 'correct' color for your new tags.

cat src/assets/tagsAndPresets/tags.json | jq '.tags | sort_by(.id)[] | .id + " : " + .markerColor'