Template talk:R:Oxford English Dictionary

From Wiktionary, the free dictionary
Latest comment: 1 year ago by Sgconlaw in topic First-letter checker of entry parameter
Jump to navigation Jump to search

First-letter checker of entry parameter[edit]

@Sgconlaw: The page link does not work at mithun because the entry parameter is “‖ Mithan”. J3133 (talk) 09:54, 3 February 2023 (UTC)Reply

@J3133: mmmm, this reference template doesn’t attempt to determine the volume number automatically based on the first letter of the entry because it’s too complicated – some volumes start and end in the middle of a letter. I’ll make it clearer that the volume number must be manually specified. — Sgconlaw (talk) 12:48, 3 February 2023 (UTC)Reply
@Sgconlaw: I did specify the volume number. The problem is that the page link is “https://archive.org/details/oed6/mode/1up”. J3133 (talk) 12:53, 3 February 2023 (UTC)Reply
@Sgconlaw: I thought the problem is that the template checks the first letter because I saw {{#switch:{{padleft:|1|{{ucfirst:{{{entry|{{{1|{{PAGENAME}}}}}}}}}}}} | M = barch/page/{{#ifeq:{{{page|{{{pageref|{{{3|}}}}}}}}}|1 | n14 | {{{page|{{{pageref|{{{3|}}}}}}}}} }} | N = barch/page/{{#ifeq:{{{page|{{{pageref|{{{3|}}}}}}}}}|1 | 1 | n{{#expr:{{{page|{{{pageref|{{{3|}}}}}}}}}+833}} }} }}. J3133 (talk) 13:02, 3 February 2023 (UTC)Reply
@J3133: ah, OK. I reviewed the code and now remember that for some volumes of the work the template does test for the first letter of the entry because, annoyingly, in those volumes the page numbering restarts from 1 for each letter of the alphabet. The template does not take into account that an entry may begin with a symbol. I can't think of an easy fix now (apart from advising editors not to precede entries with symbols) as I'm off to bed. We'd have to find a way to test if the first character of an entry is a letter, and if it isn't then there has to be some way to detect what the first letter of the entry proper is. Maybe you would like to investigate if Module:string provides a solution? — Sgconlaw (talk) 19:10, 3 February 2023 (UTC)Reply
Actually, come to think of it, one easy fix would be to provide another parameter (|symbol=?) to insert a preceding symbol like † or ‖ … — Sgconlaw (talk) 19:12, 3 February 2023 (UTC)Reply