fluent4rs

Crates.iofluent4rs
lib.rsfluent4rs
version2.1.2
created_at2025-02-26 07:51:03.243375+00
updated_at2025-03-13 07:22:56.709442+00
descriptionParser / codec for [Fluent FTL files](https://github.com/projectfluent/fluent/blob/master/spec/fluent.ebnf), written for [lingora](https://github.com/nigeleke/lingora) (a localization management program), and may be found to be useful outside of that context. It is not intended to replace any aspects of the [fluent-rs](https://github.com/projectfluent/fluent-rs) crate implemented by [Project Fluent](https://projectfluent.org/), and, for the majority of language translation needs, the reader is referred back to that crate.
homepagehttps://nigeleke.github.io/fluent4rs/
repositoryhttps://github.com/nigeleke/fluent4rs
max_upload_size
id1570121
size338,225
Nigel Eke (nigeleke)

documentation

https://docs.rs/fluent4rs

README

fluent4rs

MIT License Language Build Coverage Version

Site | GitHub | API | Coverage Report

A Fluent (language translation) resource file codec.

Background

The fluent-syntax crate from Project Fluent parses Fluent FTL files. It provides a deserialisation only from the Resource level.

This crate:

  • enables conversion in both directions for any node in the syntax tree,
  • provides a syntax tree walker.

It has been written for lingora (a localization management program), and may be found to be useful outside of that context.

It is not intended to replace any aspects of the fluent-rs crate implemented by Project Fluent, and, for the majority of language translation needs, the reader is referred back to that crate.

Usage fluent4rs fluent-syntax
Programmatic inspection & editing of ftl files ?
Language translation in a program x fluent

Features

Feature Description
default All features are disabled
hash Allow AST nodes to be hashed, for potential usages in HashMaps
serde Allow AST nodes to be serialised / deserialised
trace Include tracing to stderr in the DefaultVisitor implementation
walker Provide AST walker and visitors

Development

cargo test --all-features

AST Image View

Railroad

Relationships

Commit count: 179

cargo fmt