Jump to content

Template talk:Cite JIPA

Page contents not supported in other languages.
From Wikipedia, the free encyclopedia

doi-access[edit]

I recently updated {{doi}} so that it natively supports |doi-access=free. Compare:

{{doi|10.5194/essd-12-2013-2020}}{{free access}}doi:10.5194/essd-12-2013-2020Free access icon
{{doi|10.5194/essd-12-2013-2020|doi-access=free}}doi:10.5194/essd-12-2013-2020

Trappist the monk (talk) 13:46, 18 August 2022 (UTC)[reply]

Could you apply that here? That's beyond my understanding. — kwami (talk) 20:03, 18 August 2022 (UTC)[reply]
Template:cite JIPA/testcases
Trappist the monk (talk) 22:45, 18 August 2022 (UTC)[reply]
Thanks! Yes, that's perfect.
While I've got you here, is there a module we could call that would convert hyphenated page ranges to en-dashed? Or would it be easier to let a bot take care of it? — kwami (talk) 23:00, 18 August 2022 (UTC)[reply]
If you are willing to move the "with supplementary sound recordings" static text (or some variant thereof) to the end of the rendered citation, you can use Module:Template wrapper to call the {{cite journal}} to render the citation. This 'fixes' the hyphen to ndash issue because that is a normal part of cs1|2 handling. With this version of the sandbox, when doi-access becomes free-to-read, {{cite journal}} automatically links the citation title to the doi source. The current sandbox form allows the use of any and all cs1|2 parameters that are supported by {{cite journal}}; same error detection and reporting; correct metadata for those who consume en.wiki citations using reference management tools.
See Template:cite JIPA/testcases. There you may notice that {{cite journal}} is complaining (correctly) about the use of |authors=.
Trappist the monk (talk) 00:42, 19 August 2022 (UTC)[reply]
Thanks! That's a big improvement in other ways too.
I'm not seeing any complaint about 'authors'.
I removed your error-avoidance code for malformed dates, as that hid it when the free-doi calculation wasn't engaged. — kwami (talk) 08:44, 19 August 2022 (UTC)[reply]
If you preview Template:cite JIPA/testcases you see this message in the yeloow-ish preview box:
One or more {{cite journal}} templates have maintenance messages
That is {{cite journal}} complaining about |authors=.
I hid the Expression error: Unexpected < operator because that message is meaningless to editors. If you want a bad date format error message, that can be done using something like this at the end of the template:
{{#iferror:{{time interval|{{{printdate|}}}||show=d|disp=raw|partial=on}}|{{color|#d33| bad date format: {{{printdate|}}}}}}}
See the sandbox and textcases.
Trappist the monk (talk) 13:17, 19 August 2022 (UTC)[reply]
Alternately, this line:
|date={{YEAR|{{{printdate|{{{printyear|{{{onlinedate|{{{onlineyear|}}}}}}}}}}}}}}
can change to
|date={{{printdate|{{{printyear|{{{onlinedate|{{{onlineyear|}}}}}}}}}}}}
so that Module:Citation/CS1 handles date format error messaging.
Trappist the monk (talk) 13:21, 19 August 2022 (UTC)[reply]