Page MenuHomePhabricator

Allow per-wiki configuration of section month titles
Open, LowPublic

Description

Currently the names of the topics that the script creates are hardcoded and there is no way to change them. This leads to the creation of strange titles.

Steps to replicate the issue (include links if applicable):

What happens?:
A very strange title appears: xg Y, where month is in the wrong case. Ruwiki has a different practice of naming titles.

image.png (251×1 px, 24 KB)

What should have happened instead?:
The header must be formed according to the rules specified in the local configuration file.

Event Timeline

Iniquity renamed this task from Transfer the tiles of created topics by UV to the configuration to Move rules for titles of topics created by UV to the local configuration file.Jul 6 2025, 7:10 PM

This is currently handled with a helper function (src/util/getMonthHeader.ts).

Month is retrieved from mw.language.months.genitive[date.getUTCMonth()]. This should be where the unexpected casing is coming from.

mw.language.months docs - seems like .names rather than .genitive should be used here. If you run mw.language.months.names[0] in your browser console on ruwiki does that give you the expected casing for January?

However layout should be done with i18n anyway, e.g. $1 $2 for en where $1 is month and $2 is year. Something to keep in mind for rewrite

Although there is a point that section title layout is not strictly language-based but by local wiki convention - hence it could be in local config instead of i18n.

Sportzpikachu renamed this task from Move rules for titles of topics created by UV to the local configuration file to Allow per-wiki configuration of section month titles.Jul 7 2025, 2:56 AM

Perhaps there should be a separate title for each type of warning.

"vandalism": {
	"name": "Vandalism",
	"category": "common",
	"template": "uw-vandalism",
	"type": "tiered",
	"levels": [
		1,
		2,
		3,
		4,
		5
		],
	"summary": {
		"1": "Destructive editing",
		"2": "Destructive editing"
	}
	"title":"Warning: xg Y"
},
Sportzpikachu moved this task from Needs Triaging to Backlog on the Ultraviolet board.