Fluent i18n solution for Elm
Project description
elm-fluent
elm-fluent is a Fluent implementation for Elm.
Fluent is a next-generation translation/localization solution, designed by the folks at Mozilla, based on many years of experience with localizing into a large number of different languages. Mozilla have extracted parts of their ‘l20n’ solution (used by apps like Firefox and Thunderbird) into a re-usable specification designed specifically for the web.
elm-fluent is a full implementation of this specification for Elm. It operates as a command line tool that compiles .ftl files to .elm files. The result is that each message becomes a function that will generate a translated string (or HTML fragment) for a given locale and an optional set of strongly typed parameters (string, dates or numbers).
Dates and numbers can also be passed with formatting parameters supplied - for example, to attach a currency to a number, so that it can be correctly formatted as a currency according to the rules of the locale in use.
Please see the docs for more information.
Status
Rough around the edges, but usable. Please see the list of open issues.
A pretty complete test suite.
Compatibility: Elm 0.18 only at the moment.
Free software: MIT license
Credits
This package was created with Cookiecutter and the audreyr/cookiecutter-pypackage project template.
History
0.2.0 (2018-09-10)
Better handling for a large variety of error conditions
Proper fallback mechanism implemented
Added --watch option.
Eliminate unused imports from generated code
Various bug fixes: * Avoid outputting .elm files with no exports * Bugs with HTML attributes and non-string message args * Crasher with multi-line messages * Crasher when a message is missing from default locale
0.1.0 (2018-07-27)
First release on PyPI.
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 Distribution
Hashes for elm_fluent-0.2.0-py2.py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | d994c6e56196f417afb1840bb2e6f60e3d4b3bbec94f4674db3c0145e6f88ebc |
|
MD5 | 2c243bb4ca04104135a2920971e1e644 |
|
BLAKE2b-256 | 373e984a9a3861be7b45c9c1174fcf62dd2b517e352295b86beb4d1c41d576ac |