Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 20 Dec 2015 14:59:30 +0000 (UTC)
From:      Hajimu UMEMOTO <ume@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r292512 - in head: share/timedef tools/tools/locale/tools
Message-ID:  <201512201459.tBKExUGV064847@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: ume
Date: Sun Dec 20 14:59:30 2015
New Revision: 292512
URL: https://svnweb.freebsd.org/changeset/base/292512

Log:
  Restore a day of the week in date(1) output for Japanese locales.
  It was lost by recent locale change.

Modified:
  head/share/timedef/ja_JP.SJIS.src
  head/share/timedef/ja_JP.UTF-8.src
  head/share/timedef/ja_JP.eucJP.src
  head/tools/tools/locale/tools/cldr2def.pl

Modified: head/share/timedef/ja_JP.SJIS.src
==============================================================================
--- head/share/timedef/ja_JP.SJIS.src	Sun Dec 20 13:41:06 2015	(r292511)
+++ head/share/timedef/ja_JP.SJIS.src	Sun Dec 20 14:59:30 2015	(r292512)
@@ -63,7 +63,7 @@
 午後
 #
 # date_fmt
-%Y年%m月%e日 %H:%M:%S %Z
+%Y年%m月%e日 %A %H:%M:%S %Z
 #
 # Long month names (without case ending)
 1月

Modified: head/share/timedef/ja_JP.UTF-8.src
==============================================================================
--- head/share/timedef/ja_JP.UTF-8.src	Sun Dec 20 13:41:06 2015	(r292511)
+++ head/share/timedef/ja_JP.UTF-8.src	Sun Dec 20 14:59:30 2015	(r292512)
@@ -56,14 +56,14 @@
 %Y/%m/%d
 #
 # c_fmt
-%Y蟷エ%m譛%e譌・ %H:%M:%S
+%Y蟷エ%m譛%e譌・ %A %H:%M:%S
 #
 # AM/PM
 蜊亥燕
 蜊亥セ
 #
 # date_fmt
-%Y蟷エ%m譛%e譌・ %H:%M:%S %Z
+%Y蟷エ%m譛%e譌・ %A %H:%M:%S %Z
 #
 # Long month names (without case ending)
 1譛

Modified: head/share/timedef/ja_JP.eucJP.src
==============================================================================
--- head/share/timedef/ja_JP.eucJP.src	Sun Dec 20 13:41:06 2015	(r292511)
+++ head/share/timedef/ja_JP.eucJP.src	Sun Dec 20 14:59:30 2015	(r292512)
@@ -56,14 +56,14 @@
 %Y/%m/%d
 #
 # c_fmt
-%Yヌッ%mキ%eニ %H:%M:%S
+%Yヌッ%mキ%eニ %A %H:%M:%S
 #
 # AM/PM
 ク眞ー
 ク盧
 #
 # date_fmt
-%Yヌッ%mキ%eニ %H:%M:%S %Z
+%Yヌッ%mキ%eニ %A %H:%M:%S %Z
 #
 # Long month names (without case ending)
 1キ

Modified: head/tools/tools/locale/tools/cldr2def.pl
==============================================================================
--- head/tools/tools/locale/tools/cldr2def.pl	Sun Dec 20 13:41:06 2015	(r292511)
+++ head/tools/tools/locale/tools/cldr2def.pl	Sun Dec 20 14:59:30 2015	(r292512)
@@ -67,6 +67,7 @@ my %callback = (
 	mdorder => \&callback_mdorder,
 	altmon => \&callback_altmon,
 	cformat => \&callback_cformat,
+	dtformat => \&callback_dtformat,
 	cbabmon => \&callback_abmon,
 	data => undef,
 );
@@ -184,7 +185,7 @@ if ($TYPE eq "timedef") {
 	    "c_fmt"		=> "<cformat<d_t_fmt<s",
 	    "am_pm"		=> "as",
 	    "d_fmt"		=> "s",
-	    "d_t_fmt"		=> "s",
+	    "d_t_fmt"		=> "<dtformat<d_t_fmt<s",
 	    "altmon"		=> "<altmon<mon<as",
 	    "md_order"		=> "<mdorder<d_fmt<s",
 	    "t_fmt_ampm"	=> "s",
@@ -201,6 +202,16 @@ sub callback_cformat {
  	return $s;
 };
 
+sub callback_dtformat {
+ 	my $s = shift;
+	my $nl = $callback{data}{l} . "_" . $callback{data}{c};
+
+	if ($nl eq 'ja_JP') {
+	    $s =~ s/(> )(%H)/$1%A $2/;
+	}
+	return $s;
+};
+
 sub callback_mdorder {
 	my $s = shift;
 	return undef if (!defined $s);



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201512201459.tBKExUGV064847>