let compile filename_po filename_mo =
let po =
po_of_filename filename_po
in
let output_one_map filename map =
let lst =
MapString.fold ( fun _ (_,e) lst ->
(GettextPo.translation_of_po_translation e) :: lst
) map []
in
let chn =
open_out_bin filename
in
GettextMo.output_mo chn lst;
close_out chn
in
let make_filename domain filename_mo =
let dirname =
dirname filename_mo
in
let basename =
basename filename_mo
in
make_filename [ dirname ; domain^"."^basename ]
in
output_one_map filename_mo po.no_domain;
MapTextdomain.iter (
fun domain map ->
output_one_map (make_filename domain filename_mo) map
) po.domain