diff --git a/README.md b/README.md index 209355f8..0ecc7be0 100644 --- a/README.md +++ b/README.md @@ -1,54 +1,77 @@ -# Fluent [![Build](https://github.com/projectfluent/fluent-rs/actions/workflows/test.yaml/badge.svg)](https://github.com/projectfluent/fluent-rs/actions/workflows/test.yaml) [![Coverage Status](https://coveralls.io/repos/github/projectfluent/fluent-rs/badge.svg?branch=main)](https://coveralls.io/github/projectfluent/fluent-rs?branch=main) +# Project Fluent -`fluent-rs` is a collection of Rust crates implementing [Project Fluent](https://projectfluent.org). +[![Build](https://github.com/projectfluent/fluent-rs/actions/workflows/test.yaml/badge.svg)](https://github.com/projectfluent/fluent-rs/actions/workflows/test.yaml) +[![Coverage Status](https://coveralls.io/repos/github/projectfluent/fluent-rs/badge.svg?branch=main)](https://coveralls.io/github/projectfluent/fluent-rs?branch=main) + +The `fluent-rs` workspace is a collection of Rust crates implementing [Project Fluent][], +a localization system designed to unleash the entire expressive power of natural language translations. + +Project Fluent keeps simple things simple and makes complex things possible. +The syntax used for describing translations is easy to read and understand. +At the same time it allows, when necessary, to represent complex concepts from natural languages like gender, plurals, conjugations, and others. ## Packages -The crates perform the following functions: +This workspace contains the following crates: -### fluent [![crates.io](https://img.shields.io/crates/v/fluent.svg)](https://crates.io/crates/fluent) +### fluent -Umbrella crate combining crates that are ready to be used in production. +[![crates.io](https://img.shields.io/crates/v/fluent.svg)](https://crates.io/crates/fluent) +[![docs.rs](https://img.shields.io/docsrs/fluent)](https://docs.rs/fluent) -### fluent-syntax [![crates.io](https://img.shields.io/crates/v/fluent_syntax.svg)](https://crates.io/crates/fluent_syntax) +An umbrella crate exposing the combined features of fluent-rs crates with additional convenience macros. -Low level Fluent Syntax AST and parser API. +### fluent-bundle -### fluent-bundle [![crates.io](https://img.shields.io/crates/v/fluent_bundle.svg)](https://crates.io/crates/fluent_bundle) +[![crates.io](https://img.shields.io/crates/v/fluent_bundle.svg)](https://crates.io/crates/fluent_bundle) +[![docs.rs](https://img.shields.io/docsrs/fluent-bundle)](https://docs.rs/fluent-bundle) -Implementation of the low-level Fluent Localization System providing localization capabilities for any Rust project. +A low-level implementation of a collection of localization messages for a single locale. -### fluent-fallback [![crates.io](https://img.shields.io/crates/v/fluent_fallback.svg)](https://crates.io/crates/fluent_fallback) +### fluent-fallback -Implementation of the high-level Fluent Localization System providing localization capabilities for any Rust project. +[![crates.io](https://img.shields.io/crates/v/fluent_fallback.svg)](https://crates.io/crates/fluent_fallback) +[![docs.rs](https://img.shields.io/docsrs/fluent-fallback)](https://docs.rs/fluent-fallback) -### fluent-resmgr [![crates.io](https://img.shields.io/crates/v/fluent_resmgr.svg)](https://crates.io/crates/fluent_resmgr) +A high-level abstraction model for managing locale bundles and runtime localization lifecycle. -Resource Manager for localization resources. +### fluent-resmgr -### fluent-cli +[![crates.io](https://img.shields.io/crates/v/fluent_resmgr.svg)](https://crates.io/crates/fluent_resmgr) +[![docs.rs](https://img.shields.io/docsrs/fluent-resmgr)](https://docs.rs/fluent-resmgr) + +A standalone solution for managing resource files and returning locale bundles. + +### fluent-syntax + +[![crates.io](https://img.shields.io/crates/v/fluent_syntax.svg)](https://crates.io/crates/fluent_syntax) +[![docs.rs](https://img.shields.io/docsrs/fluent-syntax)](https://docs.rs/fluent-syntax) -Collection of command line tools for Fluent. +A low-level parser, AST, and serializer API for the Fluent syntax. -## Running the project +### fluent-pseudo -Each `fluent-*` directory works with the typical `cargo` commands. In addition there are some general `cargo-make` commands that can be run. First install `cargo-make` via `cargo install --force cargo-make`. The commands are documented in [Makefile.toml](Makefile.toml). +[![crates.io](https://img.shields.io/crates/v/fluent_pseudo.svg)](https://crates.io/crates/fluent_pseudo) +[![docs.rs](https://img.shields.io/docsrs/fluent-pseudo)](https://docs.rs/fluent-pseudo) -### Tests +A pseudolocalization and transformation API. -To run all of the tests for the repo run: +### fluent-testing -```sh -cargo make test -``` +[![crates.io](https://img.shields.io/crates/v/fluent_testing.svg)](https://crates.io/crates/fluent_testing) +[![docs.rs](https://img.shields.io/docsrs/fluent-testing)](https://docs.rs/fluent-testing) -For local code coverage reports run: +A collection of mock scenarios for testing fluent-rs components. + +### intl-memoizer + +[![crates.io](https://img.shields.io/crates/v/fluent_testing.svg)](https://crates.io/crates/fluent_testing) +[![docs.rs](https://img.shields.io/docsrs/intl-memoizer)](https://docs.rs/intl-memoizer) + +A memoizer specifically tailored for storing lazy-initialized intl formatters. + +### fluent-cli -```sh -# Install the tools first if you haven't done so. The llvm tools must be available -# on the path for this to work correctly. -cargo make install-tools +A collection of developer-oriented command line tools for Fluent. -# Then coverage can be run like so: -cargo make coverage -``` +[Project Fluent]: https://projectfluent.org diff --git a/fluent-bundle/Cargo.toml b/fluent-bundle/Cargo.toml index 0374d2b4..02c72737 100644 --- a/fluent-bundle/Cargo.toml +++ b/fluent-bundle/Cargo.toml @@ -1,8 +1,8 @@ [package] name = "fluent-bundle" description = """ -A localization system designed to unleash the entire expressive power of -natural language translations. +A low-level implementation of a collection of localization messages for a single locale for Project Fluent, +a localization system designed to unleash the entire expressive power of natural language translations. """ version = "0.15.3" edition.workspace = true diff --git a/fluent-bundle/README.md b/fluent-bundle/README.md index 488be2ea..eddaf2e3 100644 --- a/fluent-bundle/README.md +++ b/fluent-bundle/README.md @@ -1,22 +1,16 @@ -# Fluent - -`fluent-rs` is a Rust implementation of [Project Fluent][], a localization -framework designed to unleash the entire expressive power of natural language -translations. +# Fluent Bundle [![crates.io](https://img.shields.io/crates/v/fluent-bundle.svg)](https://crates.io/crates/fluent-bundle) +[![docs.rs](https://img.shields.io/docsrs/fluent-bundle)](https://docs.rs/fluent-bundle) [![Build](https://github.com/projectfluent/fluent-rs/actions/workflows/test.yaml/badge.svg)](https://github.com/projectfluent/fluent-rs/actions/workflows/test.yaml) [![Coverage Status](https://coveralls.io/repos/github/projectfluent/fluent-rs/badge.svg?branch=main)](https://coveralls.io/github/projectfluent/fluent-rs?branch=main) -Project Fluent keeps simple things simple and makes complex things possible. -The syntax used for describing translations is easy to read and understand. At -the same time it allows, when necessary, to represent complex concepts from -natural languages like gender, plurals, conjugations, and others. +The `fluent-rs` workspace is a collection of Rust crates implementing [Project Fluent][], +a localization system designed to unleash the entire expressive power of natural language translations. -[Documentation][] +This crate is a low-level implementation of a collection of localization messages for a single locale. -[Project Fluent]: http://projectfluent.org -[Documentation]: https://docs.rs/fluent/ +[Project Fluent]: https://projectfluent.org Usage ----- @@ -47,49 +41,6 @@ fn main() { } ``` - -Status ------- - -The implementation is in its early stages and supports only some of the Project -Fluent's spec. Consult the [list of milestones][] for more information about -release planning and scope. - -[list of milestones]: https://github.com/projectfluent/fluent-rs/milestones - - -Local Development ------------------ - - cargo build - cargo test - cargo bench - cargo run --example simple-app - -When submitting a PR please use [`cargo fmt`][] (nightly). - -[`cargo fmt`]: https://github.com/rust-lang-nursery/rustfmt - - -Learn the FTL syntax --------------------- - -FTL is a localization file format used for describing translation resources. -FTL stands for _Fluent Translation List_. - -FTL is designed to be simple to read, but at the same time allows to represent -complex concepts from natural languages like gender, plurals, conjugations, and -others. - - hello-user = Hello, { $username }! - -[Read the Fluent Syntax Guide][] in order to learn more about the syntax. If -you're a tool author you may be interested in the formal [EBNF grammar][]. - -[Read the Fluent Syntax Guide]: http://projectfluent.org/fluent/guide/ -[EBNF grammar]: https://github.com/projectfluent/fluent/tree/master/spec - - Get Involved ------------ diff --git a/fluent-cli/Cargo.toml b/fluent-cli/Cargo.toml index 123d3198..1201fe68 100644 --- a/fluent-cli/Cargo.toml +++ b/fluent-cli/Cargo.toml @@ -1,8 +1,8 @@ [package] name = "fluent-cli" description = """ -A collection of command line interface programs -for Fluent Localization System. +A collection of developer-oriented command line interface tools for Project Fluent, +a localization system designed to unleash the entire expressive power of natural language translations. """ version = "0.0.1" edition.workspace = true diff --git a/fluent-fallback/Cargo.toml b/fluent-fallback/Cargo.toml index d017d3b0..f9240a6b 100644 --- a/fluent-fallback/Cargo.toml +++ b/fluent-fallback/Cargo.toml @@ -1,8 +1,8 @@ [package] name = "fluent-fallback" description = """ -High-level abstraction model for managing localization resources -and runtime localization lifecycle. +A high-level implementation of a collection of locale bundles including fallback between locales for Project Fluent, +a localization system designed to unleash the entire expressive power of natural language translations. """ version = "0.7.1" edition.workspace = true diff --git a/fluent-fallback/README.md b/fluent-fallback/README.md index d5246d54..79fae9af 100644 --- a/fluent-fallback/README.md +++ b/fluent-fallback/README.md @@ -1,30 +1,26 @@ -# Fluent - -`fluent-fallback` is a Rust implementation of the [Project Fluent][] higher level API. - -The `Localization` struct encapsulates a persistent localization context providing -language fallbacking. The instance remains available throughout the whole life cycle of -the corresponding UI, reacting to events such as locale changes, resource updates etc. - -The API can be used directly, or can serve as an example of state manager for `fluent-bundle` and `fluent-resmgr`. +# Fluent Fallback [![crates.io](https://img.shields.io/crates/v/fluent-fallback.svg)](https://crates.io/crates/fluent-fallback) +[![docs.rs](https://img.shields.io/docsrs/fluent-fallback)](https://docs.rs/fluent-fallback) [![Build](https://github.com/projectfluent/fluent-rs/actions/workflows/test.yaml/badge.svg)](https://github.com/projectfluent/fluent-rs/actions/workflows/test.yaml) [![Coverage Status](https://coveralls.io/repos/github/projectfluent/fluent-rs/badge.svg?branch=main)](https://coveralls.io/github/projectfluent/fluent-rs?branch=main) -Project Fluent keeps simple things simple and makes complex things possible. -The syntax used for describing translations is easy to read and understand. At -the same time it allows, when necessary, to represent complex concepts from -natural languages like gender, plurals, conjugations, and others. +The `fluent-rs` workspace is a collection of Rust crates implementing [Project Fluent][], +a localization system designed to unleash the entire expressive power of natural language translations. -[Documentation][] +This crate is a high-level implementation of a collection of locale bundles including fallback between locales. -[Project Fluent]: http://projectfluent.org -[Documentation]: https://docs.rs/fluent/ +[Project Fluent]: https://projectfluent.org Usage ----- +The `Localization` struct encapsulates a persistent localization context providing language fallbacking. +The instance remains available throughout the whole life cycle of the corresponding UI, +reacting to events such as locale changes, resource updates etc. + +The API can be used directly, or can serve as an example of state manager for `fluent-bundle` and `fluent-resmgr`. + ```rust use fluent_fallback::Localization; @@ -39,48 +35,6 @@ fn main() { } ``` - -Status ------- - -The implementation is in its early stages and supports only some of the Project -Fluent's spec. Consult the [list of milestones][] for more information about -release planning and scope. - -[list of milestones]: https://github.com/projectfluent/fluent-rs/milestones - - -Local Development ------------------ - - cargo build - cargo test - cargo run --example simple-fallback - -When submitting a PR please use [`cargo fmt`][] (nightly). - -[`cargo fmt`]: https://github.com/rust-lang-nursery/rustfmt - - -Learn the FTL syntax --------------------- - -FTL is a localization file format used for describing translation resources. -FTL stands for _Fluent Translation List_. - -FTL is designed to be simple to read, but at the same time allows to represent -complex concepts from natural languages like gender, plurals, conjugations, and -others. - - hello-user = Hello, { $username }! - -[Read the Fluent Syntax Guide][] in order to learn more about the syntax. If -you're a tool author you may be interested in the formal [EBNF grammar][]. - -[Read the Fluent Syntax Guide]: http://projectfluent.org/fluent/guide/ -[EBNF grammar]: https://github.com/projectfluent/fluent/tree/master/spec - - Get Involved ------------ diff --git a/fluent-pseudo/Cargo.toml b/fluent-pseudo/Cargo.toml index 2d87b5ea..9ee4063b 100644 --- a/fluent-pseudo/Cargo.toml +++ b/fluent-pseudo/Cargo.toml @@ -1,7 +1,8 @@ [package] name = "fluent-pseudo" description = """ -Pseudolocalization transformation API for use with Project Fluent API. +A pseudolocalization and transformation API for Project Fluent, +a localization system designed to unleash the entire expressive power of natural language translations. """ version = "0.3.2" edition.workspace = true diff --git a/fluent-pseudo/README.md b/fluent-pseudo/README.md index 2b97ce12..d3c3d6c0 100644 --- a/fluent-pseudo/README.md +++ b/fluent-pseudo/README.md @@ -1,13 +1,17 @@ -# Fluent - -`fluent-pseudo` is a Rust implementation of the pseudolocalization API for [Project Fluent](https://projectfluent.org/), a localization -framework designed to unleash the entire expressive power of natural language -translations. +# Fluent Pseudo [![crates.io](https://img.shields.io/crates/v/fluent-pseudo.svg)](https://crates.io/crates/fluent-pseudo) +[![docs.rs](https://img.shields.io/docsrs/fluent-pseudo)](https://docs.rs/fluent-pseudo) [![Build](https://github.com/projectfluent/fluent-rs/actions/workflows/test.yaml/badge.svg)](https://github.com/projectfluent/fluent-rs/actions/workflows/test.yaml) [![Coverage Status](https://coveralls.io/repos/github/projectfluent/fluent-rs/badge.svg?branch=main)](https://coveralls.io/github/projectfluent/fluent-rs?branch=main) +The `fluent-rs` workspace is a collection of Rust crates implementing [Project Fluent][], +a localization system designed to unleash the entire expressive power of natural language translations. + +This crate provides a pseudolocalization and transformation API. + +[Project Fluent]: https://projectfluent.org + Usage ----- diff --git a/fluent-resmgr/Cargo.toml b/fluent-resmgr/Cargo.toml index 7029083c..8d679c75 100644 --- a/fluent-resmgr/Cargo.toml +++ b/fluent-resmgr/Cargo.toml @@ -1,7 +1,8 @@ [package] name = "fluent-resmgr" description = """ -Resource manager for Fluent localization resources. +A standalone solution for managing resource files and returning locale bundles for Project Fluent, +a localization system designed to unleash the entire expressive power of natural language translations. """ version = "0.0.7" edition.workspace = true diff --git a/fluent-resmgr/README.md b/fluent-resmgr/README.md index 147615c1..9864c83e 100644 --- a/fluent-resmgr/README.md +++ b/fluent-resmgr/README.md @@ -1,23 +1,16 @@ # Fluent Resource Manager -`fluent-resmgr` is an implementation of resource manager for [Project Fluent][]. - -Resource Manager provides a standalone solution for managing localization resources which -can be used by `fluent-fallback` or other higher level bindings. - [![crates.io](https://img.shields.io/crates/v/fluent-resmgr.svg)](https://crates.io/crates/fluent-resmgr) +[![docs.rs](https://img.shields.io/docsrs/fluent-resmgr)](https://docs.rs/fluent-resmgr) [![Build](https://github.com/projectfluent/fluent-rs/actions/workflows/test.yaml/badge.svg)](https://github.com/projectfluent/fluent-rs/actions/workflows/test.yaml) [![Coverage Status](https://coveralls.io/repos/github/projectfluent/fluent-rs/badge.svg?branch=main)](https://coveralls.io/github/projectfluent/fluent-rs?branch=main) -Project Fluent keeps simple things simple and makes complex things possible. -The syntax used for describing translations is easy to read and understand. At -the same time it allows, when necessary, to represent complex concepts from -natural languages like gender, plurals, conjugations, and others. +The `fluent-rs` workspace is a collection of Rust crates implementing [Project Fluent][], +a localization system designed to unleash the entire expressive power of natural language translations. -[Documentation][] +This crate is a standalone solution for managing resource files and returning locale bundles. -[Project Fluent]: http://projectfluent.org -[Documentation]: https://docs.rs/fluent/ +[Project Fluent]: https://projectfluent.org Usage ----- @@ -36,48 +29,6 @@ fn main() { } ``` - -Status ------- - -The implementation is in its early stages and supports only some of the Project -Fluent's spec. Consult the [list of milestones][] for more information about -release planning and scope. - -[list of milestones]: https://github.com/projectfluent/fluent-rs/milestones - - -Local Development ------------------ - - cargo build - cargo test - cargo run --example simple - -When submitting a PR please use [`cargo fmt`][] (nightly). - -[`cargo fmt`]: https://github.com/rust-lang-nursery/rustfmt - - -Learn the FTL syntax --------------------- - -FTL is a localization file format used for describing translation resources. -FTL stands for _Fluent Translation List_. - -FTL is designed to be simple to read, but at the same time allows to represent -complex concepts from natural languages like gender, plurals, conjugations, and -others. - - hello-user = Hello, { $username }! - -[Read the Fluent Syntax Guide][] in order to learn more about the syntax. If -you're a tool author you may be interested in the formal [EBNF grammar][]. - -[Read the Fluent Syntax Guide]: http://projectfluent.org/fluent/guide/ -[EBNF grammar]: https://github.com/projectfluent/fluent/tree/master/spec - - Get Involved ------------ diff --git a/fluent-syntax/Cargo.toml b/fluent-syntax/Cargo.toml index c238bc2e..2e05e58b 100644 --- a/fluent-syntax/Cargo.toml +++ b/fluent-syntax/Cargo.toml @@ -1,7 +1,8 @@ [package] name = "fluent-syntax" description = """ -Parser/Serializer tools for Fluent Syntax. +A low-level parser, AST, and serializer API for the syntax used by Project Fluent, +a localization system designed to unleash the entire expressive power of natural language translations. """ version = "0.11.1" edition.workspace = true diff --git a/fluent-syntax/README.md b/fluent-syntax/README.md index e1178bfc..61ccb875 100644 --- a/fluent-syntax/README.md +++ b/fluent-syntax/README.md @@ -1,47 +1,16 @@ # Fluent Syntax -`fluent-syntax` is a parser/serializer API for the Fluent Syntax, part of the [Project Fluent](https://projectfluent.org/), a localization -framework designed to unleash the entire expressive power of natural language translations. - [![crates.io](https://img.shields.io/crates/v/fluent-syntax.svg)](https://crates.io/crates/fluent-syntax) +[![docs.rs](https://img.shields.io/docsrs/fluent-syntax)](https://docs.rs/fluent-syntax) [![Build](https://github.com/projectfluent/fluent-rs/actions/workflows/test.yaml/badge.svg)](https://github.com/projectfluent/fluent-rs/actions/workflows/test.yaml) [![Coverage Status](https://coveralls.io/repos/github/projectfluent/fluent-rs/badge.svg?branch=main)](https://coveralls.io/github/projectfluent/fluent-rs?branch=main) -Status ------- - -The crate currently provides just a parser, which is tracking Fluent Syntax on its way to 1.0. - -Local Development ------------------ - - cargo build - cargo test - cargo bench - -When submitting a PR please use [`cargo fmt`][] (nightly). - -[`cargo fmt`]: https://github.com/rust-lang-nursery/rustfmt - - -Learn the FTL syntax --------------------- - -FTL is a localization file format used for describing translation resources. -FTL stands for _Fluent Translation List_. - -FTL is designed to be simple to read, but at the same time allows to represent -complex concepts from natural languages like gender, plurals, conjugations, and -others. - - hello-user = Hello, { $username }! - -[Read the Fluent Syntax Guide][] in order to learn more about the syntax. If -you're a tool author you may be interested in the formal [EBNF grammar][]. +The `fluent-rs` workspace is a collection of Rust crates implementing [Project Fluent][], +a localization system designed to unleash the entire expressive power of natural language translations. -[Read the Fluent Syntax Guide]: http://projectfluent.org/fluent/guide/ -[EBNF grammar]: https://github.com/projectfluent/fluent/tree/master/spec +This crate is a low-level parser, AST, and serializer API for the Fluent Syntax. +[Project Fluent]: https://projectfluent.org Get Involved ------------ diff --git a/fluent-testing/Cargo.toml b/fluent-testing/Cargo.toml index 207d1960..d5b7f9ac 100644 --- a/fluent-testing/Cargo.toml +++ b/fluent-testing/Cargo.toml @@ -1,7 +1,8 @@ [package] name = "fluent-testing" description = """ -A collection of mock scenarios for testing fluent-rs components. +A collection of mock scenarios for testing components of Project Fluent, +a localization system designed to unleash the entire expressive power of natural language translations. """ version = "0.0.4" edition.workspace = true diff --git a/fluent-testing/README.md b/fluent-testing/README.md index 007c7ec6..dd6bc5db 100644 --- a/fluent-testing/README.md +++ b/fluent-testing/README.md @@ -1,57 +1,16 @@ -# Fluent +# Fluent Testing -`fluent-testing` is a collection of mock scenarios for testing fluent-rs components. +[![crates.io](https://img.shields.io/crates/v/fluent-bundle.svg)](https://crates.io/crates/fluent-bundle) +[![docs.rs](https://img.shields.io/docsrs/fluent-testing)](https://docs.rs/fluent-testing) +[![Build](https://github.com/projectfluent/fluent-rs/actions/workflows/test.yaml/badge.svg)](https://github.com/projectfluent/fluent-rs/actions/workflows/test.yaml) +[![Coverage Status](https://coveralls.io/repos/github/projectfluent/fluent-rs/badge.svg?branch=main)](https://coveralls.io/github/projectfluent/fluent-rs?branch=main) -Project Fluent keeps simple things simple and makes complex things possible. -The syntax used for describing translations is easy to read and understand. At -the same time it allows, when necessary, to represent complex concepts from -natural languages like gender, plurals, conjugations, and others. +The `fluent-rs` workspace is a collection of Rust crates implementing [Project Fluent][], +a localization system designed to unleash the entire expressive power of natural language translations. -[Documentation][] +This crate is a collection of mock scenarios for testing fluent-rs components. [Project Fluent]: https://projectfluent.org -[Documentation]: https://docs.rs/fluent/ - -Status ------- - -The implementation is in its early stages and supports only some of the Project -Fluent's spec. Consult the [list of milestones][] for more information about -release planning and scope. - -[list of milestones]: https://github.com/projectfluent/fluent-rs/milestones - - -Local Development ------------------ - - cargo build - cargo test - cargo run --example simple-fallback - -When submitting a PR please use [`cargo fmt`][] (nightly). - -[`cargo fmt`]: https://github.com/rust-lang-nursery/rustfmt - - -Learn the FTL syntax --------------------- - -FTL is a localization file format used for describing translation resources. -FTL stands for _Fluent Translation List_. - -FTL is designed to be simple to read, but at the same time allows to represent -complex concepts from natural languages like gender, plurals, conjugations, and -others. - - hello-user = Hello, { $username }! - -[Read the Fluent Syntax Guide][] in order to learn more about the syntax. If -you're a tool author you may be interested in the formal [EBNF grammar][]. - -[Read the Fluent Syntax Guide]: https://projectfluent.org/fluent/guide/ -[EBNF grammar]: https://github.com/projectfluent/fluent/tree/master/spec - Get Involved ------------ diff --git a/fluent/Cargo.toml b/fluent/Cargo.toml index c57985c0..e619da1e 100644 --- a/fluent/Cargo.toml +++ b/fluent/Cargo.toml @@ -1,8 +1,8 @@ [package] name = "fluent" description = """ -A localization system designed to unleash the entire expressive power of -natural language translations. +An umbrella crate exposing the combined features of fluent-rs crates with additional convenience macros for Project Fluent, +a localization system designed to unleash the entire expressive power of natural language translations. """ version = "0.16.1" edition.workspace = true diff --git a/fluent/README.md b/fluent/README.md index 875dd50d..9b77ed6e 100644 --- a/fluent/README.md +++ b/fluent/README.md @@ -1,22 +1,16 @@ # Fluent -`fluent-rs` is a Rust implementation of [Project Fluent][], a localization -framework designed to unleash the entire expressive power of natural language -translations. - [![crates.io](https://img.shields.io/crates/v/fluent.svg)](https://crates.io/crates/fluent) +[![docs.rs](https://img.shields.io/docsrs/fluent)](https://docs.rs/fluent) [![Build](https://github.com/projectfluent/fluent-rs/actions/workflows/test.yaml/badge.svg)](https://github.com/projectfluent/fluent-rs/actions/workflows/test.yaml) [![Coverage Status](https://coveralls.io/repos/github/projectfluent/fluent-rs/badge.svg?branch=main)](https://coveralls.io/github/projectfluent/fluent-rs?branch=main) -Project Fluent keeps simple things simple and makes complex things possible. -The syntax used for describing translations is easy to read and understand. At -the same time it allows, when necessary, to represent complex concepts from -natural languages like gender, plurals, conjugations, and others. +The `fluent-rs` workspace is a collection of Rust crates implementing [Project Fluent][], +a localization system designed to unleash the entire expressive power of natural language translations. -[Documentation][] +This is an umbrella crate exposing the combined features of `fluent-rs` crates with additional convenience macros. -[Project Fluent]: http://projectfluent.org -[Documentation]: https://docs.rs/fluent/ +[Project Fluent]: https://projectfluent.org Usage ----- @@ -47,14 +41,6 @@ fn main() { } ``` - -Status ------- - -The implementation is in pre-1.0 mode and supports Fluent Syntax 1.0, and -Fluent API 0.14.. Consult the [list of milestones][] for more information about -release planning and scope. - `FluentBundle`, which is the main struct at the moment, is intended to remain a low level API. There is a number of higher level APIs like [fluent-resmgr][] and @@ -63,22 +49,9 @@ for bindings and direct usage. Those higher level APIs are not mature yet enough to be included in this package, but will get added once they are. -[list of milestones]: https://github.com/projectfluent/fluent-rs/milestones [fluent-resmgr]: https://crates.io/crates/fluent-resmgr [fluent-fallback]: https://crates.io/crates/fluent-fallback -Local Development ------------------ - - cargo build - cargo test - cargo bench - cargo run --example simple-app - -When submitting a PR please use [`cargo fmt`][] (nightly). - -[`cargo fmt`]: https://github.com/rust-lang-nursery/rustfmt - Learn the FTL syntax -------------------- @@ -90,7 +63,9 @@ FTL is designed to be simple to read, but at the same time allows to represent complex concepts from natural languages like gender, plurals, conjugations, and others. - hello-user = Hello, { $username }! +```fluent +hello-user = Hello, { $username }! +``` [Read the Fluent Syntax Guide][] in order to learn more about the syntax. If you're a tool author you may be interested in the formal [EBNF grammar][]. diff --git a/intl-memoizer/Cargo.toml b/intl-memoizer/Cargo.toml index b741604b..a96930cb 100644 --- a/intl-memoizer/Cargo.toml +++ b/intl-memoizer/Cargo.toml @@ -1,8 +1,8 @@ [package] name = "intl-memoizer" description = """ -A memoizer specifically tailored for storing lazy-initialized -intl formatters. +A memoizer specifically tailored for storing lazy-initialized intl formatters for Project Fluent, +a localization system designed to unleash the entire expressive power of natural language translations. """ version = "0.5.2" edition.workspace = true diff --git a/intl-memoizer/README.md b/intl-memoizer/README.md index 69f7e72a..1242644e 100644 --- a/intl-memoizer/README.md +++ b/intl-memoizer/README.md @@ -1,17 +1,26 @@ # IntlMemoizer -`intl-memoizer` is a crate designed to handle lazy-initialized references -to intl formatters. +[![crates.io](https://img.shields.io/crates/v/intl-memoizer.svg)](https://crates.io/crates/intl-memoizer) +[![docs.rs](https://img.shields.io/docsrs/intl-memoizer)](https://docs.rs/intl-memoizer) +[![Build](https://github.com/projectfluent/fluent-rs/actions/workflows/test.yaml/badge.svg)](https://github.com/projectfluent/fluent-rs/actions/workflows/test.yaml) +[![Coverage Status](https://coveralls.io/repos/github/projectfluent/fluent-rs/badge.svg?branch=main)](https://coveralls.io/github/projectfluent/fluent-rs?branch=main) + +The `fluent-rs` workspace is a collection of Rust crates implementing [Project Fluent][], +a localization system designed to unleash the entire expressive power of natural language translations. + +This crate is a memoizer specifically tailored for storing lazy-initialized intl formatters. + +[Project Fluent]: https://projectfluent.org + +Usage +----- The assumption is that allocating a new formatter instance is costly, and such instance is read-only during its life time, with constructor being expensive, and `format`/`select` calls being cheap. In result it pays off to use a singleton to manage memoization of all instances of intl -APIs such as `PluralRules`, DateTimeFormat` etc. between all `FluentBundle` instances. - -Usage ------ +APIs such as `PluralRules`, `DateTimeFormat` etc. between all `FluentBundle` instances. The following is a high-level example of how this works, for running examples see the [docs](https://docs.rs/intl-memoizer/)