Jump to content

Talk:Tech/Read-only limited announcement

Add topic
From Meta, a Wikimedia project coordination wiki
  How to change the time format in the message
Context

The first translation unit looks like A maintenance operation will be performed on [$time {{#time:$defaultformat|$date|$format_language_code}}].

It is now possible to change how the date of the operation is displayed in this message. By date, we mean:

  • the number of the day
  • the name of the month
  • the year
  • the UTC time of the operation, in hours and minutes

The default date looks like: "Sunday 02 June 14:02 UTC."

Change the date format

If the default is not in the correct order for your language, you can change how it is displayed by ONLY editing the $defaultformat parameter when working on translations. Do this only if you know what you are doing. Do not change any other parameter.

To change the $defaultformat parameter, please use Time parameters supported by the ParserFunctions. The default format is l d F H:i e.

Here is an example with French language : Une opération de maintenance aura lieu le [$time {{#time:l j F Y "à" G"h"i e|$date|$format_language_code}}]. The result is:

Une opération de maintenance aura lieu le dimanche 2 juin 2024 à 14h02 UTC.

Do not change the hour to align it to your local timezone! This timezone may not be the same one for others. As you noticed in the example, we provide a link to a Toolforge service that provides the time conversion.

Being assisted to do the changes

If you know the format for your language, but you prefer to have someone more experienced doing it for you, please:

  1. do all translations using the default parameters provided,
  2. start a new topic below explaining how the date and time should be ordered for your language.
If you have any other questions, please start a new topic below.