Skip to content

Latest commit

 

History

History
49 lines (30 loc) · 1.87 KB

REGIONS.md

File metadata and controls

49 lines (30 loc) · 1.87 KB

Editing regional content

Update the regional content:

  • src/locale/translations/regional/en.json
  • src/locale/translations/regional/fr.json

Run generate-translations:regional to create auto generate the region.json file src/locale/translations/region.json

The generated region.json file within the repo is used as a "fallback". The default content gets pulled from the server dynamically.

Update "dynamic region" content from the server

Staging

The content of the region.json (from the repo) should be copied to the staging

Note: When copying remove the generated warning message

// remove
{"Warning":"THIS IS A GENERATED FILE - DO NOT EDIT")

Production

Once tested on staging the same content needs to be moved to production

Testing changes to Regional config and EN config

Testing region content

Steps to test locally

  • brew cask install ngrok
  • yarn global add json-server
  • json-server --watch src/locale/translations/region.json
  • ngrok http 3000
  • Add the following to your .env file and do a build: REGION_JSON_URL=https://XXXXXXXXXX.ngrok.io/db

Testing EN Config changes

A similar process can be used to test changes to the EN config.

  • make changes to src/services/ExposureNotificationService/ExposureConfigurationDefault.json
  • commit and push your changes to a branch
  • Add the following to your .env file and do a build: EN_CONFIG_URL=https://raw.githubusercontent.com/cds-snc/covid-alert-app/YOUR_BRANCH_NAME/src/services/ExposureNotificationService/ExposureConfigurationDefault.json