[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: ls - French translation of N_("%b %e %Y")
From: |
Stéphane Raimbault |
Subject: |
Re: ls - French translation of N_("%b %e %Y") |
Date: |
Sun, 15 Mar 2009 12:09:29 +0100 |
2009/3/15 Eric Blake <address@hidden>:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> According to Stéphane Raimbault on 3/14/2009 6:57 PM:
>> Hi,
>>
>> It's not possible to translate this string in French and to keep the
>> columns aligned because in French the month abbreviations are variable
>> from 3 to 5 characters:
>
> GNU strftime obeys POSIX 2008, and thus allows for width modifiers.
> Therefore, you can write things like %5b to write the month abbreviation
> that will occupy 5 spaces, which takes care of adding extra spacing for
> short months while still allowing the a fixed-width date string to have
> nice overall alignment. However, if all of the entries have a short
> month, it still results in a larger spacing in the middle of the date, but
> I'm not sure how easy it would be to patch the code to handle
> adaptive-width date strings.
Yes, it's a nice and easy solution but I've already tried to use %5b
without success on my system:
gcc 4.3.2
glibc 2.8 (may 2008)
gcc complains
warning: field width used with ‘%b’ strftime format
if (strftime(outstr, sizeof(outstr), "%5b", tmp) == 0) {
fprintf(stderr, "1 - strftime returned 0");
exit(EXIT_FAILURE);
}
printf("Month:|%s|", outstr);
And the output doesn't have extra spacing when the string contains a
French accent (bug spotted?):
LC_TIME in french:
Month:|janv.|
Month:|févr.|
Month:| mars|
Month:|avril|
Month:| mai|
Month:| juin|
Month:|juil.|
Month:|août|
Month:|sept.|
Month:| oct.|
Month:| nov.|
Month:|déc.|
Same problem when I do the change in coreutils (master).
- ls - French translation of N_("%b %e %Y"), Stéphane Raimbault, 2009/03/14
- Re: ls - French translation of N_("%b %e %Y"), Eric Blake, 2009/03/14
- Re: ls - French translation of N_("%b %e %Y"),
Stéphane Raimbault <=
- Re: ls - French translation of N_("%b %e %Y"), Eric Blake, 2009/03/18
- Re: ls - French translation of N_("%b %e %Y"), Bruno Haible, 2009/03/19
- Re: ls - French translation of N_("%b %e %Y"), Eric Blake, 2009/03/19
- Re: ls - French translation of N_("%b %e %Y"), Bruno Haible, 2009/03/19
- Re: ls - French translation of N_("%b %e %Y"), Stéphane Raimbault, 2009/03/20
Re: ls - French translation of N_("%b %e %Y"), Paul Eggert, 2009/03/15