Skip to content

Commit df81ab8

Browse files
docs: An attempt to fix broken links. (#258)
There are many links that I could not fix in the luent crate, but they are not a problem in the luent-bundle crate. I do not understand why these problems arise. Relevant readings on Rust docs: - Last addition to rustdoc capacities: https://rust-lang.github.io/rfcs/1946-intra-rustdoc-links.html - Frontend/backend crates pattern: https://users.rust-lang.org/t/cross-crate-documentation-links-in-a-workspace/67588 - Help linking to an external crate (for which we want to link only on the documentation level): rust-lang/api-guidelines#186 - Open issue on how to do that: rust-lang/rust#74481
1 parent 3e5c380 commit df81ab8

File tree

5 files changed

+9
-10
lines changed

5 files changed

+9
-10
lines changed

README.md

+1
Original file line numberDiff line numberDiff line change
@@ -27,3 +27,4 @@ Resource Manager for localization resources.
2727
## fluent-cli
2828

2929
Collection of command line tools for Fluent.
30+

fluent-bundle/src/bundle.rs

+3-1
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,9 @@ use crate::types::FluentValue;
130130
/// As you may have noticed, [`fluent_bundle::FluentBundle`](crate::FluentBundle) is a specialization of [`fluent_bundle::bundle::FluentBundle`](crate::bundle::FluentBundle)
131131
/// which works with an [`IntlLangMemoizer`] over [`RefCell`](std::cell::RefCell).
132132
/// In scenarios where the memoizer must work concurrently, there's an implementation of
133-
/// [`IntlLangMemoizer`](intl_memoizer::concurrent::IntlLangMemoizer) that uses [`Mutex`](std::sync::Mutex) and there's [`FluentBundle::new_concurrent`] which works with that.
133+
/// [`IntlLangMemoizer`][concurrent::IntlLangMemoizer] that uses [`Mutex`](std::sync::Mutex) and there's [`FluentBundle::new_concurrent`] which works with that.
134+
///
135+
/// [concurrent::IntlLangMemoizer]: https://docs.rs/intl-memoizer/latest/intl_memoizer/concurrent/struct.IntlLangMemoizer.html
134136
pub struct FluentBundle<R, M> {
135137
pub locales: Vec<LanguageIdentifier>,
136138
pub(crate) resources: Vec<R>,

fluent-bundle/src/lib.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
//! `fluent-bundle` is a mid-level component of the [Fluent Localization
44
//! System](https://www.projectfluent.org).
55
//!
6-
//! The crate builds on top of the low level [`fluent-syntax`](../fluent-syntax) package, and provides
6+
//! The crate builds on top of the low level [`fluent-syntax`](https://crates.io/crates/fluent-syntax) package, and provides
77
//! foundational types and structures required for executing localization at runtime.
88
//!
99
//! There are four core concepts to understand Fluent runtime:

fluent-bundle/src/types/mod.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -61,10 +61,10 @@ impl<T: Any + PartialEq> AnyEq for T {
6161

6262
/// The `FluentValue` enum represents values which can be formatted to a String.
6363
///
64-
/// Those values are either passed as arguments to [`FluentBundle::format_pattern`][] or
64+
/// Those values are either passed as arguments to [`FluentBundle::format_pattern`] or
6565
/// produced by functions, or generated in the process of pattern resolution.
6666
///
67-
/// [`FluentBundle::format_pattern`]: ../bundle/struct.FluentBundle.html#method.format_pattern
67+
/// [`FluentBundle::format_pattern`]: crate::bundle::FluentBundle::format_pattern
6868
#[derive(Debug)]
6969
pub enum FluentValue<'source> {
7070
String(Cow<'source, str>),

fluent/src/lib.rs

+2-6
Original file line numberDiff line numberDiff line change
@@ -70,14 +70,10 @@
7070
//! optimize results.
7171
//!
7272
//! At the moment it is expected that users will use
73-
//! the `fluent-bundle` crate directly, while the ecosystem
73+
//! the [`fluent-bundle`](fluent_bundle) crate directly, while the ecosystem
7474
//! matures and higher level APIs are being developed.
7575
//!
76-
//! [`FluentBundle`]: ./struct.FluentBundle.html
77-
//! [`FluentResource`]: ./struct.FluentResource.html
78-
//! [`FluentMessage`]: ./struct.FluentMessage.html
79-
//! [`FluentArgs`]: ./type.FluentArgs.html
80-
//! [`FluentValue`]: ./struct.FluentValue.html
76+
//! [`FluentBundle`]: bundle::FluentBundle
8177
8278
pub use fluent_bundle::*;
8379

0 commit comments

Comments
 (0)