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 details)

Uploaded Source

Built Distribution

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

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for moz_fluent_linter-0.4.6.tar.gz
Algorithm Hash digest
SHA256 9ed9900726a06550daa7fa3600d60dd0c8102bfe6f6652a70264e0e14e2a36fb
MD5 365f0d480ad02322ddec6c4b21c614f1
BLAKE2b-256 929ff2b4d74d98176db1e360213a04394b22a614f5e9c681499daf153a36ae09

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for moz_fluent_linter-0.4.6-py3-none-any.whl
Algorithm Hash digest
SHA256 2eb21b49b220b956e699b3c1deb1ab0643c282980b11ee4d022ab5489d8be0f5
MD5 cacdefbe92aa7ecf6df2786547e7b650
BLAKE2b-256 adbeb9cbadd29feac738509965b928fc28a9ff706277c8abc4b61fd977f72faf

See more details on using hashes here.

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