Last modified: 2007-04-17 15:18:39 UTC
The latest MediaWiki upgrade at the Wikimedia projects -- 1.8alpha (r15925) -- has broken the date format for the Vietnamese localization. This is a result of Tim Starling's recent work to remove date and time functions from Language.php files. As seen at <http://www.mediawiki.org/wiki/Date_formats>, the Vietnamese date strings now look like: vi date: 15 1 năm 2001 | 15 1 năm 2001 | 15 1 năm 2001 | 15 1 năm 2001 | 2001-01-15 vi time: 12:34 | 12:34 | 12:34 | 12:34 | 12:34 vi both: 12:34, 15 tháng 1 2001 | 12:34, tháng 1 15, 2001 | 12:34, 15 tháng 1 2001 | 12:34, 2001 tháng 1 15 | 2001-01-15T12:34 Whereas they should look like: vi date: 15 tháng 1 năm 2001 | 15 tháng XX năm 2001 | 15/1/2001 | 15/1/2001 | 2001-01-15 vi time: 12:34 | 12:34 | 12:34 | 12h34 | 12:34 vi both: 12:34, ngày 15 tháng 1 năm 2001 | 12:34, ngày 15 tháng XX năm 2001 | 12:34, 15/1/2001 | 12:34, 15/1/2001 | 2001-01-15T12:34 Where XX maps to the following: January Một Feburary Hai March Ba April Tư May Năm June Sáu July Bảy August Tám September Chín October Mười November Mười một December Mười hai Note that the Vietnamese localization doesn't use [[MediaWiki:January]] etc. because the option for spelled-out month names isn't chosen by default. See also Bug 5802. These details were sent to the wikitech-l mailing list <http://mail.wikimedia.org/pipermail/wikitech-l/2006-July/037193.html>, but no response was ever given. The broken dates are now visible at [[vi:Special:Recentchanges]] and [[vi:Special:Preferences]], among other locations.
This bug also affects signatures and the timestamp at the bottom of every article.
so, is the correct date formats should be like this? Default ======= time: 12:34 date: ngày 15 tháng 1 năm 2001 both: 12:34, ngày 15 tháng 1 năm 2001 Alternate format 1 <---- Please give a name fot this ================== time: 12:34 date: ngày 15 tháng Một năm 2001 both: 12:34, ngày 15 tháng Một năm 2001 Alternate format 2 <---- Please give a name fot this ================== time: 12:34 date: 15/1/2001 both: 12:34, 15/1/2001 Alternate format 3 <---- Please give a name fot this ================== time: 12h34 date: 15/1/2001 both: 12:34, 15/1/2001 and the ISO8601 format.
Also, could we consider to assign the special month name into the genitive month names? That means: 'january-gen' => 'Một', 'february-gen' => 'Hai', 'march-gen' => 'Ba', 'april-gen' => 'Tư', 'may-gen' => 'Năm', 'june-gen' => 'Sáu', 'july-gen' => 'Bảy', 'august-gen' => 'Tám', 'september-gen' => 'Chín', 'october-gen' => 'Mười', 'november-gen' => 'Mười một', 'december-gen' => 'Mười hai', no idea can we assign the genitive month names like this.
(In reply to comment #2) > so, is the correct date formats should be like this? > > Default > ======= > time: 12:34 > date: ngày 15 tháng 1 năm 2001 > both: 12:34, ngày 15 tháng 1 năm 2001 > > Alternate format 1 <---- Please give a name fot this > ================== Long form, spelled-out month > time: 12:34 > date: ngày 15 tháng Một năm 2001 > both: 12:34, ngày 15 tháng Một năm 2001 > > Alternate format 2 <---- Please give a name fot this > ================== Short form with colon > time: 12:34 > date: 15/1/2001 > both: 12:34, 15/1/2001 12:34 15/1/2001 > > Alternate format 3 <---- Please give a name fot this > ================== Short form with "h" > time: 12h34 > date: 15/1/2001 > both: 12h34, 15/1/2001 12h34 15/1/2001 > > and the ISO8601 format. > Vietnamese has no genitive case; these are just spelled out numbers ("Một" == 1). Since by default we use the numbers, [[MediaWiki:January]] currently says "tháng 1" (instead of "tháng Một") and so on. If we can make sure that [[MediaWiki:Jan]], [[MediaWiki:Feb]], etc. are used in the interface by default, we can spell out the month names in [[MediaWiki:January]]-[[MediaWiki:December]] and leave [[MediaWiki:Jan]]-[[MediaWiki:Dec]] as is.
To clarify, this would mean that {{CURRENTMONTHABBREV}} would return [[MediaWiki:Aug]] (tháng 8) and {{CURRENTMONTHNAME}} would return [[MediaWiki:August]] (tháng Tám).
Sorry I couldn't catch up with this earlier. As Minh has pointed out, this has broken our date format in WikiMedia. This is a serious matter, since we rely on Wiktionary as our central glossary, and on Wikisource as our central document resource. Clytie Siddall, Vietnamese free-software translation team / nhóm Việt hóa phần mềm tự do) http://groups-beta.google.com/group/vi-VN
First try to fix: r17977. Please verify.
Yep, everything looks good to me.
Wait, hold on: doesn't the interface use the messages [[MediaWiki:January]]-[[MediaWiki:December]] for things like signatures and timestamps? If so, those shouldn't be changed, because the Vietnamese default month format is "tháng 1" etc., not "tháng Một". We have [[MediaWiki:January-gen]]-[[MediaWiki:December-gen]] for this purpose. (Although they're misnomers... we aren't dealing with a "genitive case" here, just spelled-out numbers.)
Signatures use the default date format, which would be 12:34, ngày 15 tháng 1 năm 2001.
Okay then, sounds good. Again. :)
Unfortunately, it seems the only thing that really got fixed was the signatures. Although we now have the new preferences, {{CURRENTMONTHNAME}} and probably other variables also rely on [[MediaWiki:January]]-[[MediaWiki:December]]. Because the "tháng 1" style is the Vietnamese-language default, we can't have MediaWiki:January-MediaWiki:December represent the strings used for the "tháng Một" style. [[MediaWiki:January-gen]]-[[MediaWiki:December-gen]] were created for this purpose. In addition, the date stamp at the bottom of [[vi:Trang Chính]] is still misformatted. It should read "Sửa đổi lần cuối lúc 11:33, ngày 22 tháng 9 năm 2006.", rather than "Sửa đổi lần cuối lúc 11:33, 22 tháng 9 năm 2006.".
The problem of {{CURRENTMONTHNAME}} should be solved by using {{CURRENTMONTHNAMEGEN}}, which uses the genitive form. I don't understand the other problems, please clarify.
Take a look at [[vi:Special:Recentchanges]]. The headings have use a "dd mm năm yyyy" format, which should be "ngày dd tháng mm năm yyyy". The same problem occurs at the footer of articles, with the last updated timestamp: "Sửa đổi lần cuối lúc 11:33, 22 9 năm 2006." As for using {{CURRENTMONTHNAMEGEN}}, that would work, except we need to revert lines 174-185 in MessagesVi.php to use the "tháng 1" style strings again, and set "january-gen"-"december-gen" to use the spelled-out style. Then we need to have the "vi longmonth" date format use those -gen messages instead.
Please provide the week-day details also, as those messages are going to update into the message array, please advise if they are correct or not: 'sunday' => 'chủ nhật', 'monday' => 'thứ hai', 'tuesday' => 'thứ ba', 'wednesday' => 'thứ tư', 'thursday' => 'thứ năm', 'friday' => 'thứ sáu', 'saturday' => 'thứ bảy', 'sun' => 'thứ 1', 'mon' => 'thứ 2', 'tue' => 'thứ 3', 'wed' => 'thứ 4', 'thu' => 'thứ 5', 'fri' => 'thứ 6', 'sat' => 'thứ 7',
Created attachment 3459 [details] MessagesVi.php.patch This is the patch for the Vietnamese localization which fixes about the date format, and it also applying the contents as stated in the comment 15 at this bug.
And for the code that the localisation structure reform, which was done by Tim, makes the Language class for the Vietnamese localization becomes obsolete and bogus, as the language class file (LanguageVi.php) only contains the information for the Date/time formats, and they are totally replaced by the sprinf date function in the Language.php. Please comment out or delete the LanguageVi.php after the patch have been made.
(In reply to comment #16) > Created an attachment (id=3459) [edit] > MessagesVi.php.patch Applied with r21315, LanguageVi.php deleted.
Sorry, I've been behind on my bugmail, but "sun" should still be "chủ nhật". There's no such thing as "thứ 1".
Created attachment 3460 [details] MessagesVi.php.patch This is the patch that changes the text of 'sun' from "thứ 1" to "chủ nhật".
Also, if you're referring to the changes Tim made around last July, please note that he broke the Vietnamese date handling badly, and only some of the issues have been fixed since. As I noted in comment #14, the word "tháng" (month) is missing throughout the interface, as a result of the changes Tim detailed at [[MW:Date formats]].
(In reply to comment #21) > Also, if you're referring to the changes Tim made around last July, please notethat he broke the Vietnamese date handling badly, and only some of the issueshave been fixed since. As I noted in comment #14, the word "tháng" (month) ismissing throughout the interface, as a result of the changes Tim detailed at[[MW:Date formats]]. I think Tim has failed to remove the old date formats, after the sprintf date format has been introduced. And the date function in the LanguageVi.php overrides the texts which is in the MessagesVi.php and it resulting the results before. The default date format defined in the LanguageVi.php was "day $month năm $year", which this one overrided the original date format in the MessagesVi.php.
"day $month năm $year" ==> "$day $month năm $year" as the missing of the $ sign. :)
Well, I think the issue before was that some parts of the interface -- the ones that currently display the wrong format -- use the month number, whereas the signatures, histories, and logs use the localized month names, which have "tháng" in them. Either MediaWiki consistently uses a format with "tháng" in it and ignores the localized month names -- which is a problem with the date format preferences -- or we get the remaining parts of the interface to use the localized month names instead of the numbers. I'm not sure whether "$month" in your last comment refers to the month number or month name, but whatever MessagesVi.php specifies needs to be consistent, or half the interface will use an incorrect date format. Thanks for paying attention to this bug, by the way.
The $month is refers to the month name, for example when it is in April, the $month for now is rendered as "tháng 4". As before the LanguageVi.php was removed, it's rendered as "$day $month năm $year" => "17 tháng 4 năm 2007".
Created attachment 3462 [details] MWRecentchanges_Vi.png After the removal of the Language class file (LanguageVi.php), the results are shown as this picture, is that the results that Mxn would be expected?
That looks good to me. (I'm assuming Merlin is coming from some other application. :^) But would you mind checking the signature, page history, and log to see that they're the same, and that the Date Formats tab of Special:Preferences agrees with comment #4? I've said "a-okay" a few times already on this bug, only to realize that there are other issues...
Checked, it does not have any problem for the signature, page history and the log, they are the same as the default date and time format. FYI, the Merlin is opened for my IRC application. :)
Created attachment 3465 [details] MWPreferences_Vi.png This is the screenshot that showing the date/time formats in the preferences, when a user language Vi is selected.
Created attachment 3466 [details] MWSignature_Vi.png This is the screenshot that showing the signatures in the page, when the content language Vi is selected.
Created attachment 3467 [details] MWPageHistory_Vi.png This is the screenshot that showing the history in the page, when a user language Vi is selected.
Created attachment 3468 [details] MWLog_Vi.png This is the screenshot that showing the log for the page actions, when a user language Vi is selected.
Looks good, thanks.
(In reply to comment #20) > Created an attachment (id=3460) [edit] > MessagesVi.php.patch > > This is the patch that changes the text of 'sun' from "thứ 1" to "chủ > nhật". Applied with r21326.