Skip to content
Permalink
Branch: master
Find file Copy path
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
71 lines (38 sloc) 3.82 KB

Contributing to Matterpoll

Thank you for your interest in contributing! Join the Matterpoll channel on the Mattermost community server for discussion about this plugin.

Reporting Issues

If you think you found a bug, please use the GitHub issue tracker to open an issue. When opening an issue, please provide the required information in the issue template.

Translating strings

Matterpoll supports localization to various languages. We as maintainers rely on contributors to help with the translations.

Matterpoll uses go-i18n as library and tool to manage translation. The CLI tool goi18n is required to manage translation. You can install it by running env GO111MODULE=off go get -u github.com/nicksnyder/go-i18n/v2/goi18n.

The localization process is defined below:

  • During development, new translation strings may be added or existing ones updated.
  • When a new version is planned to release soon, a repository maintainer opens an issue informing about this. The maintainer will ping all translation maintainer to inform them about this.
  • Translation maintainers submit PRs with new translations, which may get reviewed by other translators.
  • After all translation PRs are merged, the new version is released. If a translation PR is not submitted within a week, the release is cut without it.

Translation Maintainers

Translation Process for Existing Languages

  1. Ensure all translation messages are correctly extracted:

goi18n extract -format json -outdir assets/i18n/ server/

  1. Update your translation files:

goi18n merge -format json -outdir assets/i18n/ assets/i18n/active.*.json

  1. Translate all messages in asserts/i18n/translate.*.json for the languages you are comfortable with.

  2. Merge the translated messages into the active message files:

goi18n merge -format json -outdir assets/i18n/ assets/i18n/active.*.json assets/i18n/translate.*.json

  1. Commit only the language files you touched and submit a PR.

Translation Process for New Languages

Let's say you want to translate the local de. Replace de in the following commands with the local you want to translate. See here for the list of possible locals.

  1. Create a translation file:

touch asserts/i18n/translate.de.json

  1. Merge all current messages into your translation file:

goi18n merge -format json -outdir assets/i18n/ assets/i18n/active.en.json assets/i18n/translate.de.json

  1. Translate all messages in asserts/i18n/translate.de.json and rename it to active.de.json.

  2. Submit a PR with this file and add you to the list of Translation Maintainer

Submitting Patches

If you are contributing a feature, please open a feature request first. This enables the feature to be discussed and fully specified before you start working on this. Small code changes can be submitted without opening an issue first.

You can find all issue that we seek help with here.

Note that this project uses Go modules. Be sure to locate the project outside of $GOPATH, or allow the use of Go modules within your $GOPATH with an export GO111MODULE=on.

You can’t perform that action at this time.