Skip to content

Commit

Permalink
Document how to update translations with actual commands
Browse files Browse the repository at this point in the history
Signed-off-by: Dan Scott <[email protected]>
  • Loading branch information
dbs committed Apr 26, 2019
1 parent 8171bfa commit c8e78fe
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion README.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -74,14 +74,20 @@ machine using a browser pointed at http://localhost:5000.

Pybabel is the utility used to pull out translateable text from templates/py files. Simply extract and update to put in new translations.

------------------------------------------------------------
pybabel extract -F babel.cfg -o messages.pot .
pybabel update -i messages.pot -d translations
pybabel compile -d translations
------------------------------------------------------------

=== A note about committing translations ===

When adding new messages to messages.pot or new translations to messages.po, ALWAYS make sure to only partially stage the actual messages added. Pybabel updates a header with the date of the last message extract, so it *will* cause a merge conflict if it's staged into the commit.

== Updating the database

. Back up the database with a command like `pg_dump --no-owner --clean --dbname bibliography > bibliography.sql`.
. Update the value of `stop_date` in `config.ini` to the date of the most recent update.
. Update the value of `stop_date` in `config.ini` to the date of the last update.
. Start a pipenv shell: `pipenv shell`
. Run the update: `./ris2web_api`
. Start the web service and test out the changes: `./ris2web`
Expand Down

0 comments on commit c8e78fe

Please sign in to comment.