Template talk:R:OED Online

From Wiktionary, the free dictionary
Latest comment: 4 months ago by Sgconlaw in topic Broken links 2
Jump to navigation Jump to search

OED definition template seems to be broken since OUP updated their web assets... Enquire (talk) 20:21, 7 February 2014 (UTC)Reply

"Fragment" parameter[edit]

@Erutuon: hope you're going to document the new |fragment= parameter? I can't tell what it does. — SGconlaw (talk) 04:04, 17 December 2019 (UTC)Reply

@Sgconlaw: Done. I added the parameter to use it in youthen. — Eru·tuon 04:10, 17 December 2019 (UTC)Reply
SGconlaw (talk) 04:35, 17 December 2019 (UTC)Reply

Documentation[edit]

@J3133: could you please document the changes you've made on the documentation subpage? Thanks. — SGconlaw (talk) 08:44, 8 February 2022 (UTC)Reply

Broken links[edit]

{{R:OED Online|entry=Victor Charlie|pos=n}} is producing

Victor Charlie, n.”, in OED Online Paid subscription required, Oxford, Oxfordshire: Oxford University Press, launched 2000. Ioaxxere (talk) 23:54, 23 July 2023 (UTC)Reply

@Ioaxxere: oops. Let me look at it tomorrow (I am travelling today). OED Online has updated its website and changed its URL format, so I’ve been trying to update the template accordingly. In some (perhaps many) cases it will unfortunately be necessary to manually specify the URL. — Sgconlaw (talk) 01:27, 24 July 2023 (UTC)Reply
@Benwing2: do we have a wikitext function or module that allows for the replacement of one character in a string with another—for example, replacing spaces with hyphens? "mw:Help:Extension:ParserFunctions" suggests {{#replace}} can be used but it doesn't seem to be recognized here at the Wiktionary. — Sgconlaw (talk) 17:17, 2 August 2023 (UTC)Reply
@Sgconlaw This is possible using Module:string, specifically the replace function. What is the use case here? Benwing2 (talk) 20:08, 2 August 2023 (UTC)Reply
@Benwing2: OED Online has changed the format of its URLs, and entries with multiple words are separated with hyphens. But @Nardog has pointed out that permanent links are provided so it is better to use those instead. — Sgconlaw (talk) 15:18, 3 August 2023 (UTC)Reply
@Benwing2: it seems like I still need to use the replace function of Module:string as a fallback if |id= is not specified by the user. How do I use it to search for a space character? I tried using "<nowiki> </nowiki>" but that doesn't seem to work. — Sgconlaw (talk) 23:37, 5 August 2023 (UTC)Reply
@Sgconlaw Try putting single brackets around the space, like [ ]. Benwing2 (talk) 02:23, 6 August 2023 (UTC)Reply
@Benwing2: no, that doesn't work. {{#invoke:string|replace|source={{{entry|{{{title|{{{1|{{PAGENAME}}}}}}}}}}}|pattern=&#32;|replace=-}} also doesn't work. I guess if it isn't possible to search for and replace spaces using "Module:string", I will just have to remove the fallback, in which there will be no link if |id= is not specified. — Sgconlaw (talk) 04:02, 6 August 2023 (UTC)Reply
@Sgconlaw It looks like it will work if you use [ ] and specify |plain=false. The |plain= param defaults to true, in which case the pattern is interpreted as plaintext rather than as a Lua pattern. Benwing2 (talk) 05:12, 6 August 2023 (UTC)Reply
Make it use the DOI, which is available by clicking "Cite" on the site. Using the word_pos part is not future-proof whereas the whole point of a DOI is to be future-proof and avoid link rot. Nardog (talk) 12:58, 3 August 2023 (UTC)Reply
@Nardog: oh, thanks. I didn't realize there was a permanent link. I'll work on using those instead. — Sgconlaw (talk) 15:18, 3 August 2023 (UTC)Reply
Note all DOI IDs appear to be 10 digits, and the IDs in the previous format for some entries from the last update were 9 digits (e.g. https://www.oed.com/view/Entry/104006160). So for w:Template:Cite OED we decided to use the previous format if the given ID was 9 digits or less and the DOI format otherwise. Nardog (talk) 15:29, 3 August 2023 (UTC)Reply
@Nardog: ah, I will try to incorporate this. At the moment I have switched the template entirely to the new URL format with no backwards compatibility, because it did not seem possible. — Sgconlaw (talk) 23:37, 5 August 2023 (UTC)Reply
@Sgconlaw this should be possible; there's a length function in Module:string. Benwing2 (talk) 02:23, 6 August 2023 (UTC)Reply
@Benwing2, Nardog: OK, I have added backward compatibility to this reference template. — Sgconlaw (talk) 04:02, 6 August 2023 (UTC)Reply

Broken links 2[edit]

{{R:OED Online|entry=turnip|id=7839534777|pos=n|subentry=a turnip for the books|subid=1391827360}} produces

a turnip for the books” under turnip, n.”, in OED Online Paid subscription required, Oxford, Oxfordshire: Oxford University Press, launched 2000.

Which links to https://doi.org/10.1093/OED/1391827360. The correct URL is https://www.oed.com/dictionary/turnip_n#1391827360.

Ioaxxere (talk) 17:50, 18 December 2023 (UTC)Reply

Actually, it seems like every sense has two different IDs? Ioaxxere (talk) 17:57, 18 December 2023 (UTC)Reply
@Ioaxxere: this reference template only uses the DOI ID number which appears when the relevant "Cite" link is clicked. In this case, it seems like the |subid= has been incorrectly specified. Looking at OED Online and clicking on the "Cite" link, that particular subentry does not have a subid distinct from the entry (some subentries do), so it should just be specified as {{R:OED Online|subentry=a turnip for the books|subpos=phrase|entry=turnip|id=7839534777|pos=n|date=November 2023}}. — Sgconlaw (talk) 22:07, 18 December 2023 (UTC)Reply