Matthew Booth
2009-Sep-02 12:19 UTC
[Libguestfs] [PATCH] internationalisation: Replace autopoint infrastructure with libintl-perl
I noticed that virt-v2v, which is written exclusively in perl, failed to generate virt-v2v.pot. After much head scratching I also noticed that libguestfs.pot didn't include any messages from perl sources. Some reading of libintl-perl shows that a somewhat more complicated xgettext command line is required, as it doesn't understand Locale::TextDomain syntax by default. After a little more head scratching, I decided to replace the autopoint generated infrastructure with the reference infrastructure from libintl-perl because: 1. It works 2. It's a whole lot more transparent libguestfs still needs some attention in this area. This change may not be appropriate for libguestfs because it is not exclusively written in perl.
Matthew Booth
2009-Sep-02 12:19 UTC
[Libguestfs] [PATCH] internationalisation: Replace autopoint infrastructure with libintl-perl
The autopoint generated make infrastructure doesn't handle perl. It's also unfathomably complicated. This patch replaces it with the much simpler infrastructure from the libintl-perl sample application. This also fixes the generation of virt-v2v.pot. --- .gitignore | 17 ---- README-NLS | 200 ++++++++++++++++++++++++++++++++++++++++ autogen.sh | 16 --- configure.ac | 7 +- po/Makefile | 97 ++++++++++++++++++++ po/PACKAGE | 14 +++ po/POTFILES.in | 12 ++- po/virt-v2v.pot | 272 +++++++++++++++++++++++++++++++++++++++++++++++++++++++ 8 files changed, 595 insertions(+), 40 deletions(-) create mode 100644 README-NLS delete mode 100644 po/LINGUAS create mode 100644 po/Makefile create mode 100644 po/PACKAGE create mode 100644 po/virt-v2v.pot delete mode 100644 po/virtv2v.pot diff --git a/.gitignore b/.gitignore index 68f552e..a870fc2 100644 --- a/.gitignore +++ b/.gitignore @@ -23,23 +23,6 @@ perl/Makefile-pl.old perl/Makefile.PL perl/pm_to_blib -po/*.gmo -po/Makevars.template -po/POTFILES -po/remove-potcdate.sed -po/stamp-it -po/stamp-po -po/LINGUAS -po/Makefile.in.in -po/Makevars -po/Rules-quot -po/boldquot.sed -po/en at boldquot.header -po/en at quot.header -po/insert-header.sin -po/quot.sed -po/remove-potcdate.sin - v2v/virt-v2v.1 v2v/virt-v2v.conf.5 v2v/virt-v2v.pl diff --git a/README-NLS b/README-NLS new file mode 100644 index 0000000..9f77651 --- /dev/null +++ b/README-NLS @@ -0,0 +1,200 @@ +Notes on National Language Support (NLS) +**************************************** + +This package is internationalized with libintl-perl, a free +internationalization library for Perl, you will need to install a copy of +libintl-perl in order to use the package. You can get libintl-perl from the +Comprehensive Perl Archive Network CPAN at http://www.cpan.org/. + +The following notes are meant to be a quick start guide for somewhat +experienced users and system administrators and many important details had to +be omitted for brevity. If you have any difficulties with the +internationalization features of this package, no matter if you are a +programmer, a translator, or an end user, feel free to ask at the mailing list +for libintl-perl. To do so, send an e-mail to the address +<libintl-perl AT imperia DOT net> (please replace "AT" with a "@", and "DOT" +with a dot "."). + +You can subscribe to this list at + + http://ml.imperia.org/mailman/listinfo/libintl-perl + +A searchable archive of earlier postings is located at + + http://ml.imperia.org/libintl-perl/ + +You may already find an answer to your question there. + +Feel free to include this document in your own Perl packages internationalized +with libintl-perl, no severe copyright restrictions apply. You should send +corrections or improvements to the author Guido Flohr <guido AT imperia DOT +net>, so that others can benefit from your changes. + +The End User's View +==================+ +The installation routine for this package will automatically take care that +your system has a sufficient version of libintl-perl installed. This is +basically sufficient for proper operation, but - especially if +internationalized software is new to you - you should read on carefully in +order to fully benefit from the internationalization (I18N) features of this +package. + +Perl Setup +---------- + +The I18N library libintl-perl will run with a wide range of Perl versions (at +least from Perl version 5.005_03 to Perl 5.8.0) but you will experience slight +difference in features and performance depending on the version of Perl you +use. + +With Perl versions prior to 5.7.3 you can use the package for all European +scripts (including those with Greek or Cyrillic scripts), and also for many +scripts used outside Europe, like Arabic, Hebrew, Georgian, Vietnamese or +Thai, more general all scripts using 8 bit charsets. Other scripts are only +available if the translations in this package are provided in Unicode and they +can only be output in Unicode. + +Beginning with Perl 5.7.3 the module Encode became part of the Perl core, and +it offers you a much wider range of possible scripts. If you plan to use some +of the lesser used scripts for Chinese, Japanese, and Korean, you should also +install the module Encode::HanExtra. + +Setting Your Language +--------------------- + +Most modern systems are already prepared and configured for +internationalization, and the user interface of the software you have +installed will already be configured for your preferred language. Packages +internationalized with libintl-perl will honor these configuration settings +and will also operate in your preferred language if the necessary translations +are available. + +The environment variable "LANGUAGE" has the highest precedence for +translations. The most common format for this environment variable is a +(lowercase) two-letter language code and an (uppercase) two-letter country +code separated by an underscore "_", for example: + + LANGUAGE=fr_BE + export LANGUAGE + +This will set your language preferences to French ("fr") for Belgium ("BE"). +Other examples are French for France ("fr_FR"), German for Austria ("de_AT"), +and so on. You can also omit the country part ("FR", "DE", "IT", "RU", ...) +in which case a default setting for the country will be assumed. + +If there are no translations available for your selected languages, the +original message (normally in English) will be displayed. + +You can also define a chain of languages to be tried separated by a colon: + + LANGUAGE=fr_BE:fr_FR:fr:it + +Read this as: "I want translations in French for Belgium. If they are not +available try French for France, then any French translation, and finally +Italian". Please note that this chain notation is only allowed for the +environment variable "LANGUAGE", it is not valid for any of the following +variables. + +If "LANGUAGE" is not set, the library checks the variable "LANG". It has the +same syntax as "LANGUAGE" but does not allow the preferences chain with the +colon syntax. After "LANG" the variable "LC_MESSAGES" (think "locale category +messages") is tried, and finally "LC_ALL". + +Note for Microsoft Windows users: The locale preferences you have configured +for your system cannot yet be evaluated by libintl-perl. This may change for +future versions of libintl-perl but for the moment you have to make do with +the instructions given above. In order to set environment variables, you have +to right-click on the icon "My Computer" on your desktop, select "Properties" +in the context menu, and then click the tab labelled "Environment variables". + +Setting the Output Charset +-------------------------- + +Even if you have managed to properly select your preferred language, you may +still have difficulties reading the program languages, because libintl-perl +was unable to determine the correct charset to use for messages. For example, +it may assume Unicode ("UTF-8") but you really need ISO-Latin-1 (also known as +"Latin-1" or "ISO-8859-1"). If this is the case, please set the environment +variable "OUTPUT_CHARSET" to the appropriate value, for example: + + OUTPUT_CHARSET=iso-8859-1 + export OUTPUT_CHARSET + +Charset names are case-insensitive, i. e. "LATIN-1" is the equivalent to +"Latin-1" or even "lAtIn-1". + +Note: The output charset "utf8" is NOT recognized. Please use the correct +abbreviation "utf-8" (with a hyphen) instead. + +The Translator's View +====================+ +If you want to contribute a new translation to this package, please contact +the author first. Somebody may have already started this translation, and +furthermore the package author will be able to give you detailled instructions +and help. + +Translating a Perl package is not much work and it does not require any +technical skills. If you are able to use the software itself, you will also +be able to contribute a translation for your language. But why should you do +that? You are able to read and understand this text and you will also be able +to understand the English messages that the software spits out by default. + +Computers are an integral part of today's society. Computers are used to +explore new sources of information, forbidding computers would be a modern +form of censorship. Computers may also improve social life, the internet +helps people to find contacts in their area and all over the world, even if +they would otherwise be deprived from that because of a handicap, lack of money +for traveling, or other reasons. In many societies, the ability to use and +handle a computer also has a strong impact on your perspectives in life, you +may not be able to find an adequate job because of your lack of computer +experience, or you may even lose your job because of that. + +Everybody should benefit from computers, regardless of cultural +background. Computers are expansive goods, and their price is already a high +barrier to cross. If computers speak in a foreign language, the learning +curve gets steeper and the barrier gets even higher. You can help the people +that share your native language by contributing a translation. The author of +this package has already prepared everything, the rest is up to you! + +The Programmer's View +====================+ +You have downloaded this package because you want to use it in your own +project(s). The fact that the package is internationalized with libintl-perl +does not affect its usability in any way. But you should keep in mind that +textual messages produced by the package may change according to the locale +settings at run-time. This can lead to errors. For example, if you parse +error messages produced by the package, you will most probably fail to detect +what you are looking for, if these error messages are suddenly presented in +another language or another output charset. + +It is probably needless to say that this is bad practice and an indicator for +a poorly written interface. Either you have missed the correct method for +determining the substance of the message in a locale-independent manner, or +the author of the package has mis-designed the package interface. In any +case, this is a technical problem that should be solved by technicians. You +should not put that burden on the shoulders of your users but rather solve the +problem in cooperation with the author of the module that causes it. + +If this is absolutely impossible, as a temporary workaround you can completely +switch off the native language support of the package by setting the +environment variable "LANGUAGE" to the special value "C": + + BEGIN { + $ENV{LANGUAGE} = $ENV{LANG} = "C"; + } + +The value "C" instructs libintl-perl to leave all messages untouched, and you +can use the package as if it was not internationalized at all. + +If the project you are working on is not yet internationalized, you should +consider to prepare it for internationalization now. Doing so is only little +work for yourself, but results in a large benefit for the users of your +software. The package "libintl-perl" ships with exhaustive documentation for +programmers and a sample package that you can use as a skeleton for your own +project(s). Internationalizing Perl software with libintl-perl is easy, the +package that this file is a part of, prooves that. + +Guido Flohr diff --git a/autogen.sh b/autogen.sh index 81bc944..f47dad5 100755 --- a/autogen.sh +++ b/autogen.sh @@ -21,22 +21,6 @@ set -e set -v -# Run autopoint, to get po/Makevars.template: -autopoint - -# Create gettext configuration. -echo "$0: Creating po/Makevars from po/Makevars.template ..." -rm -f po/Makevars -sed ' - /^EXTRA_LOCALE_CATEGORIES *=/s/=.*/= '"$EXTRA_LOCALE_CATEGORIES"'/ - /^MSGID_BUGS_ADDRESS *=/s/=.*/= '"$MSGID_BUGS_ADDRESS"'/ - /^XGETTEXT_OPTIONS *=/{ - s/$/ \\/ - a\ - '"$XGETTEXT_OPTIONS"' $${end_of_xgettext_options+} - } -' po/Makevars.template >po/Makevars - autoreconf -i CONFIGUREDIR=. diff --git a/configure.ac b/configure.ac index 6a6ad13..b8d49d4 100644 --- a/configure.ac +++ b/configure.ac @@ -52,10 +52,6 @@ AC_PATH_PROGS([MKISOFS],[mkisofs],[no], [$PATH$PATH_SEPARATOR/usr/sbin$PATH_SEPARATOR/sbin]) test "x$MKISOFS" = "xno" && AC_MSG_ERROR([mkisofs must be installed]) -dnl For i18n. -AM_GNU_GETTEXT([external]) -AM_GNU_GETTEXT_VERSION([0.14]) - dnl Check for Perl AC_CHECK_PROG([PERL],[perl],[perl],[no]) test "x$PERL" = "xno" && @@ -82,6 +78,5 @@ AC_CONFIG_FILES([Makefile snapshot/Makefile snapshot/virt-snapshot.pl v2v/Makefile - v2v/virt-v2v.pl - po/Makefile.in]) + v2v/virt-v2v.pl]) AC_OUTPUT diff --git a/po/LINGUAS b/po/LINGUAS deleted file mode 100644 index e69de29..0000000 diff --git a/po/Makefile b/po/Makefile new file mode 100644 index 0000000..6fb37b1 --- /dev/null +++ b/po/Makefile @@ -0,0 +1,97 @@ +# Makefile for various po files. + +srcdir = . +libdir = ../lib + +#CATALOGS = $(addsuffix .po, LINGUAS) +CATALOGS = $(LINGUAS) +MO_FILES = $(addsuffix .mo, $(LINGUAS)) + +MSGMERGE = msgmerge +MSGFMT = msgfmt +XGETTEXT = xgettext +CATOBJEXT = .po + +include PACKAGE + +TD = $(strip $(TEXTDOMAIN)) + +default: help + +all: $(TD).pot update-po update-mo install + +help: + @echo "Available targets:" + @echo " pot - remake master catalog" + @echo " update-po - merge po files" + @echo " update-mo - regenerate mo files" + @echo " install - install mo files" + @echo " all - all of the above" + +POTFILES = $(srcdir)/POTFILES.in \ + $(shell cat $(srcdir)/POTFILES.in) + +pot: $(TD).pot + +clean: + rm -f *~ *.bak *.mo + +# FIXME: The parameter --from-code is only needed if your sources contain +# any 8 bit data (even in comments). UTF-8 is only a guess here, but it +# will at least accept any 8 bit data. +# +# The parameter "--language=perl" is not strictly needed because the +# source language of all our files will be auto-detected by xgettext +# by their filename extension. You should even avoid this parameter +# if you want to extract strings from multiple source languages. +$(TD).pot: $(POTFILES) + $(XGETTEXT) --output=$(srcdir)/$(TD).pox --from-code=utf-8 \ + --add-comments=TRANSLATORS: --files-from=$(srcdir)/POTFILES.in \ + --copyright-holder="$(COPYRIGHT_HOLDER)" \ + --msgid-bugs-address="$(MSGID_BUGS_ADDRESS)" \ + --keyword --keyword='$$__' --keyword=__ --keyword=__x \ + --keyword=__n:1,2 --keyword=__nx:1,2 --keyword=__xn:1,2 \ + --keyword=__p:1c,2 --keyword=__np:1c,2,3 \ + --keyword=__npx:1c,2,3 --keyword=N__ --keyword=N__n:1,2 \ + --keyword=N__p:1c,2 --keyword=N__np:1c,2,3 --keyword=%__ \ + --language=perl && \ + rm -f $@ && mv $(TD).pox $@ + +install: $(MO_FILES) + cd $(srcdir); \ + targetdir='$(libdir)/LocaleData'; \ + languages='$(LINGUAS)'; \ + for lang in $$languages; do \ + mkdir -p "$$targetdir/$$lang/LC_MESSAGES" || exit 1; \ + dest="$$targetdir/$$lang/LC_MESSAGES/$(TD).mo"; \ + cat="$$lang.mo"; \ + echo "installing $$cat as $$dest"; \ + cp -f $$cat $$dest && chmod 644 $$dest || exit 1; \ + done + +update-mo: $(MO_FILES) + +update-po: + $(MAKE) $(TD).pot + cd $(srcdir); \ + catalogs='$(CATALOGS)'; \ + for cat in $$catalogs; do \ + cat=`basename $$cat`; \ + lang=`echo $$cat | sed 's/\$(CATOBJEXT)$$//'`; \ + mv $$lang.po $$lang.old.po; \ + echo "$$lang:"; \ + if $(MSGMERGE) $$lang.old.po $(TD).pot -o $$lang.po; then \ + rm -f $$lang.old.po; \ + else \ + echo "msgmerge for $$cat failed!"; \ + rm -f $$lang.po; \ + mv $$lang.old.po $$lang.po; \ + fi; \ + done + +.SUFFIXES: +.SUFFIXES: .po .mo + +.po.mo: + $(MSGFMT) --check --statistics --verbose -o $@ $< + diff --git a/po/PACKAGE b/po/PACKAGE new file mode 100644 index 0000000..ae8deb2 --- /dev/null +++ b/po/PACKAGE @@ -0,0 +1,14 @@ +# Makefile snippet that holds all package-dependent information. + +# Add more languages here! Beware that this is a makefile snippet and +# you have to adhere to make syntax. +LINGUAS = + +# Textdomain for our package. +TEXTDOMAIN = virt-v2v + +# Initial copyright holder added to pot and po files. +COPYRIGHT_HOLDER = Red Hat Inc. + +# Where to send msgid bugs? +MSGID_BUGS_ADDRESS = libguestfs at redhat.com diff --git a/po/POTFILES.in b/po/POTFILES.in index 02402db..488e8f3 100644 --- a/po/POTFILES.in +++ b/po/POTFILES.in @@ -1 +1,11 @@ -v2v/virt-v2v.pl +../perl/lib/Sys/VirtV2V/GuestOS.pm +../perl/lib/Sys/VirtV2V/GuestOS/RedHat.pm +../perl/lib/Sys/VirtV2V/HVSource.pm +../perl/lib/Sys/VirtV2V/HVSource/Xen/Linux.pm +../perl/lib/Sys/VirtV2V/HVTarget/Linux.pm +../perl/lib/Sys/VirtV2V/HVTarget.pm +../perl/lib/Sys/VirtV2V/MetadataReader/LibVirt.pm +../perl/lib/Sys/VirtV2V/MetadataReader/LibVirtXML.pm +../perl/lib/Sys/VirtV2V/MetadataReader.pm +../snapshot/virt-snapshot.pl +../v2v/virt-v2v.pl diff --git a/po/virt-v2v.pot b/po/virt-v2v.pot new file mode 100644 index 0000000..843d43d --- /dev/null +++ b/po/virt-v2v.pot @@ -0,0 +1,272 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) YEAR Red Hat Inc. +# This file is distributed under the same license as the PACKAGE package. +# FIRST AUTHOR <EMAIL at ADDRESS>, YEAR. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: PACKAGE VERSION\n" +"Report-Msgid-Bugs-To: libguestfs at redhat.com\n" +"POT-Creation-Date: 2009-09-02 13:01+0100\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME <EMAIL at ADDRESS>\n" +"Language-Team: LANGUAGE <LL at li.org>\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=CHARSET\n" +"Content-Transfer-Encoding: 8bit\n" + +#: ../perl/lib/Sys/VirtV2V/GuestOS.pm:160 +#, perl-brace-format +msgid "WARNING unable to access {path}." +msgstr "" + +#: ../perl/lib/Sys/VirtV2V/GuestOS/RedHat.pm:120 +msgid "/etc/selinux/config does not exist" +msgstr "" + +#: ../perl/lib/Sys/VirtV2V/GuestOS/RedHat.pm:132 +msgid "Didn't find SELINUXTYPE n /etc/syslinux/config" +msgstr "" + +#: ../perl/lib/Sys/VirtV2V/GuestOS/RedHat.pm:141 +#, perl-brace-format +msgid "Unable to find an SELinux policy file matching {path}" +msgstr "" + +#: ../perl/lib/Sys/VirtV2V/GuestOS/RedHat.pm:162 +msgid "Unable to successfully load an SELinux policy" +msgstr "" + +#: ../perl/lib/Sys/VirtV2V/GuestOS/RedHat.pm:209 +msgid "Unable to find any valid modprobe configuration" +msgstr "" + +#: ../perl/lib/Sys/VirtV2V/GuestOS/RedHat.pm:393 +msgid "Unable to find a default kernel" +msgstr "" + +#: ../perl/lib/Sys/VirtV2V/GuestOS/RedHat.pm:437 +#, perl-brace-format +msgid "{filename} doesn't contain a valid kernel\n" +msgstr "" + +#: ../perl/lib/Sys/VirtV2V/GuestOS/RedHat.pm:491 +msgid "Unable to determine a kernel architecture" +msgstr "" + +#: ../perl/lib/Sys/VirtV2V/GuestOS/RedHat.pm:561 +#, perl-brace-format +msgid "Found dependency loop installing {label}: {path}" +msgstr "" + +#: ../perl/lib/Sys/VirtV2V/GuestOS/RedHat.pm:755 +#, perl-brace-format +msgid "No {object} given matching {label}\n" +msgstr "" + +#: ../perl/lib/Sys/VirtV2V/GuestOS/RedHat.pm:772 +msgid "file" +msgstr "" + +#: ../perl/lib/Sys/VirtV2V/GuestOS/RedHat.pm:790 +msgid "alias" +msgstr "" + +#: ../perl/lib/Sys/VirtV2V/GuestOS/RedHat.pm:808 +msgid "dependencies" +msgstr "" + +#: ../perl/lib/Sys/VirtV2V/GuestOS/RedHat.pm:876 +#, perl-brace-format +msgid "No mapping found for block device {device}" +msgstr "" + +#: ../perl/lib/Sys/VirtV2V/GuestOS/RedHat.pm:930 +#, perl-brace-format +msgid "Didn't find a grub entry for kernel version {version}" +msgstr "" + +#: ../perl/lib/Sys/VirtV2V/GuestOS/RedHat.pm:935 +#, perl-brace-format +msgid "WARNING: Kernel version {version} doesn't have an initrd entry in grub" +msgstr "" + +#: ../perl/lib/Sys/VirtV2V/HVTarget/Linux.pm:128 +#, perl-brace-format +msgid "{name} configured with virtio drivers" +msgstr "" + +#: ../perl/lib/Sys/VirtV2V/HVTarget/Linux.pm:130 +#, perl-brace-format +msgid "{name} configured without virtio drivers" +msgstr "" + +#: ../perl/lib/Sys/VirtV2V/HVTarget/Linux.pm:228 +#, perl-brace-format +msgid "" +"WARNING: Don't know how to update {module}, which loads the {module} " +"module.\n" +msgstr "" + +#: ../perl/lib/Sys/VirtV2V/HVTarget/Linux.pm:324 +msgid "" +"No bootable kernels installed, and no replacement specified in " +"configuration.\n" +"Unable to continue" +msgstr "" + +#: ../perl/lib/Sys/VirtV2V/HVTarget/Linux.pm:452 +#, perl-brace-format +msgid "" +"WARNING: No replacement found for {xpath} in domain XML. The node was " +"removed." +msgstr "" + +#: ../perl/lib/Sys/VirtV2V/HVTarget/Linux.pm:503 +#, perl-brace-format +msgid "The connected hypervisor does not support a {arch} kvm guest" +msgstr "" + +#: ../perl/lib/Sys/VirtV2V/HVTarget/Linux.pm:533 +#, perl-brace-format +msgid "The connected hypervisor does not support a machine type of {machine}." +msgstr "" + +#: ../perl/lib/Sys/VirtV2V/HVTarget/Linux.pm:551 +#, perl-brace-format +msgid "The connected hypervisor does not support feature {feature}" +msgstr "" + +#: ../perl/lib/Sys/VirtV2V/HVTarget.pm:67 +msgid "Unable to find a module to configure this guest" +msgstr "" + +#: ../perl/lib/Sys/VirtV2V/MetadataReader/LibVirt.pm:107 +#, perl-brace-format +msgid "{name} isn't a valid guest name" +msgstr "" + +#: ../perl/lib/Sys/VirtV2V/MetadataReader/LibVirtXML.pm:84 +#, perl-brace-format +msgid "WARNING unknown configuration directive {directive} in {name} section" +msgstr "" + +#: ../snapshot/virt-snapshot.pl:185 +msgid "--commit and --rollback are mutually exclusive" +msgstr "" + +#: ../snapshot/virt-snapshot.pl:194 +msgid "no guest argument given" +msgstr "" + +#: ../snapshot/virt-snapshot.pl:199 +#, perl-brace-format +msgid "{input} is not a valid input format" +msgstr "" + +#: ../snapshot/virt-snapshot.pl:239 +msgid "No resulting domain" +msgstr "" + +#: ../snapshot/virt-snapshot.pl:251 +#, perl-brace-format +msgid "Unable to open {file}: {error}" +msgstr "" + +#: ../snapshot/virt-snapshot.pl:261 ../snapshot/virt-snapshot.pl:293 +#, perl-brace-format +msgid "Error closing {file}: {error}" +msgstr "" + +#: ../snapshot/virt-snapshot.pl:265 ../snapshot/virt-snapshot.pl:296 +#, perl-brace-format +msgid "Wrote output to {file}" +msgstr "" + +#: ../snapshot/virt-snapshot.pl:283 +#, perl-brace-format +msgid "Unable to create guest: {error}" +msgstr "" + +#: ../snapshot/virt-snapshot.pl:285 +msgid "Consider using the --outputxml option" +msgstr "" + +#: ../snapshot/virt-snapshot.pl:331 +#, perl-brace-format +msgid "Unable to create virt-snapshot storage pool: {error}" +msgstr "" + +#: ../snapshot/virt-snapshot.pl:349 +#, perl-brace-format +msgid "Unable to start virt-snapshot storage pool: {error}" +msgstr "" + +#: ../snapshot/virt-snapshot.pl:359 +msgid "virt-snapshot storage pool is temporarily unavailable" +msgstr "" + +#: ../snapshot/virt-snapshot.pl:494 +#, perl-brace-format +msgid "Failed to commit snapshot '{path}' to backing store '{backingstore}'" +msgstr "" + +#: ../snapshot/virt-snapshot.pl:522 +#, perl-brace-format +msgid "" +"A snapshot already exists for {guest}. You must commit it or roll it back " +"back before creating a new snapshot." +msgstr "" + +#: ../snapshot/virt-snapshot.pl:531 +#, perl-brace-format +msgid "Unable to write to {path}: {error}" +msgstr "" + +#: ../snapshot/virt-snapshot.pl:537 +#, perl-brace-format +msgid "Error closing {path}: {error}" +msgstr "" + +#: ../snapshot/virt-snapshot.pl:569 +#, perl-brace-format +msgid "Unable to create storage volume: {error}" +msgstr "" + +#: ../snapshot/virt-snapshot.pl:602 +#, perl-brace-format +msgid "Refusing to rollback guest {name} without backed-up xml" +msgstr "" + +#: ../snapshot/virt-snapshot.pl:613 +#, perl-brace-format +msgid "Failed to delete {file}: {error}" +msgstr "" + +#: ../snapshot/virt-snapshot.pl:624 +#, perl-brace-format +msgid "Unable to delete backup xml file {file}: {error}" +msgstr "" + +#: ../snapshot/virt-snapshot.pl:686 +#, perl-brace-format +msgid "invalid source element: {element}" +msgstr "" + +#: ../v2v/virt-v2v.pl:147 +msgid "virt-v2v: no guest argument given" +msgstr "" + +#: ../v2v/virt-v2v.pl:164 +#, perl-brace-format +msgid "virt-v2v: {input} is not a valid metadata format" +msgstr "" + +#: ../v2v/virt-v2v.pl:259 +msgid "no root device found in this operating system image" +msgstr "" + +#: ../v2v/virt-v2v.pl:260 +msgid "multiboot operating systems are not supported by v2v" +msgstr "" diff --git a/po/virtv2v.pot b/po/virtv2v.pot deleted file mode 100644 index e69de29..0000000 -- 1.6.2.5
Richard W.M. Jones
2009-Sep-07 07:58 UTC
[Libguestfs] [PATCH] internationalisation: Replace autopoint infrastructure with libintl-perl
On Wed, Sep 02, 2009 at 01:19:07PM +0100, Matthew Booth wrote:> I noticed that virt-v2v, which is written exclusively in perl, failed to > generate virt-v2v.pot. After much head scratching I also noticed that > libguestfs.pot didn't include any messages from perl sources. Some reading of > libintl-perl shows that a somewhat more complicated xgettext command line is > required, as it doesn't understand Locale::TextDomain syntax by default. After a > little more head scratching, I decided to replace the autopoint generated > infrastructure with the reference infrastructure from libintl-perl because: > > 1. It works > 2. It's a whole lot more transparent > > libguestfs still needs some attention in this area. This change may not be > appropriate for libguestfs because it is not exclusively written in perl.This is a regression. The Perl messages used to be added to the POT file, so something has broken, likely the special configuration in Makevars. Look at this random old libguestfs.pot file and see that it contains Perl translations: http://git.et.redhat.com/?p=libguestfs.git;a=blob;f=po/libguestfs.pot;h=f744fdcc7cc7752e401af43a014cb5350064e9c2;hb=8647c4ada502d0ce2b940f9e9cd47378d99a9164 Rich. -- Richard Jones, Emerging Technologies, Red Hat http://et.redhat.com/~rjones Read my programming blog: http://rwmj.wordpress.com Fedora now supports 75 OCaml packages (the OPEN alternative to F#) http://cocan.org/getting_started_with_ocaml_on_red_hat_and_fedora