These are the instructions for upgrading Pootle from an older version to a new release.
Warning
When upgrading please ensure that you:
This page is divided in three sections:
Before upgrading Pootle to a newer version, make sure to go through this checklist.
POOTLE_TRANSLATION_DIRECTORY
). Use the sync_stores
command to synchronize all your translation files to disk before making any
backup.Upgrading Pootle using the pip.
Note
You will need to adjust these instructions if you installed Pootle using another method, such as directly from a Git checkout.
Warning
Always backup the following before upgrading:
To perform the upgrade follow the next steps:
If you want to perform a database migration then do it first.
We highly recommended that you use a virtual environment. If your install currently doesn’t use one then please set up a virtualenv.
If you are upgrading from a version older than Pootle 2.7.0, then you must first upgrade to Pootle 2.6.0.
(env) $ pip install --upgrade "Pootle>=2.6,<2.7"
(env) $ pootle setup
Then continue with the upgrade process.
Upgrade the Pootle package:
(env) $ pip install --upgrade Pootle
Update your custom Pootle settings to adjust for any changes and to include any new settings. Delete any obsolete settings. Check the available settings as needed.
Note
Running pootle check
will highlight settings that have
been made obsolete or renamed.
Note
If you are upgrading from a version of Pootle that uses
localsettings.py
then you must move your custom settings to a new location in order to ensure that Pootle
uses them.
Perform the database schema and data upgrade by running:
(env) $ pootle migrate
Reapply your custom changes to Pootle code, templates or styling. Read about customization of style sheets and templates to adjust your customizations to the correct locations and approach in the new release.
Note
If you have customized the CSS styling or the JavaScript code you will have to run the following commands to update the static assets:
(env) $ cd $pootle_dir/pootle/static/js/
(env) $ npm install
(env) $ npm update
(env) $ pootle webpack
(env) $ pootle collectstatic --noinput --clear -i node_modules -i *.jsx
(env) $ pootle assets build
$pootle_dir
is the directory where pip installed Pootle. Its
location depends on your settings for pip, but by default it
should be ~/.virtualenvs/env/lib/python2.7/site-packages/
.
Finally, restart your server.
Check that you can login as an admin user. If your existing admin user has
no email address then you will not be able to login. In order the fix this
use createsuperuser
to create a new superuser, or to create a
temporary superuser to fix your existing one.
(env) $ pootle createsuperuser
After a succesful upgrade you can now consider: