Re: [PATCH v2 2/2] blame: use different blame_date_width for different locale

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

 



2014-04-22 18:01 GMT+08:00 David Kastrup <dak@xxxxxxx>:
> Junio C Hamano <gitster@xxxxxxxxx> writes:
>
>> This is not wrong per-se, but I am not sure if translators would
>> understand that "years and months ago" may not be the longuest
>> variant for their language and they are asked to use "89 seconds
>> ago" if the translation of that is longer than the translation for
>> "4 years, 11 months ago" in their language, with the given
>> explanation.
>
> What's with the 89?  And the other semi-magic numbers?

Not something magic, just what show_date_relative() in date.c is implemented:

    98          diff = now->tv_sec - time;
    99          if (diff < 90) {
    100                 strbuf_addf(timebuf,
    101                          Q_("%lu second ago", "%lu seconds
ago", diff), diff);
    102                 return;
    103         }
    104         /* Turn it into minutes */
    105         diff = (diff + 30) / 60;
    106         if (diff < 90) {
    107                 strbuf_addf(timebuf,
    108                          Q_("%lu minute ago", "%lu minutes
ago", diff), diff);
    109                 return;
    110         }


-- 
Jiang Xin
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]