1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
//! Polyglot, type-safe internationalization.
//!
//! This crate parses globetrotter configuration files, reads translation
//! sources, validates them, and generates JSON output. The `typescript` and
//! `rust` features add typed bindings; `golang` and `python` currently expose
//! configuration targets without emitters.
//!
//! Feature flags select language-specific generators: `typescript`, `rust`,
//! `golang`, and `python`. The `llm-judge` feature adds optional semantic-drift
//! review during linting.
//! The optional `tree-sitter` feature adds syntax-aware source usage scanning.
//! Without it, usage scanning uses less precise text matching.
//!
//! The same builder API used by the CLI is available for build scripts and
//! other programmatic integrations:
//!
//! ```no_run
//! use globetrotter::{
//! Executor, Language,
//! config::v1::{Config, ConfigFile, Input, JsonOutputConfig, Outputs},
//! diagnostics::Printer,
//! };
//!
//! # async fn generate() -> Result<(), globetrotter::Error> {
//! let config = Config::new("app")
//! .with_languages([Language::En, Language::De])
//! .with_input(Input::new("translations.toml"))
//! .with_outputs(
//! Outputs::new().with_json([JsonOutputConfig::new(
//! "generated/translations_{{language}}.json",
//! )]),
//! );
//! let configs: Vec<ConfigFile<usize>> = vec![ConfigFile {
//! file_id: None,
//! config_dir: None,
//! config,
//! }];
//! let executor = Executor::new(&configs, Printer::default());
//! executor.execute(configs).await?;
//! # Ok(())
//! # }
//! ```
/// Configuration file discovery, parsing, and versioned schema types.
/// Detection of translation keys unused in a source tree.
/// Diagnostic rendering and source-file management.
/// Error types surfaced while loading and generating outputs.
/// Orchestration of translation loading, validation, and output generation.
/// Gzip size estimation for generated JSON outputs.
/// JSON translation output generation.
/// LLM-judged translation-consistency review during linting.
/// Progress logging and output path formatting.
/// Code generation targets and their per-target output errors.
pub use globetrotter_typescript as typescript;
pub use globetrotter_rust as rust;
pub use globetrotter_golang as golang;
pub use globetrotter_python as python;
pub use Error;
pub use Executor;
pub use globetrotter_model as model;
pub use ;