MediaWiki talk:Gadget-relateditems.js

From Wikidata
Jump to navigation Jump to search

French translation[edit]

           fr: {
               'title': 'Déclarations dérivées',
               'more': 'plus',
               'inverse': 'inverse',
               'show-inverse': 'voir les déclarations dérivées',
               'no-result': 'pas de résultats',
               'loading': 'chargement...'
           }
✓ Done --Pasleim (talk) 14:51, 13 August 2019 (UTC)[reply]

Norwegian translation[edit]

           nb: {
               'title': 'avledet-utsagn',
               'more': 'mer',
               'inverse': 'invers',
               'show-inverse': 'vis inverse utsagn',
               'no-result': 'ingen resultat',
               'loading': 'laster...'
           },

- Premeditated (talk) 09:50, 23 January 2020 (UTC)[reply]

✓ Done --Pasleim (talk) 16:55, 23 January 2020 (UTC)[reply]

Feature request - limit the number of items displayed per statement type, allowing all inverse property labels to become visible[edit]

Hi there! Not sure I'm explaining this very well, but here goes: Since only a limited number of statements get shown before you display the "+ more" link, an item with lots of derived statements of one type will effectively block out everything else. It would be useful if every type of derived statement gets shown, with a "display more" link after each block of max 20, or some other number you see fit.

A (random) example: A name like Q19801116 has 1000+ name bearers. This means only "part of" gets shown, before inverse label Q66310621 runs out the limit and prevents all other statements coming after it from being displayed. If we capped the number of "bearers of this name" to some reasonable number, we would be able to display all the others as well.

Moebeus (talk) 00:39, 28 January 2020 (UTC)[reply]

I strongly support this request! -- H005 (talk) 10:01, 1 December 2020 (UTC)[reply]
 Strong support The Erinaceous One 🦔 09:48, 19 December 2022 (UTC)[reply]

Anthony Eden (Q128995) has the property noble title (P97) = Earl of Avon (Q5326201).

If I run this gadget on Earl of Avon (Q5326201) I would expect it to show a relation to Anthony Eden (Q128995), but it does not.

Is there a valid reason for this or is it a bug? -- H005 (talk) 10:09, 1 December 2020 (UTC)[reply]

I actually found the answer myself: I had to create an inverse property label item (Q65932995) and assign it to noble title (P97): noble title holder (Q103051478). Now it works. -- H005 (talk) 11:37, 1 December 2020 (UTC)[reply]

Chinese (Simplified) translation[edit]

           ['zh-hans']: {
               'title': '派生陈述',
               'more': '更多',
               'inverse': '反向',
               'show-inverse': '显示派生陈述',
               'no-result': '无结果',
               'loading': '加载中...'
           },

YFdyh000 (talk) 09:53, 27 March 2021 (UTC)[reply]

✓ Done --Pasleim (talk) 19:27, 29 March 2021 (UTC)[reply]

sv translation[edit]

{{Editrequest}}

            sv: {
                'title': 'Härledda uttalanden',
                'more': 'mer',
                'inverse': 'omvänt',
                'show-inverse': 'visa härledda uttalanden',
                'no-result': 'inget resultat',
                'loading': 'laddar...'
            },

--Sabelöga (talk) 01:32, 24 July 2021 (UTC)[reply]

✓ DoneMisterSynergy (talk) 12:23, 26 October 2021 (UTC)[reply]

http → https migration[edit]

{{Editrequest}} Please change lines 108 and 109 to use https://wikiba.se/ and https://www.wikidata.org/ instead of http://wikiba.se/ and http://www.wikidata.org/. --Pokechu22 (talk) 05:28, 8 October 2021 (UTC)[reply]

 Not done; those are canonical URIs as used in the data model per mw:Wikibase/Indexing/RDF Dump Format#Full list of prefixes (look for prefixes "wikibase:" and "wd:"). We would break the script if we changed that. —MisterSynergy (talk) 12:27, 26 October 2021 (UTC)[reply]
@MisterSynergy Ah, yes, that makes sense. To actually implement it would require changing <a href="' + page.property.value + '">' to <a href="' + page.property.value.replace("http://", "https://") + '">' on line 123 and a similar change for page.subject.value on line 147 instead, right? --Pokechu22 (talk) 16:27, 26 October 2021 (UTC)[reply]
Now I see what the issue is here. I’ve replaced the canonical URIs by internal (https) URLs as usual. Works as desired? —MisterSynergy (talk) 17:53, 26 October 2021 (UTC)[reply]
Yep, that works. Thanks! --Pokechu22 (talk) 17:56, 26 October 2021 (UTC)[reply]

Display order[edit]

Currently the property instance of (P31) comes before subclass of (P279) and many others in the list. This is a problem because many items have tons of instances, and listing these leads to no other propoerties being listed anymore, because the maximum number of dependent items is reached. Would it be possible to put this property at the end instead of the beginning? -- H005 (talk) 14:24, 18 November 2021 (UTC)[reply]

I agree that it is problematic that a single property can dominate the list, but it makes sense to put instance of (P31) near or at the top due to its importance. I have seen items where some other property also consumes the whole list. I propose that we modify the gadget to only show a limited number of statements for each property. — The Erinaceous One 🦔 09:47, 19 December 2022 (UTC)[reply]

Bug[edit]

Can anyone help? The gadget doesn't work for me in Firefox (text message "show inverse" doesn't show up). I found that section "id inversesection" is overrided by User:Data-Complete-Gadget/WikidataComplete.js. --Infovarius (talk) 12:41, 14 January 2022 (UTC)[reply]

Hide Deprecated Statements or Put Them at the Bottom[edit]

Currently, deprecated statements are included among the inverse property statements. I think these statements should be hidden completely or placed at the bottom of the list (perhaps with gray text to indicate they are deprecated). — The Erinaceous One 🦔 09:51, 19 December 2022 (UTC)[reply]