Skip to content

Commit 2e7c25e

Browse files
authored
Merge pull request #359 from alerque/crate-docs
2 parents 0f7d09b + f0ccbbf commit 2e7c25e

File tree

18 files changed

+139
-340
lines changed

18 files changed

+139
-340
lines changed

README.md

+53-30
Original file line numberDiff line numberDiff line change
@@ -1,54 +1,77 @@
1-
# 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)
1+
# Project Fluent
22

3-
`fluent-rs` is a collection of Rust crates implementing [Project Fluent](https://projectfluent.org).
3+
[![Build](https://github.com/projectfluent/fluent-rs/actions/workflows/test.yaml/badge.svg)](https://github.com/projectfluent/fluent-rs/actions/workflows/test.yaml)
4+
[![Coverage Status](https://coveralls.io/repos/github/projectfluent/fluent-rs/badge.svg?branch=main)](https://coveralls.io/github/projectfluent/fluent-rs?branch=main)
5+
6+
The `fluent-rs` workspace is a collection of Rust crates implementing [Project Fluent][],
7+
a localization system designed to unleash the entire expressive power of natural language translations.
8+
9+
Project Fluent keeps simple things simple and makes complex things possible.
10+
The syntax used for describing translations is easy to read and understand.
11+
At the same time it allows, when necessary, to represent complex concepts from natural languages like gender, plurals, conjugations, and others.
412

513
## Packages
614

7-
The crates perform the following functions:
15+
This workspace contains the following crates:
816

9-
### fluent [![crates.io](https://img.shields.io/crates/v/fluent.svg)](https://crates.io/crates/fluent)
17+
### fluent
1018

11-
Umbrella crate combining crates that are ready to be used in production.
19+
[![crates.io](https://img.shields.io/crates/v/fluent.svg)](https://crates.io/crates/fluent)
20+
[![docs.rs](https://img.shields.io/docsrs/fluent)](https://docs.rs/fluent)
1221

13-
### fluent-syntax [![crates.io](https://img.shields.io/crates/v/fluent_syntax.svg)](https://crates.io/crates/fluent_syntax)
22+
An umbrella crate exposing the combined features of fluent-rs crates with additional convenience macros.
1423

15-
Low level Fluent Syntax AST and parser API.
24+
### fluent-bundle
1625

17-
### fluent-bundle [![crates.io](https://img.shields.io/crates/v/fluent_bundle.svg)](https://crates.io/crates/fluent_bundle)
26+
[![crates.io](https://img.shields.io/crates/v/fluent_bundle.svg)](https://crates.io/crates/fluent_bundle)
27+
[![docs.rs](https://img.shields.io/docsrs/fluent-bundle)](https://docs.rs/fluent-bundle)
1828

19-
Implementation of the low-level Fluent Localization System providing localization capabilities for any Rust project.
29+
A low-level implementation of a collection of localization messages for a single locale.
2030

21-
### fluent-fallback [![crates.io](https://img.shields.io/crates/v/fluent_fallback.svg)](https://crates.io/crates/fluent_fallback)
31+
### fluent-fallback
2232

23-
Implementation of the high-level Fluent Localization System providing localization capabilities for any Rust project.
33+
[![crates.io](https://img.shields.io/crates/v/fluent_fallback.svg)](https://crates.io/crates/fluent_fallback)
34+
[![docs.rs](https://img.shields.io/docsrs/fluent-fallback)](https://docs.rs/fluent-fallback)
2435

25-
### fluent-resmgr [![crates.io](https://img.shields.io/crates/v/fluent_resmgr.svg)](https://crates.io/crates/fluent_resmgr)
36+
A high-level abstraction model for managing locale bundles and runtime localization lifecycle.
2637

27-
Resource Manager for localization resources.
38+
### fluent-resmgr
2839

29-
### fluent-cli
40+
[![crates.io](https://img.shields.io/crates/v/fluent_resmgr.svg)](https://crates.io/crates/fluent_resmgr)
41+
[![docs.rs](https://img.shields.io/docsrs/fluent-resmgr)](https://docs.rs/fluent-resmgr)
42+
43+
A standalone solution for managing resource files and returning locale bundles.
44+
45+
### fluent-syntax
46+
47+
[![crates.io](https://img.shields.io/crates/v/fluent_syntax.svg)](https://crates.io/crates/fluent_syntax)
48+
[![docs.rs](https://img.shields.io/docsrs/fluent-syntax)](https://docs.rs/fluent-syntax)
3049

31-
Collection of command line tools for Fluent.
50+
A low-level parser, AST, and serializer API for the Fluent syntax.
3251

33-
## Running the project
52+
### fluent-pseudo
3453

35-
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).
54+
[![crates.io](https://img.shields.io/crates/v/fluent_pseudo.svg)](https://crates.io/crates/fluent_pseudo)
55+
[![docs.rs](https://img.shields.io/docsrs/fluent-pseudo)](https://docs.rs/fluent-pseudo)
3656

37-
### Tests
57+
A pseudolocalization and transformation API.
3858

39-
To run all of the tests for the repo run:
59+
### fluent-testing
4060

41-
```sh
42-
cargo make test
43-
```
61+
[![crates.io](https://img.shields.io/crates/v/fluent_testing.svg)](https://crates.io/crates/fluent_testing)
62+
[![docs.rs](https://img.shields.io/docsrs/fluent-testing)](https://docs.rs/fluent-testing)
4463

45-
For local code coverage reports run:
64+
A collection of mock scenarios for testing fluent-rs components.
65+
66+
### intl-memoizer
67+
68+
[![crates.io](https://img.shields.io/crates/v/fluent_testing.svg)](https://crates.io/crates/fluent_testing)
69+
[![docs.rs](https://img.shields.io/docsrs/intl-memoizer)](https://docs.rs/intl-memoizer)
70+
71+
A memoizer specifically tailored for storing lazy-initialized intl formatters.
72+
73+
### fluent-cli
4674

47-
```sh
48-
# Install the tools first if you haven't done so. The llvm tools must be available
49-
# on the path for this to work correctly.
50-
cargo make install-tools
75+
A collection of developer-oriented command line tools for Fluent.
5176

52-
# Then coverage can be run like so:
53-
cargo make coverage
54-
```
77+
[Project Fluent]: https://projectfluent.org

fluent-bundle/Cargo.toml

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
[package]
22
name = "fluent-bundle"
33
description = """
4-
A localization system designed to unleash the entire expressive power of
5-
natural language translations.
4+
A low-level implementation of a collection of localization messages for a single locale for Project Fluent,
5+
a localization system designed to unleash the entire expressive power of natural language translations.
66
"""
77
version = "0.15.3"
88
edition.workspace = true

fluent-bundle/README.md

+6-55
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,16 @@
1-
# Fluent
2-
3-
`fluent-rs` is a Rust implementation of [Project Fluent][], a localization
4-
framework designed to unleash the entire expressive power of natural language
5-
translations.
1+
# Fluent Bundle
62

73
[![crates.io](https://img.shields.io/crates/v/fluent-bundle.svg)](https://crates.io/crates/fluent-bundle)
4+
[![docs.rs](https://img.shields.io/docsrs/fluent-bundle)](https://docs.rs/fluent-bundle)
85
[![Build](https://github.com/projectfluent/fluent-rs/actions/workflows/test.yaml/badge.svg)](https://github.com/projectfluent/fluent-rs/actions/workflows/test.yaml)
96
[![Coverage Status](https://coveralls.io/repos/github/projectfluent/fluent-rs/badge.svg?branch=main)](https://coveralls.io/github/projectfluent/fluent-rs?branch=main)
107

11-
Project Fluent keeps simple things simple and makes complex things possible.
12-
The syntax used for describing translations is easy to read and understand. At
13-
the same time it allows, when necessary, to represent complex concepts from
14-
natural languages like gender, plurals, conjugations, and others.
8+
The `fluent-rs` workspace is a collection of Rust crates implementing [Project Fluent][],
9+
a localization system designed to unleash the entire expressive power of natural language translations.
1510

16-
[Documentation][]
11+
This crate is a low-level implementation of a collection of localization messages for a single locale.
1712

18-
[Project Fluent]: http://projectfluent.org
19-
[Documentation]: https://docs.rs/fluent/
13+
[Project Fluent]: https://projectfluent.org
2014

2115
Usage
2216
-----
@@ -47,49 +41,6 @@ fn main() {
4741
}
4842
```
4943

50-
51-
Status
52-
------
53-
54-
The implementation is in its early stages and supports only some of the Project
55-
Fluent's spec. Consult the [list of milestones][] for more information about
56-
release planning and scope.
57-
58-
[list of milestones]: https://github.com/projectfluent/fluent-rs/milestones
59-
60-
61-
Local Development
62-
-----------------
63-
64-
cargo build
65-
cargo test
66-
cargo bench
67-
cargo run --example simple-app
68-
69-
When submitting a PR please use [`cargo fmt`][] (nightly).
70-
71-
[`cargo fmt`]: https://github.com/rust-lang-nursery/rustfmt
72-
73-
74-
Learn the FTL syntax
75-
--------------------
76-
77-
FTL is a localization file format used for describing translation resources.
78-
FTL stands for _Fluent Translation List_.
79-
80-
FTL is designed to be simple to read, but at the same time allows to represent
81-
complex concepts from natural languages like gender, plurals, conjugations, and
82-
others.
83-
84-
hello-user = Hello, { $username }!
85-
86-
[Read the Fluent Syntax Guide][] in order to learn more about the syntax. If
87-
you're a tool author you may be interested in the formal [EBNF grammar][].
88-
89-
[Read the Fluent Syntax Guide]: http://projectfluent.org/fluent/guide/
90-
[EBNF grammar]: https://github.com/projectfluent/fluent/tree/master/spec
91-
92-
9344
Get Involved
9445
------------
9546

fluent-cli/Cargo.toml

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
[package]
22
name = "fluent-cli"
33
description = """
4-
A collection of command line interface programs
5-
for Fluent Localization System.
4+
A collection of developer-oriented command line interface tools for Project Fluent,
5+
a localization system designed to unleash the entire expressive power of natural language translations.
66
"""
77
version = "0.0.1"
88
edition.workspace = true

fluent-fallback/Cargo.toml

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
[package]
22
name = "fluent-fallback"
33
description = """
4-
High-level abstraction model for managing localization resources
5-
and runtime localization lifecycle.
4+
A high-level implementation of a collection of locale bundles including fallback between locales for Project Fluent,
5+
a localization system designed to unleash the entire expressive power of natural language translations.
66
"""
77
version = "0.7.1"
88
edition.workspace = true

fluent-fallback/README.md

+12-58
Original file line numberDiff line numberDiff line change
@@ -1,30 +1,26 @@
1-
# Fluent
2-
3-
`fluent-fallback` is a Rust implementation of the [Project Fluent][] higher level API.
4-
5-
The `Localization` struct encapsulates a persistent localization context providing
6-
language fallbacking. The instance remains available throughout the whole life cycle of
7-
the corresponding UI, reacting to events such as locale changes, resource updates etc.
8-
9-
The API can be used directly, or can serve as an example of state manager for `fluent-bundle` and `fluent-resmgr`.
1+
# Fluent Fallback
102

113
[![crates.io](https://img.shields.io/crates/v/fluent-fallback.svg)](https://crates.io/crates/fluent-fallback)
4+
[![docs.rs](https://img.shields.io/docsrs/fluent-fallback)](https://docs.rs/fluent-fallback)
125
[![Build](https://github.com/projectfluent/fluent-rs/actions/workflows/test.yaml/badge.svg)](https://github.com/projectfluent/fluent-rs/actions/workflows/test.yaml)
136
[![Coverage Status](https://coveralls.io/repos/github/projectfluent/fluent-rs/badge.svg?branch=main)](https://coveralls.io/github/projectfluent/fluent-rs?branch=main)
147

15-
Project Fluent keeps simple things simple and makes complex things possible.
16-
The syntax used for describing translations is easy to read and understand. At
17-
the same time it allows, when necessary, to represent complex concepts from
18-
natural languages like gender, plurals, conjugations, and others.
8+
The `fluent-rs` workspace is a collection of Rust crates implementing [Project Fluent][],
9+
a localization system designed to unleash the entire expressive power of natural language translations.
1910

20-
[Documentation][]
11+
This crate is a high-level implementation of a collection of locale bundles including fallback between locales.
2112

22-
[Project Fluent]: http://projectfluent.org
23-
[Documentation]: https://docs.rs/fluent/
13+
[Project Fluent]: https://projectfluent.org
2414

2515
Usage
2616
-----
2717

18+
The `Localization` struct encapsulates a persistent localization context providing language fallbacking.
19+
The instance remains available throughout the whole life cycle of the corresponding UI,
20+
reacting to events such as locale changes, resource updates etc.
21+
22+
The API can be used directly, or can serve as an example of state manager for `fluent-bundle` and `fluent-resmgr`.
23+
2824
```rust
2925
use fluent_fallback::Localization;
3026

@@ -39,48 +35,6 @@ fn main() {
3935
}
4036
```
4137

42-
43-
Status
44-
------
45-
46-
The implementation is in its early stages and supports only some of the Project
47-
Fluent's spec. Consult the [list of milestones][] for more information about
48-
release planning and scope.
49-
50-
[list of milestones]: https://github.com/projectfluent/fluent-rs/milestones
51-
52-
53-
Local Development
54-
-----------------
55-
56-
cargo build
57-
cargo test
58-
cargo run --example simple-fallback
59-
60-
When submitting a PR please use [`cargo fmt`][] (nightly).
61-
62-
[`cargo fmt`]: https://github.com/rust-lang-nursery/rustfmt
63-
64-
65-
Learn the FTL syntax
66-
--------------------
67-
68-
FTL is a localization file format used for describing translation resources.
69-
FTL stands for _Fluent Translation List_.
70-
71-
FTL is designed to be simple to read, but at the same time allows to represent
72-
complex concepts from natural languages like gender, plurals, conjugations, and
73-
others.
74-
75-
hello-user = Hello, { $username }!
76-
77-
[Read the Fluent Syntax Guide][] in order to learn more about the syntax. If
78-
you're a tool author you may be interested in the formal [EBNF grammar][].
79-
80-
[Read the Fluent Syntax Guide]: http://projectfluent.org/fluent/guide/
81-
[EBNF grammar]: https://github.com/projectfluent/fluent/tree/master/spec
82-
83-
8438
Get Involved
8539
------------
8640

fluent-pseudo/Cargo.toml

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
[package]
22
name = "fluent-pseudo"
33
description = """
4-
Pseudolocalization transformation API for use with Project Fluent API.
4+
A pseudolocalization and transformation API for Project Fluent,
5+
a localization system designed to unleash the entire expressive power of natural language translations.
56
"""
67
version = "0.3.2"
78
edition.workspace = true

fluent-pseudo/README.md

+9-5
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,17 @@
1-
# Fluent
2-
3-
`fluent-pseudo` is a Rust implementation of the pseudolocalization API for [Project Fluent](https://projectfluent.org/), a localization
4-
framework designed to unleash the entire expressive power of natural language
5-
translations.
1+
# Fluent Pseudo
62

73
[![crates.io](https://img.shields.io/crates/v/fluent-pseudo.svg)](https://crates.io/crates/fluent-pseudo)
4+
[![docs.rs](https://img.shields.io/docsrs/fluent-pseudo)](https://docs.rs/fluent-pseudo)
85
[![Build](https://github.com/projectfluent/fluent-rs/actions/workflows/test.yaml/badge.svg)](https://github.com/projectfluent/fluent-rs/actions/workflows/test.yaml)
96
[![Coverage Status](https://coveralls.io/repos/github/projectfluent/fluent-rs/badge.svg?branch=main)](https://coveralls.io/github/projectfluent/fluent-rs?branch=main)
107

8+
The `fluent-rs` workspace is a collection of Rust crates implementing [Project Fluent][],
9+
a localization system designed to unleash the entire expressive power of natural language translations.
10+
11+
This crate provides a pseudolocalization and transformation API.
12+
13+
[Project Fluent]: https://projectfluent.org
14+
1115
Usage
1216
-----
1317

fluent-resmgr/Cargo.toml

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
[package]
22
name = "fluent-resmgr"
33
description = """
4-
Resource manager for Fluent localization resources.
4+
A standalone solution for managing resource files and returning locale bundles for Project Fluent,
5+
a localization system designed to unleash the entire expressive power of natural language translations.
56
"""
67
version = "0.0.7"
78
edition.workspace = true

0 commit comments

Comments
 (0)