Skip to content
This repository has been archived by the owner on Jul 30, 2019. It is now read-only.

mozilla/mozillafestival.org

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

The Mozilla Festival Website

Travis Build Status Dependency Status Dev Dependency Status

Setup

$> npm install
$> cp sample.env .env

To run

$> npm start

By default this will run the website on http://localhost:9090

Development

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.

Environment Variables

Localized proposal forms

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:

  1. clone pages/proposals/language/english.json and rename it to newlanguage.json with newlanguage being the language the strings are in. For consistency, make sure all letters are in lowercase. (e.g., german.json)

  2. In main.jsx. Add the new key-value pair to the LANGUAGE 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)

  1. 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.)

  2. In the sendConfirmationEmail function inproposal-handler.js, add the new language: localecode key-value pair to localeMap. Make sure the localecode matches what's on https://github.com/mozilla/webmaker-mailroom/tree/master/locale e.g.,

var localeMap = {
  ...
  "German": "de",
  ...
};