Giter Site home page Giter Site logo

django-hbs-makemessages's Introduction

django-hbs-makemessages

https://travis-ci.org/rafalp/django-hbs-makemessages.png?branch=master

Library providing django-admin-hbs.py script that exposes custom makemessages command that can extract language strings from .hbs and .handlebars files.

This library complements django-ember-gettext Ember.js addon that provides Django's gettext support in Ember.js application.

Tutorial

Install library via pip:

pip install django-hbs-makemessages

CD to project containing locale directory and JS app and fire makemessages for your locale:

django-admin-hbs.py makemessages --l en_us --d djangojs

Now check your locale's djangojs.po file for your locale and see if it contains translation files:

#: emberapp/routes/application.js:8 msgid "Connection lost" msgstr ""

#: emberapp/routes/application.js:13 msgid "Page not available" msgstr ""

#: emberapp/routes/application.js:24 msgid "Page not found" msgstr ""

#: emberapp/templates/application.handlebars.:2 #: emberapp/templates/application.hbs.:2 msgid "Welcome to Ember.js!" msgstr ""

#: emberapp/templates/application.handlebars.:3 #: emberapp/templates/application.hbs.:3 msgid "IndexController renders %(template)s template!" msgstr ""

Authors

Rafał Pitoń

Copyright and license

Copyright © 2014 Rafał Pitoń This program comes with ABSOLUTELY NO WARRANTY.

This is free software and you are welcome to modify and redistribute it under the conditions described in the license. For the complete license, refer to LICENSE.rst

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.