From 7e08a8b74277da4f6da69855e52c7d69695fbd77 Mon Sep 17 00:00:00 2001 From: umherirrender Date: Mon, 4 Aug 2014 17:25:11 +0200 Subject: [PATCH] Add gender for upload log entries With Icd8662ecb9eb0f6c0ff9841bdbd5736d6dd0d015 the log for uploads was migrated to the new system, but no formatter was set to use the new system also on Special:Log. There is no need for an extra formatter class, because at the moment there is nothing extra to format. Added the new messages and adjust them. Now upload logs supports gender. The old messages are kept for IRC where there were already in use. This also hide the params added with Icd8662ecb9eb0f6c0ff9841bdbd5736d6dd0d015 on Special:Log, because there are not needed for i18n. Change-Id: Idf281898d8a5a023a0b9ce3bc90b3ca55c1a6376 --- includes/DefaultSettings.php | 6 +++--- languages/i18n/en.json | 3 +++ languages/i18n/qqq.json | 7 +++++-- 3 files changed, 11 insertions(+), 5 deletions(-) diff --git a/includes/DefaultSettings.php b/includes/DefaultSettings.php index dea6e716d5..cf6a95d0f7 100644 --- a/includes/DefaultSettings.php +++ b/includes/DefaultSettings.php @@ -6610,9 +6610,6 @@ $wgLogActions = array( 'protect/modify' => 'modifiedarticleprotection', 'protect/unprotect' => 'unprotectedarticle', 'protect/move_prot' => 'movedarticleprotection', - 'upload/upload' => 'uploadedimage', - 'upload/overwrite' => 'overwroteimage', - 'upload/revert' => 'uploadedimage', 'import/upload' => 'import-logentry-upload', 'import/interwiki' => 'import-logentry-interwiki', 'merge/merge' => 'pagemerge-logentry', @@ -6639,6 +6636,9 @@ $wgLogActionsHandlers = array( 'patrol/patrol' => 'PatrolLogFormatter', 'rights/rights' => 'RightsLogFormatter', 'rights/autopromote' => 'RightsLogFormatter', + 'upload/upload' => 'LogFormatter', + 'upload/overwrite' => 'LogFormatter', + 'upload/revert' => 'LogFormatter', ); /** diff --git a/languages/i18n/en.json b/languages/i18n/en.json index d506ad2371..c99d5b743d 100644 --- a/languages/i18n/en.json +++ b/languages/i18n/en.json @@ -3400,6 +3400,9 @@ "logentry-rights-rights": "$1 {{GENDER:$2|changed}} group membership for $3 from $4 to $5", "logentry-rights-rights-legacy": "$1 {{GENDER:$2|changed}} group membership for $3", "logentry-rights-autopromote": "$1 was automatically {{GENDER:$2|promoted}} from $4 to $5", + "logentry-upload-upload": "$1 {{GENDER:$2|uploaded}} $3", + "logentry-upload-overwrite": "$1 {{GENDER:$2|uploaded}} a new version of $3", + "logentry-upload-revert": "$1 {{GENDER:$2|uploaded}} $3", "rightsnone": "(none)", "revdelete-logentry": "changed revision visibility of \"[[$1]]\"", "logdelete-logentry": "changed event visibility of \"[[$1]]\"", diff --git a/languages/i18n/qqq.json b/languages/i18n/qqq.json index 9a1d2e12e2..a657debce7 100644 --- a/languages/i18n/qqq.json +++ b/languages/i18n/qqq.json @@ -1468,8 +1468,8 @@ "uploadwarning": "Used as section header in [[Special:Upload]].", "uploadwarning-text": "Used in [[Special:Upload]].", "savefile": "When uploading a file", - "uploadedimage": "This is the text of an entry in the [[Special:Log|upload log]] (and Recent Changes), after hour (and date, only in the Upload log) and user name. $1 is the name of the file uploaded.", - "overwroteimage": "This is the text of an entry in the [[Special:Log|upload log]] (and Recent Changes), after hour (and date, only in the Upload log) and user name. $1 is the name of the file uploaded.", + "uploadedimage": "{{ignored}}This is ''logentry'' message only used on IRC. $1 is the name of the file uploaded.", + "overwroteimage": "{{ignored}}This is ''logentry'' message only used on IRC. $1 is the name of the file uploaded.", "uploaddisabled": "Title of the [[Special:Upload]] page when upload is disabled.\n\nSee also:\n* {{msg-mw|Copyuploaddisabled}}", "copyuploaddisabled": "See also:\n* {{msg-mw|Uploaddisabled}}", "uploaddisabledtext": "Parameters:\n* $1 - (Optional) the name of the target file. See r22243 and [[bugzilla:8818|bug 8818]].", @@ -3562,6 +3562,9 @@ "logentry-rights-rights": "* $1 - username\n* $2 - (see below)\n* $3 - username\n* $4 - list of user groups or {{msg-mw|Rightsnone}}\n* $5 - list of user groups or {{msg-mw|Rightsnone}}\n----\n{{Logentry|[[Special:Log/rights]]}}", "logentry-rights-rights-legacy": "* $1 - username\n* $2 - (see below)\n* $3 - username\n----\n{{Logentry|[[Special:Log/rights]]}}", "logentry-rights-autopromote": "* $1 - username\n* $2 - (see below)\n* $3 - (see below)\n* $4 - comma separated list of old user groups or {{msg-mw|Rightsnone}}\n* $5 - comma separated list of new user groups\n----\n{{Logentry|[[Special:Log/rights]]}}", + "logentry-upload-upload": "{{Logentry|[[Special:Log/upload]]}}", + "logentry-upload-overwrite": "{{Logentry|[[Special:Log/upload]]}}", + "logentry-upload-revert": "{{Logentry|[[Special:Log/upload]]}}", "rightsnone": "Default rights for registered users.\n\n{{Identical|None}}", "revdelete-logentry": "{{RevisionDelete}}\nThis is the message for the log entry in [[Special:Log/delete]] when changing visibility restrictions for page revisions.\n\nFollowed by the message {{msg-mw|revdelete-log-message}} in brackets.\n\nPreceded by the name of the user doing this task.\n\nParameters:\n* $1 - the page name\nSee also:\n* {{msg-mw|Logdelete-logentry}}", "logdelete-logentry": "{{RevisionDelete}}\nThis is the message for the log entry in [[Special:Log/delete]] when changing visibility restrictions for log events.\n\nFollowed by the message {{msg-mw|logdelete-log-message}} in brackets.\n\nPreceded by the name of the user who did this task.\n\nParameters:\n* $1 - the log name in brackets\nSee also:\n* {{msg-mw|Revdelete-logentry}}", -- 2.20.1