[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

[PATCH] Improve consistency of that which dates are marked for localization

From: Arfrever Frehtes Taifersar Arahesis <arfrever.fta_at_gmail.com>
Date: 2007-09-05 17:01:44 CEST

Hello,

subversion/libsvn_subr/time.c contains in lines 80-81:
/* Human explanatory part, generated by apr_strftime as "Sat, 01 Jan 2000" */
#define human_timestamp_format_suffix _(" (%a, %d %b %Y)")

But e. g. subversion/svn/list-cmd.c contains in lines 82-96:
      /* svn_time_to_human_cstring gives us something *way* too long
         to use for this, so we have to roll our own. We include
         the year if the entry's time is not within half a year. */
      apr_time_exp_lt(&exp_time, dirent->time);
      if (apr_time_sec(now - dirent->time) < (365 * 86400 / 2)
          && apr_time_sec(dirent->time - now) < (365 * 86400 / 2))
        {
          apr_err = apr_strftime(timestr, &size, sizeof(timestr),
                                 "%b %d %H:%M", &exp_time);
        }
      else
        {
          apr_err = apr_strftime(timestr, &size, sizeof(timestr),
                                 "%b %d %Y", &exp_time);
        }

As you can see, in the second case dates aren't marked for localization.
It would be more consistent if dates in both cases are marked for localization.

[[[
Mark dates for localization.

* subversion/libsvn_diff/diff_file.c
  (output_unified_default_hdr): Mark a date for localization.
* subversion/svn/list-cmd.c
  (print_dirent): Mark dates for localization.

Patch by: Arfrever Frehtes Taifersar Arahesis <arfrever.fta@gmail.com>
]]]

-- 
Arfrever Frehtes Taifersar Arahesis

Received on Wed Sep 5 17:02:16 2007

This is an archived mail posted to the Subversion Dev mailing list.