[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: gettext: commands/hdparm.c
From: |
address@hidden |
Subject: |
Re: gettext: commands/hdparm.c |
Date: |
Wed, 9 Dec 2009 17:11:11 -0600 |
On Sun, Dec 6, 2009 at 12:25 PM, Carles Pina i Estany <address@hidden> wrote:
>
> Hello,
>
> commands/hdparm.c has some grub_printf's:
> grub_printf ("Model: \"%.40s\"\n", le16_to_char (tmp, &idw[27], 40));
> grub_printf ("Firmware: \"%.8s\"\n", le16_to_char (tmp, &idw[23], 8));
> grub_printf ("Serial: \"%.20s\"\n", le16_to_char (tmp, &idw[10], 20));
>
> To have a proper alignment it needs to code something (dynamic "tab").
>
> I could change it to:
> grub_printf (_("Model:\t\"%.40s\"\n"), le16_to_char (tmp, &idw[27], 40));
> grub_printf (_("Firmware:\t\"%.8s\"\n"), le16_to_char (tmp, &idw[23], 8));
> grub_printf (_("Serial:\t\"%.20s\"\n"), le16_to_char (tmp, &idw[10], 20));
>
> Or just don't translate Model/Firmware/Serial (leave like it's now)
>
> Or do the dynamic coding that maybe it's not needed...
>
> Thoughts?
How about using the string width specifier to control padding?
grub_printf ("%20s \"%.40s\"\n", _("Model:"), le16_to_char (tmp, &idw[27], 40));
>
> --
> Carles Pina i Estany
> http://pinux.info
>
>
> _______________________________________________
> Grub-devel mailing list
> address@hidden
> http://lists.gnu.org/mailman/listinfo/grub-devel
>