Page MenuHomePhabricator

Log entries are difficult to localize; convert old style logs to the new code
Open, MediumPublic


Author: theevilipaddress

Currently, the only message for localizing the block log entries is [[MediaWiki:Blocklogentry]]. The parameter $2 can be different values here:

*either a timeframe, like 5 days, 6 months
*a date, for example "2010-01-01T00:00:00"

However, often there isn't one word combination that fits them all, even in English. The first one should be "blocked $1 for a timeframe of $2 $3". The second should simply be "blocked $2 indefinitely $3", because "for a timeframe of indefinitely" just sounds bad. The third one then should be "blocked $1 until $2 $3". Thus, this one message should be splitted into these three different messages.

Another problem is that the time isn't properly localized. If an admin decides to block someone for an unusual timeframe and writes "6 minutes" into the form, then "6 minutes" will not be localized in the block log entry. The same goes for dates, which are always in the YYYY-MM-DDTHH:MM:SS format, even if that's not the user's preferred date format.



Related Objects

Resolved Fabrice_Florin

Event Timeline

bzimport raised the priority of this task from to Medium.Nov 21 2014, 11:11 PM
bzimport set Reference to bz24620.
bzimport added a subscriber: Unknown Object (MLST).
bzimport created this task.Aug 1 2010, 9:13 AM

I agree. The block log should be modernized to store enough data to allow more dynamic translations. Increasing severity.

Increasing priority again.

Rewrite done, but each type needs a conversion. Using this as a tracking bug for now.

(In reply to comment #3)

Rewrite done, but each type needs a conversion. Using this as a tracking bug
for now.

As you're not going to fix the blockers yourself, where are the instructions to do so? Is [[mw:Manual:Logging to Special:Log]] the correct page to direct people to for code standards, l10n best practices, word order and parameters etc.?

jan added a comment.Oct 28 2012, 4:35 PM

With [[gerrit:29279]] there are some types added to the LogFormatter-class.

jan added a comment.Nov 4 2012, 6:04 PM

In [[gerrit:31067]] I add some tests for LogFormatter.

Patch sets were merged briefly, but broke several extensions because LogFormatter::getMessageParameters was changed from protected to public (Interwiki, AbuseFilter, RenameUser). Changing the extensions, will cause problems with BC.

Sam and I decided that reverting is the sanest thing to do right now, because he'll be making the next 1.21wmf branch tomorrow, and having this code in, would unnecessarily complicate things for him.

I also advise to add the logic and test cases in the same change set on the next try.

jan added a comment.Dec 11 2012, 6:36 PM

I have fixed the problems of the changes and upload a new change:

jan added a comment.Dec 12 2012, 11:03 AM

For documantation: gerrit:38137 was merged

Looks like Umherirrender will get this fixed by 1.25. :) (let's remember to update it when we close this).

demon set Security to None.
demon added a subscriber: demon.

Would've been good to have, and the pieces fixed will definitely be worth including. Won't make it for 1.25 though.

Restricted Application added a subscriber: Aklapper. · View Herald TranscriptJul 23 2015, 12:10 PM
demon removed a subscriber: demon.Aug 19 2015, 4:41 PM
Meno25 removed a subscriber: Meno25.Feb 19 2016, 5:43 PM
Amire80 moved this task from Untriaged to Gender on the I18n board.Feb 4 2018, 10:38 AM