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.6
    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.6.tar.gz (17.3 kB view hashes)

Uploaded Source

Built Distribution

moz_fluent_linter-0.4.6-py3-none-any.whl (14.3 kB view hashes)

Uploaded Python 3

Supported by

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