Last modified: 2011-12-10 08:11:03 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 T32619, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 30619 - Date formatting for Finnish is wrong
Date formatting for Finnish is wrong
Status: RESOLVED FIXED
Product: MediaWiki extensions
Classification: Unclassified
Semantic MediaWiki (Other open bugs)
unspecified
All All
: High enhancement with 1 vote (vote)
: ---
Assigned To: Jeroen De Dauw
: i18n
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2011-08-29 17:26 UTC by Niklas Laxström
Modified: 2011-12-10 08:11 UTC (History)
4 users (show)

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


Attachments
New format type mediawiki (2.24 KB, patch)
2011-12-09 13:53 UTC, Niklas Laxström
Details

Description Niklas Laxström 2011-08-29 17:26:53 UTC
Why doesn't SMW use MediaWiki's date formatting methods?
Comment 1 Jeroen De Dauw 2011-08-29 17:36:48 UTC
I'm not completely sure as Markus wrote this code, but as I understand it, SMW supports date formats that MW does not. It's probably possible to make more use of MediaWikis native data handling though. There is some TODO in the code of the date handling class about that. Since the latest version, some MW parsing methods are used, so that's already a start of such changes.

If anyone wants to tackle this, feel free I'd say. If you know how MWs data handling shizzle, you can do this.
Comment 2 Niklas Laxström 2011-08-29 17:38:25 UTC
I know MW but not SMW so much.
Comment 3 Jeroen De Dauw 2011-08-29 17:51:47 UTC
The parsing and formatting code is all here: http://svn.wikimedia.org/viewvc/mediawiki/trunk/extensions/SemanticMediaWiki/includes/datavalues/SMW_DV_Time.php?view=markup

When changes are made, care will need to be taken not to break currently supported behavior. Now I think about it, we really ought to have unit tests for the DataValue classes.
Comment 4 Niklas Laxström 2011-08-29 17:52:56 UTC
What behavior could rely on how the dates are *displayed*?
Comment 5 Jeroen De Dauw 2011-08-29 17:54:21 UTC
Well, if SMW supports formats that MW does not, and you break support of these formats, people that want their dates shown in these will get mad at you :)
Comment 6 Niklas Laxström 2011-08-29 17:55:59 UTC
Well yes, that of course :)
Comment 7 Niklas Laxström 2011-12-09 13:53:00 UTC
Created attachment 9645 [details]
New format type mediawiki

Can you check the patch. I introduced a new format #mediawiki which uses mediawiki i18n functions. It can't handle all dates but that isn't a problem in most cases.
Comment 8 Niklas Laxström 2011-12-09 16:14:30 UTC
Patch committed in r105676.
Comment 9 [[kgh]] 2011-12-09 18:59:44 UTC
Great, I just tested it. That is a nice enhancement depending on $wgLanguageCode. I does not really matter but perhaps #mw would be sufficient to set this format for the printout request.
Comment 10 Niklas Laxström 2011-12-10 08:11:03 UTC
From user's point of view neither mw nor mediawiki doesn't make sense. It's a implementation detail and they are only looking for pretty formatting that works in their language.

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


Navigation
Links