Jump to content

Module talk:Wikidata

Add topic
From Meta, a Wikimedia project coordination wiki
Latest comment: 7 days ago by NguoiDungKhongDinhDanh in topic Extend language support for wikilinks generation

How to retrieve coordinates (P625)?

[edit]

I tried to get coordinates (e.g. {{#invoke:Wikidata|formatStatementsE|item=Q2925991|property=p625}} ) but I got an error because it was missing Module:Wikidata/Globes. I decided to copy and paste the module from en.wiki but the situation ha not improved that much: now the "invoke" is just returing the text "table". Can anyone with a better knowledge than mine in LUA have a look? Thank you. BTW: I ping @PiRSquared17: as most recent author of the module Wikidata. --Ysogo (talk) 06:51, 11 September 2018 (UTC)Reply

Edit request

[edit]

Hi, please merge from the sandbox. Here's the test. CookaiđŸȘ (💬talk) 06:04, 15 March 2026 (UTC)Reply

Done. * Pppery * it has begun 14:49, 15 March 2026 (UTC)Reply
[edit]

Dear admins,

I extended support of complex language codes for getLink feature in the sandbox. Can you merge it please? I have written some tests to demonstrate it is an improvement.

-- Pols12 (talk) 02:14, 2 August 2026 (UTC)Reply

@Pols12: I see the 7th testcase is failing. Persumably this is due to getLabel checking for labels in fallback languages before interwikis. For the 7th and 8th testcases, the fallback lists are { 'be-x-old', 'en', 'message', 'default' } and { 'be_x_old', 'message', 'default' }, correspondingly; entity.labels[lg] is not nil for lg == 'en', so the function returns right there without ever reaching the second loop. I'd like to see both pass before merging. NguoiDungKhongDinhDanh 05:41, 3 August 2026 (UTC)Reply
I added the 7th test because I initially wanted to solve this case, but please note it already failed in current version; it was not a regression.
I just edited the sandbox to use strict mode of mw.language.getFallbacksFor(), rather than Module:Fallback. All tests pass now. 🙂
Unfortunately, I have no time to upgrade Module:Fallback with this change, because some pages may expect it ever provides “en” as fallback.
-- Pols12 (talk) 01:18, 8 August 2026 (UTC)Reply
Done NguoiDungKhongDinhDanh 03:05, 9 August 2026 (UTC)Reply