Blazing fast implementation of Fluent localization language.
Project description
This is a Python implementation of Project Fluent, a localization framework designed to unleash the entire expressive power of natural language translations.
It provides a different implementation from the official fluent.runtime implementation, distinguished mainly by:
strategy: we compile FTL files to Python code via AST and exec it (similar to the strategy used by projects like Mako, Jinja2 and Genshi.
speed: as a result of the above, plus optimizations, we get blazing fast performance, especially when combined with PyPy which can further optimize.
compile-time checking and error reporting.
‘escapers’ feature for handling things like HTML escaping/embedding correctly.
Installation
To install:
pip install fluent_compiler
Usage
See the docs folder or read them on readthedocs.org.
Status
The package should be considered a ‘beta’/’release candidate’. It has a very thorough test suite and good docs, and has seen usage in production a dependency of django-ftl for a long time, but without many users.
We are not planning major backwards incompatible changes to the interface, but we’re not guaranteeing stability yet. Also, the nature of the library is such that we expect most users will want to create their own wrappers anyway, which you are encouraged to do, it order to be able to absorb any backwards incompatible changes easily.
See the issues list for planned features.
Background
This code was originally developed as part of fluent.runtime, as an alternative implementation of FluentBundle, but never got merged to the master branch. It has now been pulled out as a separate package.
See https://github.com/django-ftl/fluent-compiler/ for more info.
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
Built Distributions
Hashes for fluent_compiler-0.2-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | ae1462fa028151167845c7f02028c2a459e2b3f04d13bb6ea60a25afd5aef242 |
|
MD5 | c5ce61bc9bf7bae90363e27f1c62321d |
|
BLAKE2b-256 | 1cde93303af7ba189f5b3abe82ec1e54ffcb35e3087cc54d0c4f16bf3582b1fd |
Hashes for fluent_compiler-0.2-py2-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | a019db83de67fbe6260788494cec101b7724c4be9ef74b9cc4a712a4a3788907 |
|
MD5 | 56c40afdaab9b60c30f87ff755a4c4e0 |
|
BLAKE2b-256 | 119596b571417103e2be7ff2da100b7695a7b7ed6bb73e9028a1051fcd85ec38 |