- Install VirtualBox
- Install Vagrant
$ git clone -b develop firstname.lastname@example.org:parliamentwatch/parliamentwatch.git
$ cd parliamentwatch
$ export AW_USERNAME=... AW_PASSSWORD=...
$ vagrant up
- Open http://localhost:8080 in your browser.
vagrant up exits with the error "No guest IP was given to the Vagrant core NFS helper...", run
vagrant reload --provision.
The virtual machine for local development is managed with Vagrant. There are two provisioners which are executed automatically when running
vagrant up for the first time or when provisioning is requested explicitly. The bootstrap provisioner installs and configures the packages. The database provisioner downloads the latest backup from http://backups.parliamentwatch.org, loads it into the database and reverts the features. It needs HTTP Basic credentials in order to download the backup. Those can be exported to the shell:
$ export AW_USERNAME=... AW_PASSWORD=...
Both provisioners can be executed by name:
$ vagrant provision --provision-with bootstrap $ vagrant provision --provision-with database
Git commit messages
Please follow these guidelines for commit messages.
Theme assets are managed with Grunt tasks. To build the assets initially run the following commands:
$ cd src $ npm install $ node_modules/.bin/grunt build
Translations for contributed and custom modules are managed with Localization update. To update translations for contributed modules update the translations in your development environment with
drush l10n-update and commit the changes. On the live environment updates will only be sourced from the files in sites/all/translations. Translations for custom modules and themes are all stored in the PO file for PW Globals. To update translations for custom modules and themes:
$ drush en potx $ cd /vagrant/ $ make general.pot $ msgmerge -U -N httpdocs/sites/all/translations/pw_globals-<version>.de.po general.pot
When the version of PW Globals changes the PO file needs to be renamed accordingly.