Git Product home page Git Product logo

mozillafestival.org's Introduction

The Mozilla Festival Website

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 client.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",
  ...
};

mozillafestival.org's People

Contributors

mmmavis avatar alanmoo avatar scottdowne avatar pomax avatar ioana-chiorean avatar kuwood avatar jbuck avatar abbycabs avatar vazquez avatar simonwex avatar

Watchers

 avatar James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.