From: Raimond Spekking Date: Tue, 17 Apr 2007 05:52:24 +0000 (+0000) Subject: * (bug 6910) Correct date/time formats in Vietnamese (vi) X-Git-Tag: 1.31.0-rc.0~53382 X-Git-Url: https://git.cyclocoop.org/%7B%24www_url%7Dadmin/compta/banques/?a=commitdiff_plain;h=b60cba62c582eb3df50588a08f439dba88c5d9e9;p=lhc%2Fweb%2Fwiklou.git * (bug 6910) Correct date/time formats in Vietnamese (vi) patch by Shinjiman --- diff --git a/RELEASE-NOTES b/RELEASE-NOTES index 73a8a36f57..3c3d3d1546 100644 --- a/RELEASE-NOTES +++ b/RELEASE-NOTES @@ -319,6 +319,7 @@ it from source control: http://www.mediawiki.org/wiki/Download_from_SVN * (bug 9220) Removed obsoletes functions in install-utils.inc. * Removed obsoletes Title::getRelatedCache and Title:touchArray * (bug 7285) Check MySQL username length during install +* (bug 6910) Correct date/time formats in Vietnamese (vi) == Maintenance == @@ -401,6 +402,7 @@ it from source control: http://www.mediawiki.org/wiki/Download_from_SVN * Ukrainian (uk) * Urdu (ur) * Uzbek (uz) +* Vietnamese (vi) * Zealandic (zea) * Chinese (PRC) (zh-cn) * Chinese (Taiwan) (zh-tw) diff --git a/languages/classes/LanguageVi.php b/languages/classes/LanguageVi.php deleted file mode 100644 index 94c4aaa173..0000000000 --- a/languages/classes/LanguageVi.php +++ /dev/null @@ -1,73 +0,0 @@ -userAdjust( $ts, $timecorrection ); } - - $datePreference = $this->dateFormat( $format ); - - $month = $this->formatMonth( substr( $ts, 4, 2 ), $datePreference ); - $day = $this->formatDay( substr( $ts, 6, 2 ), $datePreference ); - $year = $this->formatNum( substr( $ts, 0, 4 ), true ); - - switch( $datePreference ) { - case 3: - case 4: return "$day/$month/$year"; - case MW_DATE_ISO: return substr($ts, 0, 4). '-' . substr($ts, 4, 2). '-' .substr($ts, 6, 2); - default: return "$day $month năm $year"; - } - } - - function timeSeparator( $format ) { - $datePreference = $this->dateFormat($format); - switch ( $datePreference ) { - case '4': return 'h'; - default: return ':'; - } - } - - function timeDateSeparator( $format ) { - $datePreference = $this->dateFormat($format); - switch ( $datePreference ) { - case '0': - case '1': - case '2': return ', '; - default: return ' '; - } - } - - function formatMonth( $month, $format ) { - $datePreference = $this->dateFormat($format); - switch ( $datePreference ) { - case '0': - case '1': return 'tháng ' . ( 0 + $month ); - case '2': return 'tháng ' . $this->getSpecialMonthName( $month ); - default: return 0 + $month; - } - } - - function formatDay( $day, $format ) { - $datePreference = $this->dateFormat($format); - switch ( $datePreference ) { - case '0': - case '1': - case '2': return 'ngày ' . (0 + $day); - default: return 0 + $day; - } - } - - function getSpecialMonthName( $key ) { - $names = 'Một, Hai, Ba, Tư, Năm, Sáu, Bảy, Tám, Chín, Mười, Mười một, Mười hai'; - $names = explode(', ', $names); - return $names[$key-1]; - } -} - -?> diff --git a/languages/messages/MessagesVi.php b/languages/messages/MessagesVi.php index 6396f73521..8860ae7ed5 100644 --- a/languages/messages/MessagesVi.php +++ b/languages/messages/MessagesVi.php @@ -85,9 +85,9 @@ $magicWords = array( $datePreferences = array( 'default', 'vi normal', - 'vi longmonth', + 'vi spelloutmonth', 'vi shortcolon', - 'vi short', + 'vi shorth', 'ISO 8601', ); @@ -95,20 +95,20 @@ $defaultDateFormat = 'vi normal'; $dateFormats = array( 'vi normal time' => 'H:i', - 'vi normal date' => '"ngày" j M "năm" Y', - 'vi normal both' => 'H:i, "ngày" j M "năm" Y', + 'vi normal date' => '"ngày" j "tháng" n "năm" Y', + 'vi normal both' => 'H:i, "ngày" j "tháng" n "năm" Y', - 'vi longmonth time' => 'H:i', - 'vi longmonth date' => '"ngày" j F "năm" Y', - 'vi longmonth both' => 'H:i, "ngày" j F "năm" Y', + 'vi spelloutmonth time' => 'H:i', + 'vi spelloutmonth date' => '"ngày" j xg "năm" Y', + 'vi spelloutmonth both' => 'H:i, "ngày" j xg "năm" Y', 'vi shortcolon time' => 'H:i', 'vi shortcolon date' => 'j/n/Y', 'vi shortcolon both' => 'H:i, j/n/Y', - 'vi short time' => 'H"h"i', - 'vi short date' => 'j/n/Y', - 'vi short both' => 'H"h"i, j/n/Y', + 'vi shorth time' => 'H"h"i', + 'vi shorth date' => 'j/n/Y', + 'vi shorth both' => 'H"h"i, j/n/Y', ); $datePreferenceMigrationMap = array( @@ -165,18 +165,37 @@ $messages = array( 'thursday' => 'thứ năm', 'friday' => 'thứ sáu', 'saturday' => 'thứ bảy', -'january' => 'tháng Một', -'february' => 'tháng Hai', -'march' => 'tháng Ba', -'april' => 'tháng Tư', -'may_long' => 'tháng Năm', -'june' => 'tháng Sáu', -'july' => 'tháng Bảy', -'august' => 'tháng Tám', -'september' => 'tháng Chín', -'october' => 'tháng Mười', -'november' => 'tháng Mười một', -'december' => 'tháng Mười hai', +'sun' => 'thứ 1', +'mon' => 'thứ 2', +'tue' => 'thứ 3', +'wed' => 'thứ 4', +'thu' => 'thứ 5', +'fri' => 'thứ 6', +'sat' => 'thứ 7', +'january' => 'tháng 1', +'february' => 'tháng 2', +'march' => 'tháng 3', +'april' => 'tháng 4', +'may_long' => 'tháng 5', +'june' => 'tháng 6', +'july' => 'tháng 7', +'august' => 'tháng 8', +'september' => 'tháng 9', +'october' => 'tháng 10', +'november' => 'tháng 11', +'december' => 'tháng 12', +'january-gen' => 'tháng Một', +'february-gen' => 'tháng Hai', +'march-gen' => 'tháng Ba', +'april-gen' => 'tháng Tư', +'may-gen' => 'tháng Năm', +'june-gen' => 'tháng Sáu', +'july-gen' => 'tháng Bảy', +'august-gen' => 'tháng Tám', +'september-gen' => 'tháng Chín', +'october-gen' => 'tháng Mười', +'november-gen' => 'tháng Mười một', +'december-gen' => 'tháng Mười hai', 'jan' => 'tháng 1', 'feb' => 'tháng 2', 'mar' => 'tháng 3',