Last modified: 2008-09-21 22:36:25 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 T9183, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 7183 - GRAMMAR-like funtionality responding to date/time format.
GRAMMAR-like funtionality responding to date/time format.
Status: RESOLVED FIXED
Product: MediaWiki
Classification: Unclassified
Internationalization (Other open bugs)
unspecified
All All
: Normal minor with 1 vote (vote)
: ---
Assigned To: Purodha Blissenbach
http://ksh.wikipedia.org/wiki/Shpezja...
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2006-08-31 10:29 UTC by Purodha Blissenbach
Modified: 2008-09-21 22:36 UTC (History)
2 users (show)

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


Attachments

Description Purodha Blissenbach 2006-08-31 10:29:12 UTC
In the recent changes list in the Ripuarian WP, we have a line saying at which date/time the 
list starts:

 Zëijsh de nöüje Ännderonge fum 11:49, 31. Määz 2006 aff

that happens to be incorrect with the time preceeding the date but would be fine otherwise.

Since the date/time format is user-selectable, a functionality is needed that allows us to 
choose between different sentences, depending on the date format, e.g. something like:

 {{DATEFMT|1,2,3,4|Zëijsh de nöüje Ännderonge fum $1 Uur aff
          |5,6,7,8|Zëijsh de nöüje Ännderonge fun $1 un do_noh}}

or more comfortable:

 {{DATEFMT|1,2,3,4=Zëijsh de nöüje Ännderonge fum $DATE aff $TIME Uur
          |5,6,7,8=Zëijsh de nöüje Ännderonge fun $TIME Uur om $DATE un do_noh}}

or less comfortable via parser function:

 {{#switch:{{USERDATEFORMAT}}
   |1=...
    ...
   |9=...}}

I assume the latter would be fairly easy to be implemented but requires the use of parser 
functions in the MediaWiki name space, creating an additional dependecy for the languages that 
must use it, effectively banning them from being used on wikis that don't have the parser 
functions extension installed.

If I am right, the numbering would have to be dependant on the current language installation 
which is certainly a drawback. That is imho unflexible since you cannot leave messages 
untranslated when they use this feature, and adding to oraltering the choice of date/time 
formats would have an impact on all those messages. On the other hand one can say, there are 
likely not many messages requiring the feature, and once an installation has been set up, 
changes are unlikely. Nevertheless, a better way to identify date/time formats might be worth 
contemplating.
Comment 1 Niklas Laxström 2008-09-21 10:00:32 UTC
Did the splitting of time and date to different variables solve this problem?
Comment 2 Purodha Blissenbach 2008-09-21 22:35:46 UTC
Yes, I think it does, and it is a lot easier than switching text based on date/time format selections. 

Users still can generally select unusual, strange or foreign date / time *formats*, but that is up to them to cope with, when they appear inside senteces. We do not need to insert grammatical stuff depending on the surrounding sentence *inside* a formatted date, or time - only between them.

I think, there are few messages left, where date and time need to be separated. I'll report, when I spot one. If we can make it a general rule that, inside sentences, date and time should be in separate variables, I suggest to dismiss this bug as "fixed elsewhere".

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


Navigation
Links