rimloc-export-po

Crates.iorimloc-export-po
lib.rsrimloc-export-po
version0.1.0
created_at2025-09-25 17:58:16.364715+00
updated_at2025-09-25 17:58:16.364715+00
descriptionPO exporter for RimWorld mods (RimLoc toolkit)
homepage
repositoryhttps://github.com/0-danielviktorovich-0/RimLoc
max_upload_size
id1854924
size25,553
Daniel Viktorovich (0-danielviktorovich-0)

documentation

https://0-danielviktorovich-0.github.io/RimLoc/

README

rimloc-export-po

PO exporter used by RimLoc to produce hand-off files for translators.

Usage

[dependencies]
rimloc-export-po = "0.1.0"
rimloc-core = "0.1.0"

Write a .po file with header, references and msgctxt:

use rimloc_core::TransUnit;
use rimloc_export_po::write_po;
use std::path::Path;

fn main() -> color_eyre::Result<()> {
    let units = vec![TransUnit {
        key: "Greeting".into(),
        source: Some("Hello".into()),
        path: "/Mods/My/Languages/English/Keyed/A.xml".into(),
        line: Some(3),
    }];
    write_po(Path::new("./out.po"), &units, Some("ru"))?;
    Ok(())
}

Links

Commit count: 167

cargo fmt