From 97aae957236f19db11f83924771fc632fe2f8e5d Mon Sep 17 00:00:00 2001 From: Bruce Mitchener Date: Sun, 3 Sep 2023 08:46:52 +0700 Subject: [PATCH] Fix typos. --- docs/local-testing-firefox.md | 2 +- fluent-bundle/examples/custom_formatter.rs | 2 +- fluent-bundle/examples/simple-app.rs | 2 +- fluent-bundle/src/bundle.rs | 2 +- fluent-fallback/src/lib.rs | 4 ++-- fluent-syntax/src/ast/helper.rs | 2 +- fluent-syntax/src/ast/mod.rs | 2 +- fluent-syntax/src/serializer.rs | 2 +- fluent-syntax/src/unicode.rs | 2 +- intl-memoizer/src/lib.rs | 4 ++-- 10 files changed, 12 insertions(+), 12 deletions(-) diff --git a/docs/local-testing-firefox.md b/docs/local-testing-firefox.md index 24cc9f1a..9030b3f6 100644 --- a/docs/local-testing-firefox.md +++ b/docs/local-testing-firefox.md @@ -39,7 +39,7 @@ Now we need to upgrade all the dependencies to `fluent-rs` in the Firefox codeba - [Search for all references](https://searchfox.org/mozilla-central/search?q=%5E%28fluent%28-%5Cw%2B%29%3F%7Cintl-memoizer%29+%3D+%22.*%22&path=&case=false®exp=true) - Update all the references to our local packages by using `{ path = "..." }` in the `Cargo.toml` file of the impacted packages. -### Exemple +### Example If both `fluent-rs` and `mozilla_unified` directories are on the same root directory, you can update the `fluent-fallback` entry from `fluent-fallback = "0.7.0"` to `fluent-fallback = { path = "../../../../../fluent-rs/fluent-fallback" }` in the `mozilla-unified/intl/l10n/rust/l10nregistry-ffi/Cargo.toml` file. diff --git a/fluent-bundle/examples/custom_formatter.rs b/fluent-bundle/examples/custom_formatter.rs index a634b0cc..b3ef36b1 100644 --- a/fluent-bundle/examples/custom_formatter.rs +++ b/fluent-bundle/examples/custom_formatter.rs @@ -131,7 +131,7 @@ key-var-with-arg = Here is a variable formatted with an argument { NUMBER($num, args.set("num", num); let value = bundle.format_pattern(pattern, Some(&args), &mut errors); - // Notice, that since we specificed minimum and maximum fraction digits options + // Notice, that since we specified minimum and maximum fraction digits options // to be 1 and 8 when construction the argument, and then the minimum fraction // digits option has been overridden in the localization the formatter // will received options: diff --git a/fluent-bundle/examples/simple-app.rs b/fluent-bundle/examples/simple-app.rs index 3a537a52..7ea3917d 100644 --- a/fluent-bundle/examples/simple-app.rs +++ b/fluent-bundle/examples/simple-app.rs @@ -107,7 +107,7 @@ fn main() { // 6. Load the localization resource for path in L10N_RESOURCES { - let mut full_path = env::current_dir().expect("Failed to retireve current dir."); + let mut full_path = env::current_dir().expect("Failed to retrieve current dir."); if full_path.to_string_lossy().ends_with("fluent-rs") { full_path.push("fluent-bundle"); } diff --git a/fluent-bundle/src/bundle.rs b/fluent-bundle/src/bundle.rs index 0b74c22d..d96c4545 100644 --- a/fluent-bundle/src/bundle.rs +++ b/fluent-bundle/src/bundle.rs @@ -336,7 +336,7 @@ impl FluentBundle { /// be called on all textual fragments of the pattern /// during formatting. /// - /// This is currently primarly used for pseudolocalization, + /// This is currently primarily used for pseudolocalization, /// and `fluent-pseudo` crate provides a function /// that can be passed here. pub fn set_transform(&mut self, func: Option Cow>) { diff --git a/fluent-fallback/src/lib.rs b/fluent-fallback/src/lib.rs index 14069069..ba7581eb 100644 --- a/fluent-fallback/src/lib.rs +++ b/fluent-fallback/src/lib.rs @@ -48,7 +48,7 @@ //! assert_eq!(value, Some("Hello World [en]".into())); //! ``` //! -//! The above example is far from the ergonomical API style the Fluent project +//! The above example is far from the ergonomic API style the Fluent project //! is aiming for, but it represents the full scope of functionality intended //! for the model. //! @@ -96,7 +96,7 @@ //! As a long lived structure, the [`Localization`] is intended to handle runtime locale //! management. //! -//! In the example above, [`Vec`](unic_langid::LanguageIdentifier) +//! In the example above, [`Vec`](unic_langid::LanguageIdentifier) //! provides a static list of locales that the [`Localization`] handles, but that's just the //! simplest implementation of the [`env::LocalesProvider`], and one can implement //! a much more sophisticated one that reacts to user or environment driven changes, and diff --git a/fluent-syntax/src/ast/helper.rs b/fluent-syntax/src/ast/helper.rs index 02dcae03..23851301 100644 --- a/fluent-syntax/src/ast/helper.rs +++ b/fluent-syntax/src/ast/helper.rs @@ -3,7 +3,7 @@ use serde::{Deserialize, Serialize}; use super::Comment; // This is a helper struct used to properly deserialize referential -// JSON comments which are single continous String, into a vec of +// JSON comments which are single continuous String, into a vec of // content slices. #[derive(Debug, PartialEq, Eq, Clone)] #[cfg_attr(feature = "serde", derive(Serialize, Deserialize))] diff --git a/fluent-syntax/src/ast/mod.rs b/fluent-syntax/src/ast/mod.rs index 4561e55b..12e6f751 100644 --- a/fluent-syntax/src/ast/mod.rs +++ b/fluent-syntax/src/ast/mod.rs @@ -78,7 +78,7 @@ //! //! ## Errors //! -//! Fluent AST preserves blocks containing invaid syntax as [`Entry::Junk`]. +//! Fluent AST preserves blocks containing invalid syntax as [`Entry::Junk`]. //! //! ## White space //! diff --git a/fluent-syntax/src/serializer.rs b/fluent-syntax/src/serializer.rs index 903ee7a1..70e5a5de 100644 --- a/fluent-syntax/src/serializer.rs +++ b/fluent-syntax/src/serializer.rs @@ -1,7 +1,7 @@ //! Fluent Translation List serialization utilities //! //! This modules provides a way to serialize an abstract syntax tree representing a -//! Fluent Translation List. Use cases include normalization and programmatical +//! Fluent Translation List. Use cases include normalization and programmatic //! manipulation of a Fluent Translation List. //! //! # Example diff --git a/fluent-syntax/src/unicode.rs b/fluent-syntax/src/unicode.rs index ab95a868..5df9221b 100644 --- a/fluent-syntax/src/unicode.rs +++ b/fluent-syntax/src/unicode.rs @@ -7,7 +7,7 @@ //! Literals`](super::ast::InlineExpression::StringLiteral). //! //! Four byte sequences are encoded with `\u` and six byte -//! sqeuences using `\U`. +//! sequences using `\U`. //! ## Example //! //! ``` diff --git a/intl-memoizer/src/lib.rs b/intl-memoizer/src/lib.rs index 685971e1..051d3e57 100644 --- a/intl-memoizer/src/lib.rs +++ b/intl-memoizer/src/lib.rs @@ -1,5 +1,5 @@ //! This crate contains a memoizer for internationalization formatters. Often it is -//! expensive (in terms of performance and memory) to constuct a formatter, but then +//! expensive (in terms of performance and memory) to construct a formatter, but then //! relatively cheap to run the format operation. //! //! The [IntlMemoizer] is the main struct that creates a per-locale [IntlLangMemoizer]. @@ -289,7 +289,7 @@ impl IntlLangMemoizer { /// let construct_args = (String::from("prefix:"),); /// let message = "The format operation will run"; /// -/// // Use the `ExampleFormater` from the `IntlLangMemoizer` example. It returns a +/// // Use the `ExampleFormatter` from the `IntlLangMemoizer` example. It returns a /// // string that demonstrates the configuration of the formatter. This step will /// // construct a new formatter if needed, and run the format operation. /// //