Re: [PATCH] build: silence gettext warning

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 13.06.2012 05:47, Eric Blake wrote:
> Otherwise, 'make dist' gives multiple warnings like:
> 
> libvirt.pot:20814: warning: internationalized messages should not contain the `\r' escape sequence
> 
> * tools/virsh.c (vshAskReedit): Avoid \r in _().
> ---
> 
> Pushing under the trivial rule.
> 
>  tools/virsh.c |    8 ++++----
>  1 file changed, 4 insertions(+), 4 deletions(-)
> 
> diff --git a/tools/virsh.c b/tools/virsh.c
> index 744b629..90ea43d 100644
> --- a/tools/virsh.c
> +++ b/tools/virsh.c
> @@ -690,10 +690,10 @@ vshAskReedit(vshControl *ctl, const char *msg)
>          c = c_tolower(getchar());
> 
>          if (c == '?') {
> -            vshPrint(ctl, "\r\n%s", _("y - yes, start editor again\r\n"
> -                                      "n - no, throw away my changes\r\n"
> -                                      "f - force, try to redefine again\r\n"
> -                                      "? - print this help\r\n"));
> +            vshPrint(ctl, "\r\n%s", _("y - yes, start editor again\n"
> +                                      "n - no, throw away my changes\n"
> +                                      "f - force, try to redefine again\n"
> +                                      "? - print this help\n"));
>              continue;
>          } else if (c == 'y' || c == 'n' || c == 'f') {
>              break;
> 

In fact, those '\r' are necessary since we are printing this when stdout
is in raw mode. Therefore '\n' doesn't return carriage at the beginning
of new line. So we need to move those '\r' characters into the
formatting string. Will post patch shortly.

Michal

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list


[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]