Prettier plugin for formatting Fluent files. Fluent is a localization paradigm designed to unleash the expressive power of natural language. The format used to describe translation resources in Fluent is called FTL.
FTL is designed to be simple to read, yet powerful enough to represent complex concepts from natural languages such as gender, plurals, conjugations, and more.
Prettier is an opinionated code formatter that supports various programming languages and file formats. It aims to enforce a consistent code style across your entire project, making code formatting less of a hassle and allowing developers to focus more on writing code rather than formatting it.
You can install prettier-plugin-fluent
via npm or yarn:
npm install --save-dev prettier-plugin-fluent
# or
yarn add --dev prettier-plugin-fluent
Once installed, the plugin will automatically format .ftl
files whenever you run Prettier.
npx prettier --write .
Replace .
with the path to your Fluent files or directories containing Fluent files that you want to format.
yarn build && yarn node --experimental-vm-modules $(yarn bin jest)
- Consistent Formatting: Ensure that your Fluent files are formatted consistently across your project.
- Ease of Use: Seamlessly integrate with Prettier to format your Fluent files without any additional setup.
- Preservation of FTL Semantics: The plugin ensures that the formatting changes do not alter the semantic meaning of your Fluent resources.
Contributions are welcome! If you encounter any bugs or have suggestions for improvements, please feel free to open an issue or submit a pull request on GitHub.
Before submitting a pull request, please make sure to read our Contributing Guidelines.
This project is licensed under the MIT License - see the LICENSE file for details.