Giter Club home page Giter Club logo

dcrweb's Introduction

dcrweb

This is the code for the decred.org website.

CircleCI

Localization

The below commands must be run when either the content changes or there are updates in the translations in Transifex. You'll first need to install the Transifex client.

Downloading web site code

Make sure you have git installed.

git clone https://github.com/decred/dcrweb
cd dcrweb;

Importing new translations and content updates

When translations are added/updated in Transifex, pull the updates:

npm run transifex:pull

When you run this for the first time, you'll be asked to log in with your Transifex username/password.

To push the changes to staging:

git commit -m'Translation update'
git push origin

This triggers the update on the staging site, which will be rebuilt usually in a few minutes (give it 5):

https://dcrweb.herokuapp.com/

Updating the message catalog

When the master content changes in the HTML files, you'll need to re-generate the message catalog and push it to Transifex so that translators can update the localized message catalogs:

npm run transifex:push

Adding a new language

  1. Add the new language in Transifex
  2. In the repository folder, run npm run transifex:pull, add the new .po file to git: git add i18n/po/<LC>.po
  3. Enable it for publishing on the staging site: add it to src/i18n/languagemap.development.txt
  4. Update language selector in src/index.html
  5. Commit files to git + push to repo

Publishing a language

Once you're happy with the translation in a language, you'll need to enable it for production.

  1. Add language to src/i18n/languagemap.production.txt
  2. Edit #language-selector in src/index.html
  3. Commit files to git + push to repo

Deployment

A Docker configuration is included for building the deployable images of dcrweb.

Prerequisites

  • docker

Building the Docker images

git clone https://github.com/decred/dcrweb
cd dcrweb
./build_docker.sh

This builds a docker container which can then be run using:

docker run -d --rm -p <local port>:80 decred/dcrweb:latest

Push to Dockerhub

docker login

Enter your Docker HUB credentials that has write access to the decred/dcrweb repository.

docker push decred/dcrweb

Run in production

docker pull decred/dcrweb
docker run -d --rm -p <local port>:80 decred/dcrweb:latest

Runs the docker image exposing the specified local port.

Development

git clone https://github.com/decred/dcrweb
cd dcrweb
npm install

Start file watcher:

grunt watch

And in another terminal (in the same directory):

grunt serve

This will start the development web server at http://localhost:8080

License

decredweb is licensed under the liberal ISC License.

dcrweb's People

Contributors

alanbarber avatar aldoiljazi avatar alexlyp avatar d7km avatar dajohi avatar enviable avatar fsig avatar hypernoob avatar infertux avatar isaias avatar jcvernaleo avatar jholdstock avatar jolan avatar karamble avatar lukebp avatar marcopeereboom avatar nickboariu avatar oktapodia avatar peterzen avatar pvtwarren avatar stabbarn avatar

Watchers

 avatar  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.