Skip to content

misterhandycap/chancelerpalpatine

Repository files navigation

ChancelerPalpatine

I love democracy! And Python!

Setup

Requirements:

  • Python 3.10+

Installing dependencies

python3 -m virtualenv venv
source venv/bin/activate
pip3 install -r requirements.txt

Creating environment variables

cp .env.sample .env
nano .env

Updating dependencies

pip3 freeze > requirements.txt

Running database migrations

alembic upgrade head

Running tests

python3 -m unittest discover -s tests/

Creating new migrations

PYTHONPATH=$(pwd) alembic revision -m "MIGRATION_NAME"

Internationalization

Make sure to keep track of all your newly inserted messages when creating a new feature. When adding new messages to the application, please update bot/i18n/base.pot file with the newly inserted messages. After doing so, run the following from the project root directory:

bash bot/i18n/merge_pot_to_po.sh

Then add manually your changes to the language files you wish to translate. After translating, run the following, replacing $LANGUAGE to the language code you've just translated:

msgfmt -o bot/i18n/$LANGUAGE/LC_MESSAGES/base.mo bot/i18n/$LANGUAGE/LC_MESSAGES/base.po

About

bot do discord

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 3

  •  
  •  
  •  

Languages