Skip to main content

Library providing makemessages for Handlebars.js templates

Project description

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ń

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

django-hbs-makemessages-0.9.4.tar.gz (7.2 kB view details)

Uploaded Source

File details

Details for the file django-hbs-makemessages-0.9.4.tar.gz.

File metadata

File hashes

Hashes for django-hbs-makemessages-0.9.4.tar.gz
Algorithm Hash digest
SHA256 f526697ddc0f07fc0c97a230f4cea7176624dd910476854c36a2c07fec5d3c1a
MD5 3f3d8685bcd9fc224a6dee8d293c7c6d
BLAKE2b-256 477166252beee5c01209644457e09a763c1134405e66cbd936898fe9a4cb2e1d

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page