Contributing
Documentation
Dispatch documentation is managed via Gitbook.
Doing a release
Creating a release of Dispatch requires the step below.
Updating sample data
If the database schema changes, we will need to update the sample data accordingly.
- Run
docker/dev-setup.shfirst if you have not already — it generates the development secrets intodocker/.env, which the script below reads. - Run the Bash script
update-example-data.shin thedatadirectory. - Create a commit with any changes
- Create a pull request with the change
- Merge change
Bumping the version number
- Update the version number in
dispatch/__about__.py - Create a new entry in the changelog
- Create a commit with the changelog changes
- Create a pull request with the change
- Merge change
Change log
- Create a new changelog with all significant changes since the last release
- Update GitHub releases: https://github.com/helldweller/dispatch/releases
- Publish the release
Update 'latest' tag
We rely on the latest tag to identify the most current stable version. Follow the steps below to update this tag:
Delete the previous tag:
git tag -d latest
Create a new tag:
git tag -a latest <commit>
Push the tag:
git push origin latest
Localization
The UI is translated with vue-i18n. The English string is the
message key, so templates read {{ $t("Report incident") }} or :label="$t('Search')" and English
needs no message file: a key without a translation renders as itself. Translations live in
src/dispatch/static/dispatch/src/locales/<locale>.json as a flat map from the English string to
the translated one.
- Keys may contain dots and punctuation;
src/i18n/index.jslooks the whole key up before treating dots as a nested path (Vuetify's own$vuetify.*messages still use the nested form). - Table headers and other strings built in
data()or plain functions must move to acomputedproperty (Options API) or callt()fromuseI18n()(<script setup>), otherwise they do not follow a language switch. - Adding a language: import its Vuetify messages from
vuetify/locale, add the JSON file and an entry toSUPPORTED_LOCALESinsrc/i18n/index.js.
Users pick the language in the profile menu (avatar → Language); the choice is stored both in the
browser and in the user's settings (locale in dispatch_user_settings), so it follows them across
devices. Without a saved choice the UI follows the browser language.