Skip to content

Commit

Permalink
Fix typos in doc and comments (#328)
Browse files Browse the repository at this point in the history
  • Loading branch information
waywardmonkeys authored Feb 3, 2024
1 parent a2cef6b commit 18495ba
Show file tree
Hide file tree
Showing 10 changed files with 12 additions and 12 deletions.
2 changes: 1 addition & 1 deletion docs/local-testing-firefox.md
Original file line number Diff line number Diff line change
Expand Up @@ -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&regexp=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.

Expand Down
2 changes: 1 addition & 1 deletion fluent-bundle/examples/custom_formatter.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
2 changes: 1 addition & 1 deletion fluent-bundle/examples/simple-app.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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");
}
Expand Down
2 changes: 1 addition & 1 deletion fluent-bundle/src/bundle.rs
Original file line number Diff line number Diff line change
Expand Up @@ -336,7 +336,7 @@ impl<R, M> FluentBundle<R, M> {
/// 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<fn(&str) -> Cow<str>>) {
Expand Down
4 changes: 2 additions & 2 deletions fluent-fallback/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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.
//!
Expand Down Expand Up @@ -96,7 +96,7 @@
//! As a long lived structure, the [`Localization`] is intended to handle runtime locale
//! management.
//!
//! In the example above, [`Vec<LagnuageIdentifier>`](unic_langid::LanguageIdentifier)
//! In the example above, [`Vec<LanguageIdentifier>`](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
Expand Down
2 changes: 1 addition & 1 deletion fluent-syntax/src/ast/helper.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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))]
Expand Down
2 changes: 1 addition & 1 deletion fluent-syntax/src/ast/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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
//!
Expand Down
2 changes: 1 addition & 1 deletion fluent-syntax/src/serializer.rs
Original file line number Diff line number Diff line change
@@ -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
Expand Down
2 changes: 1 addition & 1 deletion fluent-syntax/src/unicode.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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
//!
//! ```
Expand Down
4 changes: 2 additions & 2 deletions intl-memoizer/src/lib.rs
Original file line number Diff line number Diff line change
@@ -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].
Expand Down Expand Up @@ -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.
/// //
Expand Down

0 comments on commit 18495ba

Please sign in to comment.