- Production: https://mozillafestival.org
- Staging: https://mozillafestival-org-staging.herokuapp.com/
$> npm install
$> cp sample.env .env
$> npm start
By default this will run the website on http://localhost:9090
Deployment to staging
server is automated via Heroku.
master
– Changes made to the master
branch triggers staging site deployment: https://mozillafestival-org-staging.herokuapp.com/
Production pushes are handled manually. Email Mozilla Foundation DevOps or an active contributor to this repo to ask about a production push.
PORT
(optional)PROPOSAL_SPREADSHEET_ID_2018
: Google Spreadsheet id that you are storing the proposal submissions to.GOOGLE_API_CLIENT_EMAIL_2018
: Your Google Service Account client email created for MozFest.GOOGLE_API_PRIVATE_KEY_2018
: The key associated with the client email.GITHUB_BOT_TOKEN_2018
: GitHub personal token you created for MozFest.GITHUB_REPO_OWNER_2018
: The owner of the repo that you are posting the proposals to. e.g., if the repo is at https://github.com/MozillaFestival/mozfest-program-2018 set this var toMozillaFestival
.GITHUB_REPO_NAME_2018
: The name of the repo that you are posting the proposals to. e.g., if the repo is at https://github.com/MozillaFestival/mozfest-program-2018 set this var tomozfest-program-2018
.
MozFest site currently is only available in English. However, this year (2017) we offer proposal form in English(/proposals
) plus three non-English languages - Spanish(/proposals/espanol
), French(/proposals/francais
), and German(/proposals/deutsch)
. Note that there's no localization infrastructure in place that automatically pulls localized strings from an external resource. Localized strings and proposal pages are created manually:
-
clone
pages/proposals/language/english.json
and rename it tonewlanguage.json
withnewlanguage
being the language the strings are in. For consistency, make sure all letters are in lowercase. (e.g.,german.json
) -
In
main.jsx
. Add the new key-value pair to theLANGUAGE
object. For example:
const LANGUAGE = {
...
german: {
name: `deutsch`, // this will be used as slug in the url (e.g., `/proposals/deutsch`)
stringSource: require('./pages/proposals/language/german.json')
}
};
The localized proposal page should be available on /proposals/newlanguage
. (e.g., /proposals/deutsch
)
-
Replace all the English strings in
newlanguage.json
with the localized strings. (NOTE: make sure the strings you are pasting in don't have scripts in them as these strings will be rendered as HTML without sanitization.) -
In the
sendConfirmationEmail
function inproposal-handler.js
, add the newlanguage: localecode
key-value pair tolocaleMap
. Make sure thelocalecode
matches what's on https://github.com/mozilla/webmaker-mailroom/tree/master/locale e.g.,
var localeMap = {
...
"German": "de",
...
};