Module core

Module core 

Source
Expand description

Core types, errors, and shared functionality.

Structs§

AssetsNotFoundError
Error when the assets directory doesn’t exist.
ConfigNotFoundError
Error when the i18n.toml configuration file is not found.
ConfigParseError
Error when parsing the i18n.toml configuration file.
CrateInfo
Information about a crate that uses es-fluent.
FallbackLanguageNotFoundError
Error when the fallback language directory doesn’t exist.
FormatError
Error when formatting fails for an FTL file.
FormatReport
Report for format command results.
FtlSyntaxError
Error when an FTL file has syntax errors.
GenerateResult
Result of generating FTL for a single crate.
InvalidLanguageError
Error when a language identifier is invalid.
LocaleNotFoundError
Error when a specified locale doesn’t exist.
MissingKeyError
A single missing key diagnostic.
MissingVariableWarning
A single missing variable diagnostic (warning).
SyncMissingKey
Warning when a key needs to be synced to another locale.
SyncReport
Report for sync command results.
ValidationReport
Aggregated validation report containing multiple issues.
WorkspaceInfo
Information about a workspace containing es-fluent crates. Used for the monolithic temp crate approach where one temp crate links all workspace members for efficient inventory collection.

Enums§

CliError
CrateState
The state of a crate in the workspace (used by TUI).
FluentParseMode
The mode to use when parsing Fluent files.
GenerationAction
The action to perform during generation.
ValidationIssue
A validation issue (either error or warning).

Traits§

FluentParseModeExt
Extension trait for FluentParseMode to add CLI-specific functionality.

Functions§

find_key_span
Find the byte offset and length of a key in the FTL source.
find_message_span
Find all lines containing a message definition for a key.
line_col_from_offset
Calculate line and column from byte offset in source text.
span_from_line_col
Calculate SourceSpan from line and column in source text.