Code Monkey home page Code Monkey logo

domogik-website's Introduction

Domogik website sources

Sources of the domogik official website.

You want to help us to translate the website ? Just go on https://www.transifex.com/domogik/domogik-website/ and login with your GitHub account ;)

Prerequisites

You need to install the following packages.

pip install staticjinja
pip install csscompressor

i18n

Refresh locale catalog

When the website content has been changd/completed, you can run the script src/build_i18n_catalog.sh to upgrade the existing catalog. Commit and push the file.

Then, a few hours later, the new file content will be pulled by Transifex (it is done once a day) and translators will be able to work on translations :)

But be caution ! This is the i18n_website_template.pot file of the develop branch which is used by transifex!. This is done because we want to be able to translate a website before moving it in production! So we need to do translations on the develop branch.

Complete the translations

For this project, the basis language is french, so French is the reference for translations.

If you plan to help us, just go https://www.transifex.com/domogik/domogik-website/ and help us to translate ;). You can login with your Github account!

Add a new language

You need to upgrade the below files :

  • src/index.html and src/404.html : the if clause
  • src/build_i18n_catalog.sh : LANG
  • src/build.py : LANG
  • src/templates/layout.html : the dropdown menu

Then Launch the script src/build_i18n_catalog.sh to build the new language catalogs.

Website updated with new content

When new content is added, to allow translation, do :

cd src
./build_i18n_catalog.sh

Then, the file i18n_website_template.pot is updated. Commit it and push it :

git add i18n_website_template.pot
git commit -m "i18n pot file updated"
git push

The Transifex project should see the new entries.

Do the translation stuff.

When ok, rebuild the website (next chapter).

Build the website

Just go in src and :

  • run the build_transifex_translations.sh script to get the last translations
  • run the build.py script to build the website

Example :

cd ./src/
./build_transifex_translations.sh
./build.py

The built website is located in the ./build/ folder.

domogik-website's People

Contributors

fritz-smh avatar

Stargazers

 avatar

Watchers

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