New environment variable CUSTOM_LOCALE allows a user to define a locale per the /public/locales directory (this should be listed in the docs, will create a pull request for that too).
If the environment variable is blank or invalid it reverts to previous behaviour of system + default locale. Fully tested the above as follows:
CUSTOM_LOCALE = 'nl' < This works correctly, translating to nl.
CUSTOM_LOCALE = 'HelloThere' < This reverts to previous behavior
CUSTOM_LOCALE = '' < Also reverts
#CUSTOM_LOCALE = < Also reverts
This diff adds the detect_base_url config, controlled by the
DETECT_BASE_URL env variable. When set to true, the BASE_URL setting is
ignored, and the base_url is derived from the request protocol and host
header.
Test Plan: Started up a local instance in my homelab, running docker
node:15 image with a nginx reverse proxy. Configured nginx to use the
same backend with multiple hostnames on https. Opened in browser and
confirmed og:url meta tag uses correct url.
this should greatly reduce the complexity of the l10n code
and build pipeline and eliminate the most common error
seen in sentry logs (no translate function)