Content deleted Content added
m Archiving 1 discussion(s) from Module talk:Wd) (bot |
m Archiving 1 discussion(s) from Module talk:Wd) (bot |
||
Line 1,450:
:::::::I believe I am one template edited short of one of the requirements. [[User:Janhrach|Janhrach]] ([[User talk:Janhrach|talk]]) 19:29, 18 February 2024 (UTC)
{{reflist-talk}}
== Accessing titles from other Wikipedias ==
{{courtesy link|Module talk:Wd/Archive 1#Titles from other wikipedias}}
Still interested in this feature: given a wikidata Q-id and an ISO-639 code 'xx', return the title of the article at xx-wiki for that item. Perhaps as in this mockup:
: <code><nowiki>{{wikidata|wikipedia|lang=es|eid=</nowiki>[[d:Q43287|Q43287]]<nowiki>}}</nowiki></code> → Imperio alemán
There's also another editor interested in this; adding {{u|Your Friendly Neighborhood Sociologist}}. Thanks, [[User:Mathglot|Mathglot]] ([[User talk:Mathglot|talk]]) 08:59, 14 February 2024 (UTC)
:Theres a suggestion on the ''courtesy link''ed page to use <nowiki>{{#invoke:WikidataIB|getSiteLink|qid=Q43287|wiki=eswiki|ps=1}}</nowiki> >> {{#invoke:WikidataIB|getSiteLink|qid=Q43287|wiki=eswiki|ps=1}}, @[[User:Mathglot|Mathglot]]. [[User:Ponor|Ponor]] ([[User talk:Ponor|talk]]) 12:18, 16 February 2024 (UTC)
:: {{re|Ponor}} Thank you for your comment. I thought I missed a reply in that discussion or something, but it turns out that it came from a different discussion in section {{slink|Module talk:Wd/Archive 1|Getting values (labels) from a local Wikipedia|nopage=yes}}, and unfortunately I never saw that one. Also, I believed the [[Special:Diff/1019358531|response]] I got in the original discussion that it wasn't possible, so this is a very pleasant surprise. That's some eagle-eyed sleuthing; thanks again! [[User:Mathglot|Mathglot]] ([[User talk:Mathglot|talk]]) 23:12, 16 February 2024 (UTC)
:::Oh... thank you, @[[User:Mathglot|Mathglot]], I learned something new too. This could be made into a separate template, if needed, so other people can find it: {{tlx|sitelink|qid|wiki}} // {{tlx|sitelink|Q43287|es}} → [[:es:{{#invoke:WikidataIB|getSiteLink|qid=Q43287|wiki=eswiki|ps=1}}]], or whatever you wanna to call it. It's a 10 minute job. [[User:Ponor|Ponor]] ([[User talk:Ponor|talk]]) 23:50, 16 February 2024 (UTC)
:::: {{re|Ponor}}, yeah, and creating a template wrapper for it got added to my list the minute you replied and I saw it was workable. Only for me, it's more like a 2–3 hour job: ten minutes to code and test it, just as you say; then maybe 30-45' to write the doc page and maybe create a couple of template shortcuts, and another hour-plus or so to hunt down some RW examples in a few languages, and another hour or so to write the test cases page. Maybe I need to go to perfectionist jail for a while {{wink}}. I think it might need several redirect names; probably 'sitelink' is a good template name, but won't mean much to those who think 'foreign wikipedia title' and it's not obvious to me how to ensure it is findable; all your suggestions would be welcome.
:::: As it happens, I'm deep into a wrapper creation right now: [[Draft:HasTemplate]], which is going to be incredibly useful once it is released. It's got a backstory that is turning out to be a lot more complex than I ever expected; you can look at [[Template talk:Template parameter value#Can it just detect if the template is there|this discussion]] if you're curious, but fair warning: it really gets into the weeds on some things, so what I thought was going to be a terse, one-sentence, one-response discussion, is way more than that. (Feel free to wade in there, if you're not afraid of drowning in the details.) So, I will definitely write {{tl|sitelink}} (or whatever we decide to call it) but you never know when something that seemed like a ten-minute thing at the time, turns out to have all sorts of little issues around it and goes on a lot longer, but I hope not! [[User:Mathglot|Mathglot]] ([[User talk:Mathglot|talk]]) 00:33, 17 February 2024 (UTC)
:::::Well... I did something here: [[Template:Sitelink]] :) People will probably find it in its category, with other similar templates. Need to figure out how to make the foreign titles wikilinked, nothing like <nowiki>[[:es:xxxx|]]</nowiki> worked.
:::::* <nowiki>{{sitelink|es|qid=Q43287}}</nowiki>: {{sitelink|es|qid=Q43287}}
:::::* <nowiki>{{sitelink|fr|title=German empire}}</nowiki>: {{sitelink|fr|title=German empire}} (was cheap to get)
:::::* <nowiki>{{sitelink|fr}}</nowiki> in any article should also work
:::::Feel free to play further! And whoever's reading this. [[User:Ponor|Ponor]] ([[User talk:Ponor|talk]]) 01:22, 17 February 2024 (UTC)
:::::: Well, you just saved me ten minutes. {{wink}} (I went ahead and updated the doc a bit more; see what you think.) I tested {{tlx|sitelink|fr}} at [[German Empire]], and it worked perfectly, although there probably won't be much call for that. On the other hand, being able to use it from the associated Talk page would be very useful; I tested it at [[Talk:German Empire]], and of course no big surprise that it returned empty. Any way it could be updated to detect namespace, i.e., switch to {{tl|SUBJECTPAGENAME}} if it were on the Talk page? That would be very useful. [[User:Mathglot|Mathglot]] ([[User talk:Mathglot|talk]]) 02:52, 17 February 2024 (UTC)
:::::::@[[User:Mathglot|Mathglot]]: I have a few usecases on my 'other' wiki, for example when pointing readers to full documentation page for templates taken from enwiki, as in {{sitelink|hr|title=Template:Get QID|linked=x}} (ha! I used <nowiki>{{sitelink|hr|title=Template:Get QID}}</nowiki> here). I'm pretty sure something can be done about the talk pages, let me think about it. Should that be one wiki's talk page to another wiki's talk page or something else? One can always use QIDs and page titles, I wonder if adding more complexity to our little wrapper template would be worth it. [[User:Ponor|Ponor]] ([[User talk:Ponor|talk]]) 14:17, 19 February 2024 (UTC)
|