diff options
author | Richard W.M. Jones <rjones@redhat.com> | 2012-04-30 11:33:19 +0100 |
---|---|---|
committer | Richard W.M. Jones <rjones@redhat.com> | 2012-05-01 09:39:35 +0100 |
commit | 027fefd517b8a93c54611a6cc4c51a54fea1b9fe (patch) | |
tree | 143c33d12478dd2f66a60d3d28c3529806b5bec7 /po | |
parent | 75514ab57a06e534f26698fe1725ca29b966c3ad (diff) | |
download | libguestfs-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 'po')
-rw-r--r-- | po/Makefile.am | 23 | ||||
-rw-r--r-- | po/POTFILES-ml | 36 |
2 files changed, 53 insertions, 6 deletions
diff --git a/po/Makefile.am b/po/Makefile.am index de455a3d..90b23c1f 100644 --- a/po/Makefile.am +++ b/po/Makefile.am @@ -25,12 +25,13 @@ MSGID_BUGS_ADDRESS = https://bugzilla.redhat.com/enter_bug.cgi?component=libgues # Don't use LINGUAS (uppercase) as Gentoo defines it (RHBZ#804464). linguas := en_GB es gu hi kn ml mr nl or pa pl ta te uk -POTFILES := $(shell $(SED) 's,^,$(top_srcdir)/,' POTFILES) -POFILES := $(linguas:%=%.po) -GMOFILES := $(linguas:%=%.gmo) +POTFILES := $(shell $(SED) 's,^,$(top_srcdir)/,' POTFILES) +POTFILES_ML := $(shell $(SED) 's,^,$(top_srcdir)/,' POTFILES-ml) +POFILES := $(linguas:%=%.po) +GMOFILES := $(linguas:%=%.gmo) EXTRA_DIST = \ - POTFILES \ + POTFILES POTFILES-ml \ $(DOMAIN).pot \ $(POFILES) \ $(GMOFILES) @@ -48,8 +49,8 @@ update-po: update-gmo: Makefile $(GMOFILES) -$(DOMAIN).pot: Makefile $(POTFILES) - rm -f $@ $@-t +$(DOMAIN).pot: Makefile $(POTFILES) $(POTFILES-ml) + rm -f $@-t $@-ml $(XGETTEXT) \ -o $@-t \ --default-domain=$(DOMAIN) \ @@ -66,6 +67,16 @@ $(DOMAIN).pot: Makefile $(POTFILES) --msgid-bugs-address="$(MSGID_BUGS_ADDRESS)" \ --directory=$(top_srcdir) \ --files-from=$(abs_srcdir)/POTFILES +if HAVE_OCAML_GETTEXT + cd $(top_srcdir) && \ + $(OCAML_GETTEXT) --action extract --extract-pot po/$@-ml \ + $$(cat $(abs_srcdir)/POTFILES-ml) +# Don't trust msgcat since it will definitely screw up. Instead, chop +# the head from the second file and append it to the first. + echo >> $@-t + awk '/^#:/{i++}i{print}' < $@-ml >> $@-t + rm $@-ml +endif mv $@-t $@ %.po: $(DOMAIN).pot diff --git a/po/POTFILES-ml b/po/POTFILES-ml new file mode 100644 index 00000000..b08aff99 --- /dev/null +++ b/po/POTFILES-ml @@ -0,0 +1,36 @@ +resize/progress.ml +resize/resize.ml +resize/resize_gettext.ml +resize/utils.ml +resize/utils_tests.ml +sparsify/progress.ml +sparsify/sparsify.ml +sparsify/sparsify_gettext.ml +sparsify/utils.ml +sysprep/main.ml +sysprep/sysprep_gettext.ml +sysprep/sysprep_operation.ml +sysprep/sysprep_operation_bash_history.ml +sysprep/sysprep_operation_cron_spool.ml +sysprep/sysprep_operation_dhcp_client_state.ml +sysprep/sysprep_operation_dhcp_server_state.ml +sysprep/sysprep_operation_dovecot_data.ml +sysprep/sysprep_operation_flag_reconfiguration.ml +sysprep/sysprep_operation_hostname.ml +sysprep/sysprep_operation_logfiles.ml +sysprep/sysprep_operation_mail_spool.ml +sysprep/sysprep_operation_net_hwaddr.ml +sysprep/sysprep_operation_package_manager_cache.ml +sysprep/sysprep_operation_random_seed.ml +sysprep/sysprep_operation_rhn_systemid.ml +sysprep/sysprep_operation_samba_db_log.ml +sysprep/sysprep_operation_script.ml +sysprep/sysprep_operation_smolt_uuid.ml +sysprep/sysprep_operation_ssh_hostkeys.ml +sysprep/sysprep_operation_ssh_userdir.ml +sysprep/sysprep_operation_sssd_db_log.ml +sysprep/sysprep_operation_udev_persistent_net.ml +sysprep/sysprep_operation_user_account.ml +sysprep/sysprep_operation_utmp.ml +sysprep/sysprep_operation_yum_uuid.ml +sysprep/utils.ml |