patois_build/lib.rs
1//! Gettext tooling for apps that use [patois](https://docs.rs/patois). Call it from a build script
2//! or an `xtask`.
3//!
4//! - [`gen_pot`] and [`gen_pot_from_dirs`] extract strings from Rust source into a `.pot` template.
5//! - [`extend_pot_from_source_dirs`] and [`prune_pot_from_source_dirs`] keep the strings of Swift
6//! and Kotlin source in the same template.
7//! - [`compile_translations`] compiles `.po` catalogs to the `.mo` files that an app embeds.
8//! - [`gen_ios_strings`] and [`gen_android_strings`] generate translation assets for mobile apps.
9//! - [`check`] and [`lint`] find translation mistakes in catalogs and source code.
10//! - [`credits`] reads the names of translators from the catalogs.
11//! - [`po`] edits a `.po` file and leaves the lines it doesn't change as they were.
12
13pub mod check;
14pub mod credits;
15mod entries;
16mod extract;
17pub mod lint;
18mod mo;
19mod mobile;
20pub mod po;
21mod pot;
22mod sanitize_rust;
23
24pub use extract::{extend_pot_from_source_dirs, prune_pot_from_source_dirs};
25pub use mo::compile_translations;
26pub use mobile::{gen_android_strings, gen_ios_strings};
27pub use pot::{gen_pot, gen_pot_from_dirs};