Rename remaining Reference Previews i18n keys

This is just a minor optimization. The keys should now all follow
the schema for Reference Previews in this extension.

I'm not touching the `popups-prefs-conflicting-gadgets-info` key.
That one was not copied over to this codebase and IMO we could
really remove it for the reasons in that comment.

Bug: T355194
Change-Id: I1948cf0aaca4d0ab3676bac806c7287568db8712
This commit is contained in:
WMDE-Fisch 2024-10-08 12:06:58 +02:00
parent b43b3546e8
commit ad56220cc4
4 changed files with 17 additions and 18 deletions

View file

@ -49,6 +49,10 @@
"cite-reference-previews-note": "Note",
"cite-reference-previews-web": "Web reference",
"cite-reference-previews-collapsible-placeholder": "This reference includes a figure which does not fit in the preview.",
"cite-reference-previews-gadget-conflict-info-navpopups": "You have the [[$1|Navigation popups]] gadget enabled, so you won't see previews provided by this feature. Depending on your wiki, the gadget may have a slightly different name. If you continue to experience issues, please review your gadgets and user scripts, including global ones.",
"cite-reference-previews-gadget-conflict-info-reftooltips": "You have the [[$1|Reference Tooltips]] gadget enabled, so you won't see reference previews but will still see page previews. Depending on your wiki, the gadget may have a slightly different name. If you continue to experience issues, please review your gadgets and user scripts, including global ones.",
"cite-reference-previews-gadget-conflict-info-navpopups-reftooltips": "You have the [[$1|Navigation popups]] and [[$1|Reference Tooltips]] gadgets enabled, so you won't see previews provided by this feature. Depending on your wiki, the gadgets may have slightly different names. If you continue to experience issues, please review your gadgets and user scripts, including global ones.",
"cite-reference-previews-preference-label": "Enable reference previews (get quick previews of a reference while reading a page)",
"cite_reference_backlink_symbol": "↑",
"cite_reference_link": "<sup id=\"$1\" class=\"reference\">[[#$2|<span class=\"cite-bracket\">&#91;</span>$3<span class=\"cite-bracket\">&#93;</span>]]</sup>",
"cite_references_link_one": "<li id=\"$1\"$4><span class=\"mw-cite-backlink\">[[#$2|↑]]</span> $3</li>",
@ -80,9 +84,5 @@
"cite-wikieditor-help-content-reference-example-ref-reuse": "<ref name=\"$1\" />",
"cite-wikieditor-help-content-reference-example-ref-extends": "<ref extends=\"$1\">$2</ref>",
"cite-wikieditor-help-content-reference-example-ref-result": "[$1]",
"cite-wikieditor-help-content-reference-example-reflist": "<references />",
"popups-prefs-navpopups-gadget-conflict-info": "You have the [[$1|Navigation popups]] gadget enabled, so you won't see previews provided by this feature. Depending on your wiki, the gadget may have a slightly different name. If you continue to experience issues, please review your gadgets and user scripts, including global ones.",
"popups-prefs-reftooltips-and-navpopups-gadget-conflict-info": "You have the [[$1|Navigation popups]] and [[$1|Reference Tooltips]] gadgets enabled, so you won't see previews provided by this feature. Depending on your wiki, the gadgets may have slightly different names. If you continue to experience issues, please review your gadgets and user scripts, including global ones.",
"popups-prefs-reftooltips-gadget-conflict-info": "You have the [[$1|Reference Tooltips]] gadget enabled, so you won't see reference previews but will still see page previews. Depending on your wiki, the gadget may have a slightly different name. If you continue to experience issues, please review your gadgets and user scripts, including global ones.",
"popups-refpreview-user-preference-label": "Enable reference previews (get quick previews of a reference while reading a page)"
"cite-wikieditor-help-content-reference-example-reflist": "<references />"
}

View file

@ -54,6 +54,10 @@
"cite-reference-previews-note": "Heading for a popup previewing a footnote.\n{{Identical|Note}}",
"cite-reference-previews-web": "Heading for a popup previewing a citation from a website.\n{{Identical|Website}}",
"cite-reference-previews-collapsible-placeholder": "Placeholder text for collapsible tables, templates, or other large elements inside of a reference.",
"cite-reference-previews-gadget-conflict-info-navpopups": "Help message telling to disable the \"Navigation popups\" gadget in order to allow page and reference previews. The word \"Gadgets\" should be based on {{msg-mw|prefs-gadgets}}.\n\nParameters:\n* $1 Link to the Gadgets tab in the user's preferences",
"cite-reference-previews-gadget-conflict-info-navpopups-reftooltips": "Help message telling to disable the \"Navigation popups\" and \"Reference Tooltips\" gadgets in order to allow page and reference previews. The word \"Gadgets\" should be based on {{msg-mw|prefs-gadgets}}.\n\nParameters:\n* $1 Link to the Gadgets tab in the user's preferences",
"cite-reference-previews-gadget-conflict-info-reftooltips": "Help message telling to disable the \"Reference Tooltips\" gadget in order to allow reference previews. The word \"Gadgets\" should be based on {{msg-mw|prefs-gadgets}}.\n\nParameters:\n* $1 Link to the Gadgets tab in the user's preferences",
"cite-reference-previews-preference-label": "Label for the user option to enable or disable reference preview popups",
"cite_reference_backlink_symbol": "{{optional}}\nSymbol used for the reference section, used to link back to where the reference is used.",
"cite_reference_link": "{{notranslate}}\n\nParameters:\n* $1 - ref key\n* $2 - references key\n* $3 - link label",
"cite_references_link_one": "{{notranslate}}\n\nParameters:\n* $1 - references key\n* $2 - ref key\n* $3 - reference text\n* $4 - optional CSS class for direction",
@ -85,9 +89,5 @@
"cite-wikieditor-help-content-reference-example-ref-reuse": "{{ignored}}",
"cite-wikieditor-help-content-reference-example-ref-extends": "{{ignored}}",
"cite-wikieditor-help-content-reference-example-ref-result": "{{ignored}}",
"cite-wikieditor-help-content-reference-example-reflist": "{{ignored}}",
"popups-prefs-navpopups-gadget-conflict-info": "Help message telling to disable the \"Navigation popups\" gadget in order to allow page and reference previews. The word \"Gadgets\" should be based on {{msg-mw|prefs-gadgets}}.\n\nParameters:\n* $1 Link to the Gadgets tab in the user's preferences",
"popups-prefs-reftooltips-and-navpopups-gadget-conflict-info": "Help message telling to disable the \"Navigation popups\" and \"Reference Tooltips\" gadgets in order to allow page and reference previews. The word \"Gadgets\" should be based on {{msg-mw|prefs-gadgets}}.\n\nParameters:\n* $1 Link to the Gadgets tab in the user's preferences",
"popups-prefs-reftooltips-gadget-conflict-info": "Help message telling to disable the \"Reference Tooltips\" gadget in order to allow reference previews. The word \"Gadgets\" should be based on {{msg-mw|prefs-gadgets}}.\n\nParameters:\n* $1 Link to the Gadgets tab in the user's preferences",
"popups-refpreview-user-preference-label": "Label for the user option to enable or disable reference preview popups"
"cite-wikieditor-help-content-reference-example-reflist": "{{ignored}}"
}

View file

@ -186,7 +186,7 @@ class CiteHooks implements
public function onGetPreferences( $user, &$prefs ) {
$option = [
'type' => 'toggle',
'label-message' => 'popups-refpreview-user-preference-label',
'label-message' => 'cite-reference-previews-preference-label',
// FIXME: This message is unnecessary and unactionable since we already
// detect specific gadget conflicts.
'help-message' => 'popups-prefs-conflicting-gadgets-info',
@ -197,15 +197,15 @@ class CiteHooks implements
$isRefTooltipsGadgetEnabled = $this->gadgetsIntegration->isRefTooltipsGadgetEnabled( $user );
if ( $isNavPopupsGadgetEnabled && $isRefTooltipsGadgetEnabled ) {
$option[ 'disabled' ] = true;
$option[ 'help-message' ] = [ 'popups-prefs-reftooltips-and-navpopups-gadget-conflict-info',
$option[ 'help-message' ] = [ 'cite-reference-previews-gadget-conflict-info-navpopups-reftooltips',
'Special:Preferences#mw-prefsection-gadgets' ];
} elseif ( $isNavPopupsGadgetEnabled ) {
$option[ 'disabled' ] = true;
$option[ 'help-message' ] = [ 'popups-prefs-navpopups-gadget-conflict-info',
$option[ 'help-message' ] = [ 'cite-reference-previews-gadget-conflict-info-navpopups',
'Special:Preferences#mw-prefsection-gadgets' ];
} elseif ( $isRefTooltipsGadgetEnabled ) {
$option[ 'disabled' ] = true;
$option[ 'help-message' ] = [ 'popups-prefs-reftooltips-gadget-conflict-info',
$option[ 'help-message' ] = [ 'cite-reference-previews-gadget-conflict-info-reftooltips',
'Special:Preferences#mw-prefsection-gadgets' ];
}

View file

@ -92,7 +92,7 @@ class CiteHooksTest extends \MediaWikiIntegrationTestCase {
$expected = [
'popups-reference-previews' => [
'type' => 'toggle',
'label-message' => 'popups-refpreview-user-preference-label',
'label-message' => 'cite-reference-previews-preference-label',
'help-message' => 'popups-prefs-conflicting-gadgets-info',
'section' => 'rendering/reading'
]
@ -112,10 +112,9 @@ class CiteHooksTest extends \MediaWikiIntegrationTestCase {
$expected = [
'popups-reference-previews' => [
'type' => 'toggle',
'label-message' => 'popups-refpreview-user-preference-label',
// 'help-message' => 'popups-prefs-conflicting-gadgets-info',
'label-message' => 'cite-reference-previews-preference-label',
'help-message' => [
'popups-prefs-navpopups-gadget-conflict-info',
'cite-reference-previews-gadget-conflict-info-navpopups',
'Special:Preferences#mw-prefsection-gadgets',
],
'section' => 'rendering/reading',