Page MenuHomePhabricator

Italian translation uses parser functions in lastmodifiedat message
Closed, ResolvedPublicBUG REPORT

Description

https://github.com/wikimedia/mediawiki/blob/1.37.2/languages/i18n/it.json#L350

In 1.37.2 the it translation of mediawiki is using parser functions in the lastmodifiedat message. This will be broken on installations without parser functions extension installed. i18n messages must not rely on any extensions but only core syntax.

Reported at https://www.mediawiki.org/wiki/Topic:Wtajdajxhrv719qy

Event Timeline

matmarex renamed this task from Italian translation uses parser functions in lastmodifieddat message to Italian translation uses parser functions in lastmodifiedat message.Apr 8 2022, 9:33 PM
matmarex updated the task description. (Show Details)

I looked at other messages in core to see how other similar messages are handled.

The message you mentioned is the only message with the switch/padleft (added in this edit: https://translatewiki.net/w/i.php?title=MediaWiki:Lastmodifiedat/it&diff=prev&oldid=10419089):

	"lastmodifiedat": "Questa pagina è stata modificata per l'ultima volta {{#switch:{{padleft:|2|$1}}|8|11|8-|8/|8.|08=l'|#default=il }}$1 alle $2.",

There are a few messages with time and date that don't do anything fancy, and presumably they're grammatically incorrect:

	"emailauthenticated": "L'indirizzo email è stato confermato il $2 alle $3.",
	"usercreated": "{{GENDER:$3|Creato/a}} il $1 alle $2",
	"undelete-revision": "Versione cancellata della pagina $1, inserita il $4 alle $5 da $3:",
	"lockedbyandtime": "(da $1 il $2 alle $3)",
	"lastmodifiedatby": "Questa pagina è stata modificata per l'ultima volta il $1 alle $2 da $3.",

A few are also phrased differently with "del" instead of "il", I don't know whether that is correct or not:

	"revision-info": "Versione del $4 alle $5 di {{GENDER:$6|$2}}$7",
	"revdelete-show-file-confirm": "Si desidera visualizzare la versione cancellata del file \"<nowiki>$1</nowiki>\" del $2 alle $3?",
	"wlnote": "Di seguito {{PLURAL:$1|è elencata la modifica più recente apportata|sono elencate le <strong>$1</strong> modifiche più recenti apportate}} {{PLURAL:$2|nella scorsa ora|nelle scorse <strong>$2</strong> ore}}; i dati sono aggiornati alle $4 del $3.",
	"undelete-show-file-confirm": "Si desidera visualizzare la versione cancellata del file \"<nowiki>$1</nowiki>\" del $2 alle $3?",

But there's also this, using PLURAL instead to accomplish the same effect (added in: https://translatewiki.net/w/i.php?title=MediaWiki:Protect-expiring/it&diff=prev&oldid=9371872 https://translatewiki.net/w/i.php?title=MediaWiki:Protect-expiring-local/it&diff=prev&oldid=9371885 by @Sakretsu):

	"protect-expiring": "scade {{PLURAL:$2|1=l'$2|8=l'$2|11=l'$2|il $2}} alle $3 (UTC)",
	"protect-expiring-local": "scade {{PLURAL:$2|1=l'$2|8=l'$2|11=l'$2|il $2}} alle $3 (UTC)",

I am surprised that this works (actually, someone should check that it really works). But if it does, perhaps we can just use it for all of these messages?

Reedy subscribed.

With translation backports happening weekly, it just needs fixing on translatewiki, and it will be fixed in all release branches within a week

I've updated the lastmodifiedat message but I can't quite remember how I came up with that solution. Weirdly enough it does work though.

MarkAHershberger subscribed.

no longer a blocker for 1.38 because it is updated on twn

Reedy assigned this task to Sakretsu.