Last modified: 2007-04-17 15:18:39 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T8910, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 6910 - Dates in Vietnamese localization broken
Dates in Vietnamese localization broken
Status: RESOLVED FIXED
Product: MediaWiki
Classification: Unclassified
Internationalization (Other open bugs)
1.8.x
All All
: Normal major with 4 votes (vote)
: ---
Assigned To: Nobody - You can work on this!
http://lists.wikimedia.org/pipermail/...
: patch
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2006-08-03 04:14 UTC by Minh Nguyễn
Modified: 2007-04-17 15:18 UTC (History)
0 users

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments
MessagesVi.php.patch (2.66 KB, patch)
2007-04-17 05:11 UTC, Shinjiman
Details
MessagesVi.php.patch (381 bytes, patch)
2007-04-17 06:29 UTC, Shinjiman
Details
MWRecentchanges_Vi.png (130.20 KB, image/x-png)
2007-04-17 07:38 UTC, Shinjiman
Details
MWPreferences_Vi.png (141.68 KB, image/x-png)
2007-04-17 14:52 UTC, Shinjiman
Details
MWSignature_Vi.png (123.32 KB, image/x-png)
2007-04-17 15:05 UTC, Shinjiman
Details
MWPageHistory_Vi.png (136.60 KB, image/x-png)
2007-04-17 15:05 UTC, Shinjiman
Details
MWLog_Vi.png (159.11 KB, image/x-png)
2007-04-17 15:06 UTC, Shinjiman
Details

Description Minh Nguyễn 2006-08-03 04:14:11 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.
Comment 1 Minh Nguyễn 2006-08-03 05:20:19 UTC
This bug also affects signatures and the timestamp at the bottom of every article.
Comment 2 Shinjiman 2006-08-03 09:11:54 UTC
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.
Comment 3 Shinjiman 2006-08-03 09:35:54 UTC
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.
Comment 4 Minh Nguyễn 2006-08-05 05:11:35 UTC
(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.
Comment 5 Minh Nguyễn 2006-08-05 05:14:54 UTC
To clarify, this would mean that {{CURRENTMONTHABBREV}} would return
[[MediaWiki:Aug]] (tháng 8) and {{CURRENTMONTHNAME}} would return
[[MediaWiki:August]] (tháng Tám).
Comment 6 Clytie Siddall 2006-08-11 11:43:04 UTC
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
Comment 7 Niklas Laxström 2006-11-28 17:02:19 UTC
First try to fix: r17977. Please verify.
Comment 8 Minh Nguyễn 2006-11-28 18:56:33 UTC
Yep, everything looks good to me.
Comment 9 Minh Nguyễn 2006-11-28 19:00:22 UTC
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.)
Comment 10 Niklas Laxström 2006-11-28 19:05:42 UTC
Signatures use the default date format, which would be 12:34, ngày 15 tháng 1
năm 2001.
Comment 11 Minh Nguyễn 2006-11-28 19:07:44 UTC
Okay then, sounds good. Again. :)
Comment 12 Minh Nguyễn 2006-12-05 10:56:39 UTC
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.".
Comment 13 Rotem Liss 2006-12-05 15:00:10 UTC
The problem of {{CURRENTMONTHNAME}} should be solved by using
{{CURRENTMONTHNAMEGEN}}, which uses the genitive form. I don't understand the
other problems, please clarify.
Comment 14 Minh Nguyễn 2006-12-05 22:41:48 UTC
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.
Comment 15 Shinjiman 2007-04-13 18:25:39 UTC
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',
Comment 16 Shinjiman 2007-04-17 05:11:17 UTC
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.
Comment 17 Shinjiman 2007-04-17 05:14:48 UTC
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.
Comment 18 Raimond Spekking 2007-04-17 05:53:20 UTC
(In reply to comment #16)
> Created an attachment (id=3459) [edit]
> MessagesVi.php.patch

Applied with r21315, LanguageVi.php deleted.
Comment 19 Minh Nguyễn 2007-04-17 06:25:16 UTC
Sorry, I've been behind on my bugmail, but "sun" should still be "chủ nhật".
There's no such thing as "thứ 1".
Comment 20 Shinjiman 2007-04-17 06:29:42 UTC
Created attachment 3460 [details]
MessagesVi.php.patch

This is the patch that changes the text of 'sun' from "thứ 1" to "chủ
nhật".
Comment 21 Minh Nguyễn 2007-04-17 06:32:21 UTC
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]].
Comment 22 Shinjiman 2007-04-17 06:38:48 UTC
(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.
Comment 23 Shinjiman 2007-04-17 06:40:19 UTC
"day $month năm $year" ==> "$day $month năm $year"

as the missing of the $ sign. :)
Comment 24 Minh Nguyễn 2007-04-17 07:25:44 UTC
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.
Comment 25 Shinjiman 2007-04-17 07:31:52 UTC
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".
Comment 26 Shinjiman 2007-04-17 07:38:15 UTC
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?
Comment 27 Minh Nguyễn 2007-04-17 07:44:01 UTC
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...
Comment 28 Shinjiman 2007-04-17 08:00:34 UTC
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. :)
Comment 29 Shinjiman 2007-04-17 14:52:16 UTC
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.
Comment 30 Shinjiman 2007-04-17 15:05:14 UTC
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.
Comment 31 Shinjiman 2007-04-17 15:05:59 UTC
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.
Comment 32 Shinjiman 2007-04-17 15:06:37 UTC
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.
Comment 33 Minh Nguyễn 2007-04-17 15:08:43 UTC
Looks good, thanks.
Comment 34 Raimond Spekking 2007-04-17 15:18:39 UTC
(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.

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links