Library providing makemessages for Handlebars.js templates
Project description
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 “”
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
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
File details
Details for the file django-hbs-makemessages-0.9.3.tar.gz
.
File metadata
- Download URL: django-hbs-makemessages-0.9.3.tar.gz
- Upload date:
- Size: 7.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3bed2603d115c4910c1b6f127dc805b7abd05b46acb4a0005af66297533385db |
|
MD5 | 9936b44374cfff7c9cbd7dfce1de7887 |
|
BLAKE2b-256 | 77c0f14aced44b394df109a5816b53cb44af5d628b71d3571d94eec827291765 |