From 8fc17df6789e8cbd3080464df48e32c089983e7c Mon Sep 17 00:00:00 2001 From: Jim Meyering Date: Sun, 12 Nov 2000 10:02:29 +0000 Subject: (show_date): Add a comment explaining why the format string must not be translatable via _(). From Paul Eggert. --- src/date.c | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'src') diff --git a/src/date.c b/src/date.c index 23a298286..b521d661d 100644 --- a/src/date.c +++ b/src/date.c @@ -461,6 +461,13 @@ show_date (const char *format, time_t when) else { char *date_fmt = DATE_FMT_LANGINFO (); + /* Do not wrap the following literal format string with _(...). + For example, suppose LC_ALL is unset, LC_TIME="POSIX", + and LANG="ko_KR". In that case, POSIX.2 says that LC_TIME + determines the format and contents of date and time strings + written by date, which means "date" must generate output + using the POSIX locale; but adding _() would cause "date" + to use a Korean translation of the format. */ format = *date_fmt ? date_fmt : "%a %b %e %H:%M:%S %Z %Y"; } } -- cgit v1.2.3-70-g09d2