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 AST
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.
Status
This code was originally developed as part of fluent.runtime, as an alternative implementation of FluentBundle, but never got merged to the master branch. We are in the process of pulling it out as a separate package.
It has seen usage in production a dependency of django-ftl for a long time. However, now that we don’t need full compatibility with fluent.runtime it will be modified further in terms of interface.
Installation
To install:
pip install fluent_compiler
Usage
See the docs folder or read them on readthedocs.org.
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.1.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | d72978039de795d1dbdc24eeb6452a884d198247e9bb139b3f95fc1c46e41be5 |
|
MD5 | 0199d855862aaf87e66ac7d83815f152 |
|
BLAKE2b-256 | 51c8d72a6779034c9badd57394528e4cc29eb71ccecd5134b6fa458c75c93c01 |
Hashes for fluent_compiler-0.1.1-py2-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | af83f3e86cb0e856887ee402cb69c0f0e999a518966f7871caa9289a88a9da4c |
|
MD5 | 9fb813ead1f9d6e7475f7aa35a50ba43 |
|
BLAKE2b-256 | a2fd1116f917195b5b5d928f0b8aadc45c01919fe25dffcb66c8af3227d3b3b1 |