Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cleanup up READMEs #359

Merged
merged 8 commits into from
May 31, 2024
83 changes: 53 additions & 30 deletions README.md
Original file line number Diff line number Diff line change
@@ -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
4 changes: 2 additions & 2 deletions fluent-bundle/Cargo.toml
Original file line number Diff line number Diff line change
@@ -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
Expand Down
61 changes: 6 additions & 55 deletions fluent-bundle/README.md
Original file line number Diff line number Diff line change
@@ -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
-----
Expand Down Expand Up @@ -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
------------

Expand Down
4 changes: 2 additions & 2 deletions fluent-cli/Cargo.toml
Original file line number Diff line number Diff line change
@@ -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
Expand Down
4 changes: 2 additions & 2 deletions fluent-fallback/Cargo.toml
Original file line number Diff line number Diff line change
@@ -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
Expand Down
70 changes: 12 additions & 58 deletions fluent-fallback/README.md
Original file line number Diff line number Diff line change
@@ -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;

Expand All @@ -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
------------

Expand Down
3 changes: 2 additions & 1 deletion fluent-pseudo/Cargo.toml
Original file line number Diff line number Diff line change
@@ -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
Expand Down
14 changes: 9 additions & 5 deletions fluent-pseudo/README.md
Original file line number Diff line number Diff line change
@@ -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
-----

Expand Down
3 changes: 2 additions & 1 deletion fluent-resmgr/Cargo.toml
Original file line number Diff line number Diff line change
@@ -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
Expand Down
Loading