User talk:Yair rand/WikidataInfo.js

From Wikidata
Jump to navigation Jump to search
On this page, old discussions are archived after 730 days. An overview of all archives can be found at this page's archive index. The current archive is located at User talk:Yair rand/WikidataInfo.js/Archive 1.
Screenshot of de:Horst Jockusch using the User:Yair rand/WikidataInfo.js Javascript twice (with German and English interface)


Vietnamese label for "alias" property[edit]

Hi, please change translate.vi.aliases to "Tên khác: " (lit. "different name(s)"), as "Biệt danh: " (lit. "nickname(s)") doesn't seem to be appropriate. Thanks in advance. NguoiDungKhongDinhDanh 15:41, 6 February 2022 (UTC)[reply]

✓ Done --Matěj Suchánek (talk) 08:09, 7 February 2022 (UTC)[reply]

Vector 2022: Info not shown[edit]

Since this week the Wikidata info is not longer shown on dewiki when using Vector2022 skin. Probably related to the latest deployment train. I don't know if it can be fixed in this JavaScipt. Raymond (talk) 09:24, 20 August 2022 (UTC)[reply]

It also no longer appears on arwiki due to the latest changes in how to handle "#contentSub".. --FShbib (talk) 00:07, 22 August 2022 (UTC)[reply]
They changed the link format, along with a couple other things. I've been working on fixing a couple other (rather more complicated) issues at the same time with this script, I hope to have the fix up tomorrow. --Yair rand (talk) 08:07, 22 August 2022 (UTC)[reply]
it seems the issue is the very last line: $d.appendTo( '#contentSub' );. this element does not exist in vector 2022. instead, you can do something like
				if ($('header.mw-body-header').length)
					$('header.mw-body-header').after($d);
				else
					$d.appendTo( '#contentSub' );

peace - קיפודנחש (talk) 00:34, 24 August 2022 (UTC)[reply]

...Well, I feel silly. I had thought this section was on a talk page of an entirely different script for which I've been fixing some issues that broke recently. My apologies.
I've implemented קיפודנחש's fix above (together with some styling to try to match the old #contentsub styles). Thanks. --Yair rand (talk) 01:42, 24 August 2022 (UTC)[reply]
Thanks for looking into this. I'm afraid, however, it does not show up yet. I've checked de, en, and fr wiki. Could you have a look again, please? Thx and best regards, Aschmidt (talk) 05:31, 24 August 2022 (UTC) I've just realised that the location of Wikidata info has changed. It used to appear underneath XTools, but not it's located directly below pagetitle. So it seems to work for me. Thx, again! Regards, Aschmidt (talk) 06:16, 24 August 2022 (UTC)[reply]
Please, see the comment at phab:T315639#8177758. Vriullop (talk) 05:47, 24 August 2022 (UTC)[reply]
Hello, I'm a developer working on the Vector 2022 skin. This issue has been brought to my attention via T325097. It's true that Vector 2022 removed the #contentSub element, but after a lot of comments on T315639, the element was restored in September. This means the workaround mentioned above is no longer necessary (and seems to cause other issues) so I recommend reverting this edit and continuing to append to `#contentSub` (which works now). JDrewniak (WMF) (talk) 14:52, 14 December 2022 (UTC)[reply]
✓ Done Thanks for your care, @JDrewniak (WMF). --Matěj Suchánek (talk) 19:49, 16 December 2022 (UTC)[reply]

wgWikibaseItemId[edit]

Hi Yair rand! Is there a reason this script looks up the Wikidata ID & info using wbgetentities with sites: wgDBName & titles: pagename instead of using mw.config.get( 'wgWikibaseItemId' );? My guess is that wgWikibaseItemId didn't exist yet when the script was first created. Using it would save us an API query when we know the page isn't connected to Wikidata, since wgWikibaseItemId won't be present in mw.config then. Jon Harald Søby (talk) 00:10, 25 September 2022 (UTC)[reply]

@Jon Harald Søby: It doesn’t use the page name – it uses the subject page name. wgWikibaseItemId is set only on pages connected to Wikidata, not on their talk pages. As as optimization, it would probably be possible to use mw.config on subject pages and the current behavior on talk pages, but I’m not sure if it’s worth complicating the code. —Tacsipacsi (talk) 09:12, 25 September 2022 (UTC)[reply]
@Tacsipacsi: Okay, I see. I wasn't aware that it worked on talk pages as well. The reason I asked is because I've made a gadget in the Wikimedia Incubator which mimics real interwiki links, up to the point of adding wgWikibaseItemId to mw.config, in the hope that it could help user scripts like this one work on the Incubator as well. But since that is added with Javascript after the page is loaded, we might have needed to make other modifications anyways.
Either way, I'd be willing to make the changes required to make this work if you think that'd be useful. Jon Harald Søby (talk) 19:41, 25 September 2022 (UTC)[reply]

Update Javanese translation[edit]

Please update the Javanese translation (jv) of notfound and nodescription properties to:

notfound: "Wiji Wikidata durung ana.",
nodescription: "durung ana wedharan",
  • Butir (id) → Wiji (jv)
  • Durung → durung: Lowercase the first letter.

Thanks. Labdajiwa (talk) 00:16, 8 May 2023 (UTC)[reply]

✓ Done --Matěj Suchánek (talk) 09:40, 8 May 2023 (UTC)[reply]

Styling in contentSub[edit]

since gerrit:919241 moved the styling from the #contentSub element to #mw-content-subtitle and we now have mw.util.addSubtitle, I suppose the script should use the new method to add its information to the subtitle area. Currently, outside of vector-2022 the content added by this script is styled as content text, not in gray and smaller text. Regards, hgzh 11:21, 15 June 2023 (UTC)[reply]

Updated script at https://de.wikipedia.org/wiki/Benutzer:Hgzh/temp.js hgzh 13:52, 15 June 2023 (UTC)[reply]
✓ Done Works fine under multiple skins. Thank you Hgzh! --Matěj Suchánek (talk) 17:31, 15 June 2023 (UTC)[reply]

Punjabi translation[edit]

'pa': {
			notfound: "ਵਿਕੀਡਾਟਾ ਆਈਡੀ ਨਹੀਂ ਲੱਭੀ ਗਈ",
			intro: "ਵਿਕੀਡਾਟਾ: ",
			nolabel: "(ਕੋਈ ਲੇਬਲ ਨਹੀਂ)",
			nodescription: "ਕੋਈ ਵੇਰਵਾ ਨਹੀਂ ਦਿੱਤਾ",
			aliases: "ਹੋਰ ਨਾਮ: ",
			noaliases: "ਕੋਈ ਨਹੀਂ"
		},

KuldeepBurjBhalaike (Talk) 09:15, 7 September 2023 (UTC)[reply]

✓ Done --Matěj Suchánek (talk) 16:48, 7 September 2023 (UTC)[reply]