Skip to main content

Linter package used to check Fluent files

Project description

Fluent Linter

PyPI version

Unit Tests

This script is largely based on the Fluent Linter used in mozilla-central for Firefox localization.

It allows to check reference FTL files for common issues:

  • Identifiers too short
  • Invalid characters available used in identifiers
  • Use of incorrect characters (e.g. ' instead of )

It also allows to limit the range of features supported, for example disabling attributes or variants.

Version control integration

Using pre-commit, add this to the .pre-commit-config.yaml in your repository:

repos:
  - repo: https://github.com/mozilla-l10n/moz-fluent-linter
    rev: v0.4.8
    hooks:
      - id: fluent_linter
        files: \.ftl$
        args: [--config, l10n/linter_config.yml, l10n/en/]

This is just an example to get you started, you may need to update the rev and args depending on your specific needs and configuration.

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

moz_fluent_linter-0.4.8.tar.gz (17.7 kB view details)

Uploaded Source

Built Distribution

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

moz_fluent_linter-0.4.8-py3-none-any.whl (14.4 kB view details)

Uploaded Python 3

File details

Details for the file moz_fluent_linter-0.4.8.tar.gz.

File metadata

  • Download URL: moz_fluent_linter-0.4.8.tar.gz
  • Upload date:
  • Size: 17.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.11.8

File hashes

Hashes for moz_fluent_linter-0.4.8.tar.gz
Algorithm Hash digest
SHA256 73486c8102e7aa9dcc44b5543d97022b9cedc4c9e8f6d4d6a61f920e71777182
MD5 89c02ed603abd140a94d5d22aa036b59
BLAKE2b-256 d3ee27b65417fed2d1df6963e1d9a1a38dab17295ec772c124c7c98ef2ad4933

See more details on using hashes here.

File details

Details for the file moz_fluent_linter-0.4.8-py3-none-any.whl.

File metadata

File hashes

Hashes for moz_fluent_linter-0.4.8-py3-none-any.whl
Algorithm Hash digest
SHA256 1256aec8b2383cf3a4066c8dc7c3ea6ced73749b9a1bea9a77f2a3360f3a116c
MD5 75f6935729e19b01d038aa5f73b53381
BLAKE2b-256 1e95c3de9963a0a204e6ff8c19e1deb545fd033bd614a94741341ed34266a878

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