Skip to content

User Interface for respondents to access ONS Survey Data Collection questionnaires and services

License

Notifications You must be signed in to change notification settings

ONSdigital/srm-rh-ui

This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Folders and files

NameName
Last commit message
Last commit date

Latest commit

8f1042f · May 6, 2024

History

31 Commits
Apr 9, 2024
Sep 1, 2023
Apr 18, 2024
Apr 18, 2024
Aug 17, 2023
Aug 4, 2023
Sep 1, 2023
Jan 17, 2024
Jul 26, 2023
Jan 11, 2024
Jan 17, 2024
May 6, 2024
Sep 13, 2023
Sep 1, 2023
Jan 11, 2024
Sep 18, 2023
Sep 13, 2023
Sep 13, 2023
Apr 4, 2024
Sep 1, 2023
Oct 17, 2023
Jan 11, 2024

Repository files navigation

SRM Respondent Home UI

User Interface for respondents to access ONS Survey Data Collection questionnaires and services

Installation/build

To install all dependencies and download the templates run:

make install

To build the docker image and run the tests:

make build

Running

Once that's done, you can run the make command to run it in your terminal:

make run

or to run it in Pycharm, use the run template that's specified and it should work as expected.

Translations

The site uses babel for translations.

Text to translate is marked up in html and py templates and files, then a messages.pot is build via pybabel, which collates all the text to translate into a single file.

To build/re-build the translation messages.pot use:

pipenv run pybabel extract -F babel.cfg -o app/translations/messages.pot .

To create a new language messages file, run the following, changing the 2 character language code at the end to the required language code. Only generate a individual language file once.

Note that this implementation includes an English translation. This is needed due to an issue with implementing pybabel with aiohttp.

pipenv run pybabel init -i app/translations/messages.pot -d app/translations -l cy

Once created, you can update the existing language messages.po files to include changes in the messages.pot by running the following. This will update ALL language files.

pipenv run pybabel update -i app/translations/messages.pot -d app/translations

To compile updates to the messages.po files into messages.mo (the file actually used by the site) use:

pipenv run pybabel compile -d app/translations