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

Introduction

This packages makes it possible to have i18n in JavaScript via the locales-directory. It is based on jarn.jsi18n and extends jarn.jsi18n (so it needs jarn.jsi18n to work).

Usage

This package is used in exactly the same manner as jarn.jsi18n, so if you want to know how to use kreagroup.jsi18n, visit http://pypi.python.org/pypi/jarn.jsi18n

Why this package?

jarn.jsi18n and kreagroup.jsi18n do differ… You can use the packages in the same way, but the result will differ in one particular case…

Suppose we run the following code in a browser, for the first time:

> jarn.i18n.loadCatalog(‘plone’, ‘es’);

> _es = jarn.i18n.MessageFactory(‘plone’, ‘es’);

> _es(‘Contributor’);

“Contribuyente”

In line 1, jarn.jsi18n will download the i18n catalog in an ASYNCHRONOUS way. While the i18n catalog is loading, it will run line 2 and 3, so ‘Contributor’ will be translated while the i18n catalog is not loaded. Because the i18n catalog is not loaded, _es(‘Contributor’) will not be translated and just return the input. Here, the result will be ‘Contributor’, not “Contribuyente”. The next time we run the same code, chances are big that the download of the i18n catalog is completed, so it will be in browser cache (no need to download now), and the translation will executed correctly.

On the other hand… In line 1, kreagroup.jsi18n loads the i18n catalog SYNCHRONOUS, so it waits until the i18n catalog is loaded. When this is finished, it starts executing line 2 and 3 and will translate correctly, because the i18n catalog is already downloaded.

jarn.jsi18n vs kreagroup.jsi18n, a matter of taste…

jarn.jsi18n is more responsive, by only using asynchronous ajax calls. This comes with a penalty of no translation the first time the code is run…

kreagroup.jsi18n does always translate correctly. This comes with a penalty of a synchronous ajax call, which means you have to wait a little longer before the page loads the first time, which is less responsive…

Bonus

jarn.jsi18n-1.0 does not work with Internet Explorer 8. kreagroup.jsi18n contains a fix so translation do work in Internet Explorer 8. Probably, jarn.jsi18n-1.1 will also contain this fix :-)

Changelog

1.0.3 - 2013-08-16

  • Pin jarn.jsi18n to version 1.0

1.0.2 - 2013-08-13

  • Fixes in documentation

1.0.1 - 2013-08-13

  • Added documentation for first public release

1.0.0 - 2013-05-23

  • Initial release
Release History

Release History

1.0.3

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

1.0.2

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
kreagroup.jsi18n-1.0.3.tar.gz (14.6 kB) Copy SHA256 Checksum SHA256 Source Aug 16, 2013

Supported By

WebFaction WebFaction Technical Writing Elastic Elastic Search Pingdom Pingdom Monitoring Dyn Dyn DNS 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