https://bugzilla.wikimedia.org/show_bug.cgi?id=25476

--- Comment #27 from Philippe Verdy <[email protected]> ---
Note that using the existing #dateformat function would effectively make edits
very ugly, due to its existing syntax, which should be simplified in
discussions. But that's exeactly the place where a template that internally
uses the parser function could help (yes it will have parameters but these
parameters should still be easy to interpret when editing, and should be as
compact as possible).

May be a single parameter using ISO 8601 syntax would be enough.
Initially I proposed:
  {{datetime|2011|12|31|23|59}}
But this could as well just be:
  {{int:datetime|2011-12-31T23:59Z}}
or without even using any shared template a parserfunction dedicated to the
default formatting of datetimes timestamps in message signatures:
  {{#datetime:2011-12-31T23:59Z}}
Or if the wiki already knows how to parse date using the localized format
already generated for the default language of the wiki:
  {{#datetime:31 décembre 2011 23:59 UTC}}
(of course, this last example would be for a wiki whose default language is
French here). It just explicitly insert the markup that this is a date and most
contributors of the wiki will be able to interpret it. And then it generates
the correct format localized in the user language.

Using first a template-based solution (named using a consistant naming in the
MediaWiki "int:" namespace which is already dedicated to its
internationalization) could allow experimentation for seeing the impact on
caches (the template will choose whever to use, or not, the user's language or
just use the default language of the wiki; date formating rules would then be
imported in this "int:" namespace only for languages supported by the wiki, and
a monolingual wiki would just have a single rule in this namespace for its own
default language).

----

Another improvement could be that, when editing the page, the content of the
#timestamp parameter would also be reformatted in the language of the editing
user; then reparsed when saving the edit using the user's locale and
reformatting it in the wiki's default language.

But I fear that this behavior could have potential defects in some pages if
such transforms of the edited text are applied automatically and silently when
saving the edited message. My opinion is that the edited page should just
contain a static date format, even if it will be reformatted when only viewing
the page according to user's language.

-- 
You are receiving this mail because:
You are the assignee for the bug.
You are watching all bug changes.
_______________________________________________
Wikibugs-l mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/wikibugs-l

Reply via email to