Commons talk:Picture of the day/new

From Wikimedia Commons, the free media repository
Jump to navigation Jump to search

The new system[edit]

This requires quite a complicated collection of templates to get it working in a nice multilingual way.

How the system currently works[edit]

  • Template:Potd
    • Implements as {{Potd|width=300|float=right|lang=en}} (variables are self-explanatory).
    • Works by looking up Template:Potd/YYYY-MM-DD which is a page containing just the filename of that day's Potd. It is used by all languages. The caption is read from Template:Potd/YYYY-MM-DD ({lang}) where lang is specified as a variable. This is a page containing that's languages translation of the caption for that day.
  • Template:Potd/YYYY-MM
    • Implements as {{Potd/YYYY-MM|width=300|lang1=en|lang2=de|lang3...|lang6=eo}}.
    • Each of these month templates contains a list of 30/31 implementations of [[Image:{{Potd/YYYY-MM-DD}}|width={width}|{{Potd/YYYY-MM-DD {lang1}}} i.e. every Potd from that month with lang1 language caption. It also gives edit links and lists the captions of languages lang1 ... lang6. (Note that MM, DD take values 1, 2, 3 not 01, 02, 03)
  • Commons:Picture of the day
    • Picture of the day is translated into all languages. The text of these pages should contain translations of the current text on Commons:Picture of the day, an implementation of Template:Potd, an implementation of Template:Potd/YYYY-MM, and links to translated monthly archives generated by:
      {{Potd/Months|lang=en}}

How the system should work[edit]

When mediawiki 1.4 is released, we can use more than 5 implementations of one template in a given page. This means a template can be created for each of the entries on the month pages:

  • Template:Potd/Day
    • Implemented as {{Potd/Day|month=2004-12|day=25|width=300|lang=en}}, which will display the Potd for a given date, its caption in that language, and then links to all the translations of it.

This would mean the month template could then be simply:

  • Template:Potd/YYYY-MM
    • Implements as {{Potd/YYYY-MM|width=300|lang=en}}. Contains a list of implementations of Template:Potd/Day for each day of that month, using lang and width as variables set from the implementation of the month template.
    • Unfortunately this would require 30/31 implementations of the /Day template on one page, which is currently impossible, but it does work in theory:
      {{Potd/Day|month=2004-11|day=25|width=300|lang=en}} produces:

25[edit]

Witch hazel (Hamamelis)

Change image
English : Witch hazel (Hamamelis)
  • Commons:Potd/YYYY-MM (lang)
    • Contains simply the implementation of that month's template in the language used by month, so /2004-12 (en) contains
      {{Potd/Month|year=2004|month=12|lang=en}}
      but /2004-12 (fr) contains
      {{Potd/Month|year=2004|month=12|lang=fr}}
      There's no ambiguity about the month name in the commons page name.