This is a pre-production deployment of Warehouse, however changes made here WILL affect the production instance of PyPI.
Latest Version Dependencies status unknown Test status unknown Test coverage unknown
Project Description

It is an improvement to the implementation of django gettext for javascrtipt.

Features:

  • Now parse javascript teplates for translatable strings (tested with underscore.template)
  • New I18n view more extensible (build on top of CBV) that exposes the djangojs gettext domain and djsgettext domain generated for translation scrings from js templates. Aditionaly the performance is improved with caching of this view (does not supports by django view as default behavior).

How it works?

Django makemesages command generates a djangojs domain po file from *.js files, django-jsgettext generates a djgettext domain po file from .html files (javascript templates) and the new view exposes the two gettext domains to the javascript.

Note

The new view is created because the primary view of django is monolitic and not permits expose domains distinct than djangojs and django.

Currently, only is tested with underscore templates. Example:

<div><%= gettext('sample message') %></div>
<div><%= ngettext('1 message', 'some messages', num) %></div>
<div><%= interpolate(gettext('sample %s'), [1]) %></div>

How use it?

Urls files:

from djsgettext.views import I18n

urlpatterns = patterns('',
    url(r'^js-gettext/$', I18n.as_view()),
)

Collect messages from templates:

python manage.py jsgettext_makemessages
Release History

Release History

0.5

This version

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

Download Files

Download Files

TODO: Brief introduction on what you do with files - including link to relevant help section.

File Name & Checksum SHA256 Checksum Help Version File Type Upload Date
django-jsgettext-0.5.tar.gz (5.4 kB) Copy SHA256 Checksum SHA256 Source Jul 27, 2013

Supported By

WebFaction WebFaction Technical Writing Elastic Elastic Search Pingdom Pingdom Monitoring Dyn Dyn DNS HPE HPE Development Sentry Sentry Error Logging CloudAMQP CloudAMQP RabbitMQ Heroku Heroku PaaS Kabu Creative Kabu Creative UX & Design Fastly Fastly CDN DigiCert DigiCert EV Certificate Rackspace Rackspace Cloud Servers DreamHost DreamHost Log Hosting