svn commit: r305264 - head/tools/tools/locale/tools

Kevin Lo kevlo at FreeBSD.org
Fri Sep 2 00:27:28 UTC 2016


Author: kevlo
Date: Fri Sep  2 00:27:27 2016
New Revision: 305264
URL: https://svnweb.freebsd.org/changeset/base/305264

Log:
  Replace %m with %_m in date_fmt for Chinese locales.
  This is a fix for the problem mentioned in the PR.
  
  PR:	199441

Modified:
  head/tools/tools/locale/tools/cldr2def.pl

Modified: head/tools/tools/locale/tools/cldr2def.pl
==============================================================================
--- head/tools/tools/locale/tools/cldr2def.pl	Fri Sep  2 00:21:24 2016	(r305263)
+++ head/tools/tools/locale/tools/cldr2def.pl	Fri Sep  2 00:27:27 2016	(r305264)
@@ -243,7 +243,10 @@ sub callback_dtformat {
 
 	if ($nl eq 'ja_JP') {
 		$s =~ s/(> )(%H)/$1%A $2/;
-	} elsif ($nl eq 'ko_KR' || $nl eq 'zh_TW') {
+	} elsif ($nl eq 'ko_KR' || $nl eq 'zh_CN' || $nl eq 'zh_TW') {
+		if ($nl ne 'ko_KR') {
+			$s =~ s/%m/%_m/;
+		}
 		$s =~ s/(> )(%p)/$1%A $2/;
 	}
 	$s =~ s/\.,/\./;


More information about the svn-src-head mailing list