i18n_parse 0.1.1

extract_i18n
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
use aok::{Result, OK};
use static_init::constructor;

#[constructor(0)]
extern "C" fn init() {
  loginit::init()
}

#[test]
fn test() -> Result<()> {
  let s = "xxxx${ I18N.doc }xx${I18N.xxx}x";
  let r = i18n_parse::extract(s);
  let to = ["Document", "Example"];

  let r = i18n_parse::replace(s, &r.range[..], &to);
  dbg!(r);
  OK
}