summaryrefslogtreecommitdiffstats
path: root/resize/utils.ml
diff options
context:
space:
mode:
authorRichard W.M. Jones <rjones@redhat.com>2012-04-30 11:33:19 +0100
committerRichard W.M. Jones <rjones@redhat.com>2012-05-01 09:39:35 +0100
commit027fefd517b8a93c54611a6cc4c51a54fea1b9fe (patch)
tree143c33d12478dd2f66a60d3d28c3529806b5bec7 /resize/utils.ml
parent75514ab57a06e534f26698fe1725ca29b966c3ad (diff)
downloadlibguestfs-027fefd517b8a93c54611a6cc4c51a54fea1b9fe.tar.gz
libguestfs-027fefd517b8a93c54611a6cc4c51a54fea1b9fe.tar.xz
libguestfs-027fefd517b8a93c54611a6cc4c51a54fea1b9fe.zip
Add gettext support for OCaml tools (virt-resize, virt-sparsify, virt-sysprep).
Note that this support is optional: To enable it, install the ocaml-gettext library from http://forge.ocamlcore.org/projects/ocaml-gettext . If this library is not installed, then configure detects this and inserts dummy gettext functions that do nothing.
Diffstat (limited to 'resize/utils.ml')
-rw-r--r--resize/utils.ml6
1 files changed, 4 insertions, 2 deletions
diff --git a/resize/utils.ml b/resize/utils.ml
index 3c253da2..d99f489b 100644
--- a/resize/utils.ml
+++ b/resize/utils.ml
@@ -18,6 +18,8 @@
open Printf
+open Resize_gettext.Gettext
+
module G = Guestfs
let ( +^ ) = Int64.add
@@ -72,11 +74,11 @@ let wrap ?(chan = stdout) ?(hanging = 0) str =
let error fs =
let display str =
- wrap ~chan:stderr ("virt-resize: error: " ^ str);
+ wrap ~chan:stderr (s_"virt-resize: error: " ^ str);
prerr_newline ();
prerr_newline ();
wrap ~chan:stderr
- "If reporting bugs, run virt-resize with the '-d' option and include the complete output.";
+ (s_"If reporting bugs, run virt-resize with the '-d' option and include the complete output.");
prerr_newline ();
exit 1
in