Skip to main content

Fluent i18n solution for Elm

Project description

elm-fluent

https://img.shields.io/pypi/v/elm_fluent.svg https://img.shields.io/travis/elm-fluent/elm-fluent.svg https://codecov.io/gh/elm-fluent/elm-fluent/branch/master/graph/badge.svg Documentation Status

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 (currently supporting the Fluent 0.6 syntax).

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. Fluent 0.6 syntax.

  • Free software: MIT license

Credits

This package was created with Cookiecutter and the audreyr/cookiecutter-pypackage project template.

History

0.3.0 (under development)

0.2.1 (2018-12-19)

  • Fixed python-fluent dependency to an older version (< 0.9), because it doesn’t work with newer versions. Thanks @stasm for the report.

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

elm_fluent-0.2.1.tar.gz (114.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

elm_fluent-0.2.1-py2.py3-none-any.whl (43.7 kB view details)

Uploaded Python 2Python 3

File details

Details for the file elm_fluent-0.2.1.tar.gz.

File metadata

  • Download URL: elm_fluent-0.2.1.tar.gz
  • Upload date:
  • Size: 114.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.12.1 pkginfo/1.4.2 requests/2.21.0 setuptools/40.6.3 requests-toolbelt/0.8.0 tqdm/4.28.1 CPython/3.6.7

File hashes

Hashes for elm_fluent-0.2.1.tar.gz
Algorithm Hash digest
SHA256 445254dac1b98d73f2ee13f5d7fdc6332477dc5be79f0d037fe19696d1161267
MD5 2c241a5f0a9a7a52bfe87a5f210dce5c
BLAKE2b-256 530971ac9669de0c892342d705ea8a4d99edc8da356a7b6924778602e7f436c4

See more details on using hashes here.

File details

Details for the file elm_fluent-0.2.1-py2.py3-none-any.whl.

File metadata

  • Download URL: elm_fluent-0.2.1-py2.py3-none-any.whl
  • Upload date:
  • Size: 43.7 kB
  • Tags: Python 2, Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.12.1 pkginfo/1.4.2 requests/2.21.0 setuptools/40.6.3 requests-toolbelt/0.8.0 tqdm/4.28.1 CPython/3.6.7

File hashes

Hashes for elm_fluent-0.2.1-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 a1546e2716f20bf5d8204eaf2c1b16a233f32716c531f8e0f481aae7d6c64ec6
MD5 6eecca3f2d699126fd68f33f3ef49697
BLAKE2b-256 0b1bfc0bc09b5569136aa9fdbc0faea2395582730d47b1fad801ad5a5dbb3c61

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page