This is the readme to contribute to the votetracker.eu project.
I can start translating to European languages I don't know with A.I. but I'd like to have human validations.
If you are eager to check a translation, please contact me at
, I will send you the necessary file.
Thank you
To add translations, run
django-admin makemessages --no-wrap --locale <locale id like "fr" or "en">
It will generate a .po file in the locale
directory.
The translation are to be written inside the quotes of the msgstr ""
.
Look also for the fuzzy
keyword that point to unclear translations.
The %
that you can find is the html code for %
. Use %
instead of %
, which is a mess to use here.
When it is translated, add the language code in the LANGUAGES
variable in settings.py
Then run
django-admin compilemessages
Restart the server and check everything is ok. Do the merge request. Thanks :-)
It is built with python django. The database is needed because MEPs have the ability to add comments on their stances (when they will be invited to).
If you use conda:
conda create --name django5 python=3.11
conda activate django5
Otherwise see here
pip install --upgrade pip
pip install -r requirements.txt
In the yvm_site
folder, add a .env
file with this content:
MODE=DEV
ALLOWED_HOSTS=.localhost
DB_ENGINE=<mysql or postgresql>
DATABASE_NAME=<you named it when creating the db in phpmyadmin>
DATABASE_USER=<you named it when creating the db in phpmyadmin>
DATABASE_PASSWORD=<you named it when creating the db in phpmyadmin>
DATABASE_PORT=<usually 3306 for mysql, 5432 for postgresql>
MEP_INITIAL_PASSWORD=<it will be used in populate_mep_table.py>
SECRET_KEY=<a very long secret key of your choice>
Add .env
in your .gitignore
Download ep_meps.json.lz
and ep_votes.json.lz
on parltrack.
Unzip them in the already existing parltrack_data
folder
Run :
python populate_mep_table.py
python populate_vote_and_position_tables.py
Then
python manage.py runserver
votetracker.eu by Pierre LOICQ is licensed under CC BY 4.0