diff options
author | bapt <bapt@FreeBSD.org> | 2016-05-28 21:25:24 +0000 |
---|---|---|
committer | bapt <bapt@FreeBSD.org> | 2016-05-28 21:25:24 +0000 |
commit | 26fece6d512b676078db62240b3d1c793f41d7ab (patch) | |
tree | f5bd15b0aa19ec52e24a1c64372aa2e772b419fd /tools | |
parent | d9b0c1c4d2898fcd6ad6fb543b89dee5c95456cc (diff) | |
download | FreeBSD-src-26fece6d512b676078db62240b3d1c793f41d7ab.zip FreeBSD-src-26fece6d512b676078db62240b3d1c793f41d7ab.tar.gz |
Add a hack to readd the day of weeks in default date formats
Diffstat (limited to 'tools')
-rwxr-xr-x | tools/tools/locale/tools/cldr2def.pl | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/tools/tools/locale/tools/cldr2def.pl b/tools/tools/locale/tools/cldr2def.pl index da94036..a9ef11d 100755 --- a/tools/tools/locale/tools/cldr2def.pl +++ b/tools/tools/locale/tools/cldr2def.pl @@ -196,19 +196,23 @@ if ($TYPE eq "timedef") { } sub callback_cformat { - my $s = shift; - $s =~ s/ %Z//; - $s =~ s/ %z//; - return $s; + my $s = shift; + $s =~ s/ %Z//; + $s =~ s/ %z//; + $s =~ s/^"(%B %e, )/"%a, $1/; + $s =~ s/^"(%e %B )/"%a $1/; + return $s; }; sub callback_dtformat { - my $s = shift; + my $s = shift; my $nl = $callback{data}{l} . "_" . $callback{data}{c}; if ($nl eq 'ja_JP') { - $s =~ s/(> )(%H)/$1%A $2/; + $s =~ s/(> )(%H)/$1%A $2/; } + $s =~ s/^"(%B %e, )/"%a, $1/; + $s =~ s/^"(%e %B )/"%a $1/; return $s; }; |