Skip to content

Latest commit

 

History

History
173 lines (132 loc) · 6.91 KB

CONTRIBUTING.md

File metadata and controls

173 lines (132 loc) · 6.91 KB

The Winnie_Bot Contributor Rules of Engagement

The Winnie_Bot Contributor Rules of Engagement are licensed under the CC BY 4.0 license.

So you're interested in helping out? You can find everything that you need to know about contributing to Winnie here.

Table of Contents

Where to go with problems

If you're having trouble using Winnie, you might find the answer in the documentation. Otherwise, you can join the community Discord server to get help from the core team and members of the community.

If you think that you've found a problem in the code, you can report bugs by opening an issue on GitHub.

Making improvements

Code

Requirements

You'll need the following dependencies to develop Winnie locally:

Running Winnie for local development

  1. Clone the repo, and open the repo directory:
    $ git clone https://github.com/aigeroni/Winnie_Bot.git winnie_bot && cd winnie_bot
  2. Install dependencies with yarn:
    $ yarn install
  3. Create .env file:
    $ cp .env.sample .env
  4. Setup your environment variables in the .env file:
  5. Start the Docker processes:
    $ yarn docker:local:up -d
  6. Run the migrations to set up the database:
    $ yarn typeorm migration:run
  7. Start Winnie:
    $ yarn start
  8. In seperate terminal windows, start the job workers:
    $ yarn start:worker:goal

package.json scripts

You can use the following scripts on your local CLI to complete tasks:

  • yarn build - Compile Winnie's TypeScript code into plain JavaScript
  • yarn docker:local:down - Shut down local Docker processes
  • yarn docker:local:up - Start up local Docker processes
  • yarn lint:all - Run ESLint over Winnie's code
  • yarn lint:fix - Run ESLint over Winnie's code, fixing basic linting errors
  • yarn start - Compile Winnie and start up the bot process
  • start:worker:goal - Start the goals worker, needed for goals to complete.
  • yarn typeorm - Access the TypeORM CLI

Code standards

We use the following standards whilst coding:

  • ts-standard for linting TypeScript files
  • terraform fmt for linting Terraform infrastructure as code

We favour heavily commented code; this makes it easier for all of our contributors to understand how Winnie works. We may ask you to improve your comments if we think that they need to be clearer.

Pull requests

Pull requests should explain what you've done at a high level. If you're making major changes to the code, then a detailed explanation in both the pull request and the comments is ideal.

We have a pull request template, which you can edit accordingly. Feel free to delete any headings that aren't relevant.

Documentation

If you want to update Winnie's documentation, you'll need to submit a pull request in the docs repo. You can find instructions for doing so there.

If you're struggling with doing so, join the community server, and come and find us in the #website-documentation channel to get help.

Translations

Languages

Winnie is currently available in seven languages:

  • English
  • Français
  • Magyar
  • Latina
  • Bahasa Melayu
  • Nederlands
  • Svenska

Files

The translation framework consists of the following files:

  • winnie.json - Miscellanous translations that don't better fit in another file
  • challenges.json - Challenge-related messages
  • commands.json - Command responses
  • goals.json - Goal-related messages
  • prompts.json - Story prompts

Improving an existing translation

For extensive changes to an existing translation, please join our community Discord, go to the #new_features channel, and tag @Core Team with the language whose translation you want to improve. We'll connect you with the existing translators for the language, and help you to get set up with our frameworks.

For minor changes, use the following instructions:

  1. Fork the Winnie_Bot repo and clone it to your computer.
  2. Open the file containing the messages you want to correct in your favorite text editor. For help finding the right translation file, see here.
    **NOTE:** We recommend a program like Notepad++ or Visual Studio Code. Word processing applications, such as LibreOffice Writer, Microsoft Word, and WordPerfect, add extra information to the text that prevents Winnie from parsing it properly.
  3. Find the string that you want to change, and edit it accordingly.
  4. Commit your changes and push them to your fork.
  5. Create a pull request back to Winnie with your changes.

Translating Winnie into a new language

If you want to help translate Winnie into a language she does not currently support, please join our community Discord, go to the #new_features channel, and tag @Core Team with the language that you want to translate Winnie into. We'll then set up localisation files for your language, and help you to get set up with our frameworks.

Back to README