Jump to content

Template talk:Cite book/German

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

CS1

[edit]

I recently updated {{Internetquelle}} to be compliant with Citation Style 1. Is there any objection to updating this template? ---— Gadget850 (Ed) talk 00:21, 31 May 2012 (UTC)[reply]

I don't have a problem as long as it doesn't affect the input parameters. I assume you're only changing the way it displays which is fine. Bermicourt (talk) 05:30, 31 May 2012 (UTC)[reply]
Exactly. Examples of current and sandbox versions:
Markup Renders as
{{Literatur |Autor=Max Mustermann |Titel=Aspekte modernen Wikipädisierens |Herausgeber=Bernd Beispiel |Sammelwerk=Soziologie der Wikipädianer |Verlag=Wikipedia-Press |Ort=Musterstadt |Jahr=2003 |ISBN=978-3-9801412-1-5 |Seiten=213–278}}

Max Mustermann (2003), Bernd Beispiel, ed., "Aspekte modernen Wikipädisierens" (in German), Soziologie der Wikipädianer (Musterstadt: Wikipedia-Press): pp. 213–278, ISBN 978-3-9801412-1-5 

{{Literatur/sandbox |Autor=Max Mustermann |Titel=Aspekte modernen Wikipädisierens |Herausgeber=Bernd Beispiel |Sammelwerk=Soziologie der Wikipädianer |Verlag=Wikipedia-Press |Ort=Musterstadt |Jahr=2003 |ISBN=978-3-9801412-1-5 |Seiten=213–278}}

Max Mustermann (2003), Bernd Beispiel (ed.), "Aspekte modernen Wikipädisierens", Soziologie der Wikipädianer, Musterstadt: Wikipedia-Press, pp. 213–278, ISBN 978-3-9801412-1-5

Markup Renders as
{{Literatur |Autor=Max Mustermann |Titel=Wikipedia wohin? |Sammelwerk=FAZ |Tag=1 |Monat=Februar |Jahr=2003 |ISSN=0174-4909 |Seiten=3}}

Max Mustermann (1 Februar 2003), "Wikipedia wohin?" (in German), FAZ: pp. 3, ISSN 0174-4909 

{{Literatur/sandbox |Autor=Max Mustermann |Titel=Wikipedia wohin? |Sammelwerk=FAZ |Tag=1 |Monat=Februar |Jahr=2003 |ISSN=0174-4909 |Seiten=3}}

Max Mustermann (1 February 2003), "Wikipedia wohin?", FAZ, p. 3, ISSN 0174-4909

Markup Renders as
{{Literatur |Autor=John Doe |Titel=Einführung in die Trollerei |Originaltitel=Introduction to Trolling |Originalsprache=en-US |Verlag=Wikipedia-Press |Ort=Musterstadt |Jahr=2003 |ISBN=978-3-9801412-1-5}}

John Doe (2003), Einführung in die Trollerei [Introduction to Trolling], Musterstadt: Wikipedia-Press, ISBN 978-3-9801412-1-5 

{{Literatur/sandbox |Autor=John Doe |Titel=Einführung in die Trollerei |Originaltitel=Introduction to Trolling |Originalsprache=en-US |Verlag=Wikipedia-Press |Ort=Musterstadt |Jahr=2003 |ISBN=978-3-9801412-1-5}}

John Doe (2003), Einführung in die Trollerei [Introduction to Trolling], Musterstadt: Wikipedia-Press, ISBN 978-3-9801412-1-5

---— Gadget850 (Ed) talk 09:25, 31 May 2012 (UTC)[reply]

I quite forgot about this. Any comments? --— Gadget850 (Ed) talk 16:31, 3 January 2013 (UTC)[reply]
I assume the 2nd version in each case is how the display will look once you implement the changes. Looks good to me - crack on! --Bermicourt (talk) 19:00, 3 January 2013 (UTC)[reply]
 Done Let me know here it you see any issues. --— Gadget850 (Ed) talk 19:26, 3 January 2013 (UTC)[reply]

Category

[edit]

Need to put this in a category. Category:Citation Style 1 templates using German translations sound OK? --— Gadget850 (Ed) talk 19:30, 3 January 2013 (UTC)[reply]

Unless there are several other German-style citation templates, this may be a bit too specific. I'd just park it in an existing citation category. But I don't feel strongly about this. --Bermicourt (talk) 20:05, 3 January 2013 (UTC)[reply]
Just {{Internetquelle}}. --— Gadget850 (Ed) talk 20:11, 3 January 2013 (UTC)[reply]

Question about recent edit

[edit]

I see there are several articles that have popped up in Category:Pages with URL errors that contain this template, such as André-Marie Ampère. The articles haven't changed recently, and {{Google Buch}} hasn't changed recently, so I'm guessing it has to do with the recent IP edit to this template. Thought it was worth discussing before reverting the edit. Thanks! GoingBatty (talk) 02:54, 18 February 2015 (UTC)[reply]

I've reverted the edit as it is screwing dozens of articles up. I'm sure the change was made in good faith, but it needed properly testing first. I'll leave a note on the unnamed editor's talk page. --Bermicourt (talk) 12:39, 21 February 2015 (UTC)[reply]

Parameters added to documentation but not in template

[edit]

Wikid77, you have added a bunch of parameters to the documentation that are not in the template code. Are you planning to add them to the template? In my experience, it is less confusing to editors if we modify the template first and then update the documentation.

Also, you have added parameters like |Umfang= (i.e. total pages) that do not have an equivalent in the English-language citation template. What is your intention with that parameter and parameters like it? – Jonesey95 (talk) 00:12, 18 January 2017 (UTC)[reply]

I am working to add the extra parameters, but I like your plan to add parameters to the template first, then update the /doc text afterward, but my German-language skill is rusty at this point and Google Translate continually mistranslates words, such as Finnish "kappale" (should show "chapter" not "number"). As for no-equivalence parameters, I plan to list them after the template (such as "KBytes: 1200"), where no data would be lost if someone quickly wp:subst'ed the template without the tedious effort to ensure all parameters were mapped into the generated {citation/core} footnotes. Also, I plan to redo the underlying implementation as a {cite_book} rather than {citation/core}. -Wikid77 (talk) 01:02, 18 January 2017 (UTC)[reply]
I do not think converting it to use {{cite book}} makes sense, since this template appears to be an all-purpose citation template for periodicals, magazines, journal articles, and more. Using {{Citation}} would probably be an upgrade, however, since the automatically substed templates would have access to the error-checking of the CS1 templates. – Jonesey95 (talk) 01:36, 18 January 2017 (UTC)[reply]

Suppression of "in German"

[edit]

I just copied a couple references from a German article and pasted them into the English article, and it worked except that it said "(in German)" when in fact they were both in English. So I added "Originalsprache=en", which got rid of that, but put "(in English)" instead. Could we make it so that it doesn't say "(in German)" unless one says "Originalsprache=de", or else add a parameter which will suppress it? Eric Kvaalen (talk) 15:21, 19 August 2018 (UTC)[reply]

This template is automatically substituted by a bot. It looks like the code changes |Originalsprache= to |language= and preserves the value. If there is no Originalsprache provided, it assumes that the language is German. Wait for the bot to visit Lake Palcacocha, and you should see that "English" is the language listed in your cited source. (One note: on the English Wikipedia, when |language=English, there is no language shown in the citation when it is displayed in the rendered article.) – Jonesey95 (talk) 15:49, 19 August 2018 (UTC)[reply]
So it's not an error with this template, but an error by the original editor at German Wiki who didn't fill in Originalsprache = en. Bermicourt (talk) 17:19, 19 August 2018 (UTC)[reply]

substing

[edit]

Don't do it. This template uses {{citation/core}} which, for a long time was the engine that rendered {{citation}} and the cs1 templates. Now that {{citation}} and the cs1 templates are all rendered by Module:Citation/CS1, {{citation/core}} is no longer maintained and its renderings are stylistically different from the cs1|2 templates. There are approximately 1100 articles that directly use {{citation/core}}. Many of those uses, I suspect, result from auto-substing by User:AnomieBOT/docs/TemplateSubster.

{{Literatur}} should be rewritten to use one or more of the cs1|2 templates.

Trappist the monk (talk) 15:18, 16 December 2018 (UTC)[reply]

That's fine as long as it is able to convert the Literatur template imported from German which is its main purpose and advantage. No-one wants to waste time rewriting templates from one language to another every time when a computer can do it for us. Bermicourt (talk) 20:29, 16 December 2018 (UTC)[reply]

Auto substing restored now that the template has been converted to use {{citation}}.

Trappist the monk (talk) 16:47, 25 December 2018 (UTC)[reply]

conversion to template:citation

[edit]

I have cloned the live template into its sandbox and replaced {{citation/core}} and its parameters with {{citation}} and its equivalent parameters. These examples are copied from the template's documentation page (top is the live template, bottom is the sandbox template):

{{Literatur |Autor=J. Schmidt |Titel=Aspekte modernen Wikipädisierens |Herausgeber=Bernd Beispiel |Sammelwerk=Soziologie der Wikipädianer |Verlag=Wikipedia-Press |Ort=Musterstadt |Jahr=2003-08-14 |ISBN=978-3-9801412-1-5 |Seiten=213–278}}
  • J. Schmidt (2003-08-14), Bernd Beispiel (ed.), "Aspekte modernen Wikipädisierens", Soziologie der Wikipädianer, Musterstadt: Wikipedia-Press, pp. 213–278, ISBN 978-3-9801412-1-5 {{citation}}: Unknown parameter |demo= ignored (help)
  • J. Schmidt (2003-08-14), Bernd Beispiel (ed.), "Aspekte modernen Wikipädisierens", Soziologie der Wikipädianer, Musterstadt: Wikipedia-Press, pp. 213–278, ISBN 978-3-9801412-1-5
{{Literatur |Autor=Max Mustermann |Titel=Semantischer Kollaps bei Löschdiskussionen |Sammelwerk=Journal of Wikipedianism |Band=Vol. 2 |Nummer=3 |Monat=März |Jahr=2006 |Seiten=17–67 |DOI= 10.1109/MSPEC.2005.1526906}}
  • Max Mustermann (March 2006), "Semantischer Kollaps bei Löschdiskussionen", Journal of Wikipedianism, vol. Vol. 2, no. 3, pp. 17–67, doi:10.1109/MSPEC.2005.1526906 {{citation}}: |volume= has extra text (help); Unknown parameter |demo= ignored (help)
  • Max Mustermann (March 2006), "Semantischer Kollaps bei Löschdiskussionen", Journal of Wikipedianism, vol. Vol. 2, no. 3, pp. 17–67, doi:10.1109/MSPEC.2005.1526906 {{citation}}: |volume= has extra text (help)
{{Literatur |Autor=Garbo, Greta |Titel=Wikipedia wohin? |Sammelwerk=FAZ |Tag=1 |Monat=Februar |Jahr=2003 |ISSN=0174-4909 |Seiten=3}}
  • Garbo, Greta (1 February 2003), "Wikipedia wohin?", FAZ, p. 3, ISSN 0174-4909 {{citation}}: Unknown parameter |demo= ignored (help)
  • Garbo, Greta (1 February 2003), "Wikipedia wohin?", FAZ, p. 3, ISSN 0174-4909
{{Literatur |Autor=John Doe |Titel=Einführung in die Trollerei |Originaltitel=Introduction to Trolling |Originalsprache=en-US |Seiten=12 |Verlag=Wikipedia-Press |Ort=Musterstadt |Datum=7 Juni 2003 |Originaljahr=2002 |ISBN=978-3-9801412-1-5}}
  • John Doe (7 June 2003) [2002], Einführung in die Trollerei [Introduction to Trolling], Musterstadt: Wikipedia-Press, p. 12, ISBN 978-3-9801412-1-5 {{citation}}: Unknown parameter |demo= ignored (help)
  • John Doe (7 June 2003) [2002], Einführung in die Trollerei [Introduction to Trolling], Musterstadt: Wikipedia-Press, p. 12, ISBN 978-3-9801412-1-5

Here are substed versions of the templates from the last example:

  • Garbo, Greta (1 Februar 2003), "Wikipedia wohin?" (in German), FAZ: p. 3, ISSN 0174-4909 
  • Garbo, Greta (1 February 2003), "Wikipedia wohin?", FAZ (in German), p. 3, ISSN 0174-4909{{citation}}: CS1 maint: date and year (link)

Because all I did was rename the underlying template and parameters, once made live, the {{citation}}-based version should be able to go back to being substed.

Trappist the monk (talk) 16:26, 19 December 2018 (UTC)[reply]

Trappist the monk, we could fix the date errors using the method used in Template:Cita libro, or we could just assume that gnomes will fix them later. Frietjes (talk) 19:23, 19 December 2018 (UTC)[reply]
Aye, we could, but wouldn't it be better to write a lua month-name translator that could be applied to {{Literatur}}, {{cita libro}}, and the other translating templates? I'm inclined to think so because we wouldn't need to repeat chains of nested {{#invoke:String|replace...}} for each date parameter. I'll play around with the translator idea.
Trappist the monk (talk) 20:07, 19 December 2018 (UTC)[reply]
Trappist the monk, you might find the end of 'User:Frietjes/citetrans.js' useful. I believe I have Spanish, French, Portuguese, and Turkish in there. it would be useful if I could just push the date through a date translator module instead. by the way, Template:MultiReplace would be a simple replacement in {{cita libro}} to avoid the nested module calls. Frietjes (talk) 21:10, 19 December 2018 (UTC)[reply]
Great work. This has been a long time coming. Did you (Trappist) figure out good replacements for all of the parameters?
A brute force post-substitution fix for the dates would be to have BattyBot run its Task 25 script on them. It is not elegant, but works quite well. – Jonesey95 (talk) 02:22, 20 December 2018 (UTC)[reply]
In most cases, the parameter names in the live template differ from the sandbox template only in case (camel-case to lowercase) and hyphenation. Some – |IncludedWorkTitle=, |YearNote=, etc – got whole new names (|contribution=, |orig-year=). I didn't set out to reinvent this template – if I had, there would not be two (slightly different) instances of {{citation}}, just the subst-able one.
Trappist the monk (talk) 11:40, 20 December 2018 (UTC)[reply]
Hacked a month name translator that should work for Catalan, German, Polish, Portuguese, and Spanish. Month names for these languages are fetched from MediaWiki into a translation table. I need to move that table generation into a ~/data module so that the fetch is done only once per article. Also need to add support for an override table for when MediaWiki will be wrong. Adding support for other languages is, or should be, as simple as adding an ISO 639 language code to a table.
I have resubsted the subst examples above. There should only be the date-error-in-year error (|Jahr=2003-08-14 is not a year). This translator does nothing about the date maintenance messages; it shouldn't, that's a different issue requiring a different solution.
Trappist the monk (talk) 11:40, 20 December 2018 (UTC)[reply]

safesubst; why?

[edit]

This template includes two instances of {{citation}}. One of these (lines 2–44) is intended to be substed. The other (lines 52–107) is the unsubsted version. The distinction is made with the {{ifsubst}} template. If {{literatur}} is being substed, then the first {{citation}} template is substed and rendered else the second {{citation}} template is rendered. With this edit, Editor Plastikspork added safesubst:<noinclude /> to several places in the second, unsubsted {{citation}}.

Why? Is it necessary to safesubst statements in code that will not be executed during a subst operation?

Trappist the monk (talk) 14:10, 26 December 2018 (UTC)[reply]

Trappist the monk, feel free to remove it if you feel it's not needed. Plastikspork ―Œ(talk) 14:10, 26 December 2018 (UTC)[reply]
Thanks, but that doesn't answer my questions. You must have had a reason for making that edit and I presume that you know more about substing than I do (I know practically nothing about it). So, answers please?
Trappist the monk (talk) 14:14, 26 December 2018 (UTC)[reply]
The reason for adding safesubst for templates which are substituted is to make sure that the parserfunctions or other junk is substituted when the template is substituted. Adding it doesn't usually hurt anything, but helps when the template is substituted. I, personally, prefer translating these using a script like User:Frietjes/citetrans.js, rather than substituting them to avoid leaving a bunch of blank parameters behind. It also makes the diffs easier to read because the script doesn't change the parameter order. Plastikspork ―Œ(talk) 14:22, 26 December 2018 (UTC)[reply]
Right, but in this case you added safesubst:<noinclude /> to the {{citation}} that is never substed and while I agree that doing so doesn't hurt, it doesn't help either so for that reason I am going to revert. Alas, your preference is not every editors preference; I know this because I translated {{literatur}}{{citation/core}} substs in more than a thousand articles. Editors will continue to add {{literatur}} templates to en.wiki articles substed or no so we must continue to support that workflow.
Trappist the monk (talk) 14:53, 26 December 2018 (UTC)[reply]
The auto substitution was added in 2016. It is a bot that is substituting it, not editors. Plastikspork ―Œ(talk) 14:58, 26 December 2018 (UTC)[reply]
Yeah, but the instructions for this template specifically state that this template should always be substed. Editors being the lazy creatures that they are, will let the bot do the 'hard' work. This is no different from editors omitting the date from templates like {{cn}}, {{dead link}}, etc. because they know that a bot will cleanup after.
Trappist the monk (talk) 15:03, 26 December 2018 (UTC)[reply]

Problem with Comment

[edit]

|Comment= is translated from |Kommentar= but otherwise isn't used. Perhaps it could be rigged to convert to |postscript= or something like that?--Auric talk 16:53, 1 February 2021 (UTC)[reply]

That would be an invalid use of |postscript=. There is no corresponding |comment= in the English Wikipedia; consensus is that comments should go after the template. If there is a way for this template to render |Kommentar= after the closing braces of the resulting English-language template, we should do that. – Jonesey95 (talk) 17:43, 1 February 2021 (UTC)[reply]

lua module experiment

[edit]

This template is ugly. Just look at the code; there are two different copies of the code: one for substitution (because this template is always to be substituted), and one that is not (for when editors forget to subst this template I guess). And, not only are there two copies, the output of the two is not always the same given the same parameters ...

So, to combat that ugliness, I have hacked a lua module currently in my sandbox. The module translates the parameters that can be translated, assembles groups of parameter values into a single value when that is appropriate, and then calls {{citation}} to render the result. I think that I have gotten the essentials; compare the live version and the sandbox version of this:

{{Literatur |Autor=John Doe |Titel=Einführung in die Trollerei |Originaltitel=Introduction to Trolling |Originalsprache=en-US |Seiten=12 |Verlag=Wikipedia-Press |Ort=Musterstadt |Datum=7 Juni 2003 |Originaljahr=2002 |ISBN=978-3-9801412-1-5}}
John Doe (7 June 2003) [2002], Einführung in die Trollerei [Introduction to Trolling], Musterstadt: Wikipedia-Press, p. 12, ISBN 978-3-9801412-1-5 {{citation}}: Unknown parameter |demo= ignored (help)
same but the sandbox:
John Doe (7 June 2003) [2002], Einführung in die Trollerei [Introduction to Trolling], Musterstadt: Wikipedia-Press, p. 12, ISBN 978-3-9801412-1-5

The module handles some parameters differently:

  • |TitelErg= – the live subst'd template creates |title=<Titel>: <TitelErg>; the live un-subst'd template creates |title=<Titel> ( <TitelErg>); un-subst'd also creates |type=<TitelErg>. The module creates |type=<TitelErg> only.
  • |Seiten= – the module does not attempt to decode the assigned value in order to choose between |page= and |pages=. Instead, it leaves that to Module:Citation/CS1.
  • |Umfang= – total number of pages not supported by cs1|2 so if and when it occurs in {{Literatur}}, it will be passed on to Module:Citation/CS1 for error handling.
  • |ID=, |URN=, |DNB=, |ZDB= – the live template rendering of these is different in the subst'd and un-subst'd forms I've created a simple comma-separated list of the identifiers, with linked labels (except for |URN= – don't know what that actually is), and their values to be placed in |id=.
  • |ISBNistFormalFalsch= – not supported by this template but implemented in the module because it was easy; wraps the associated |ISBN= value in accept-this-as-written markup
  • |Kommentar= – supported only by the subst'd form which creates |Comment= which is not supported by cs1|2 so if and when it occurs in {{Literatur}}, it will be passed on to Module:Citation/CS1 for error handling.
  • |Format= – both forms of this template add static text: 'Format: '; the sandbox version does not nor does the sandbox support:
    • |KBytes= – size of an online source – no equivalent in cs1|2; excluded because size of a source in bytes is not the format of the source
    • |ArtikelNr= – a document number – no equivalent in cs1|2; excluded because a document's assigned number is not the format of the source

I have added a new parameter |expand= which, when set to any value, shows a nowiki'd version of the translation. It was useful for development and may (or may not) be useful for editors:

{{Literatur/sandbox |Titel=Title |TitelErg=Title erg |Seiten=123 |Umfang=256 |ID=id |URN=urn |DNB=dnb |ZDB=zdb |ISBN=12345 |ISBNistFormalFalsch=x |expand=yes}}
{{citation/subst |id=id, [[Uniform Resource Name|URN]]:&nbsp;urn, [[DNB-IDN (identifier)|DNB-IDN]]:&nbsp;[http://d-nb.info/dnb dnb], [[ZDB-ID (identifier)|ZDB-ID]]:&nbsp;[http://ld.zdb-services.de/resource/zdb zdb] |isbn=12345 |isbnistformalfalsch=x |pages=123 |title=Title |type=Title erg |umfang=256}}<!-- auto-translated from German by Module:CS1 translator -->

and here is what that citation looks like when rendered:

Title (Title erg), p. 123, ISBN 12345, id, URN: urn, DNB-IDNdnb, ZDB-IDzdb {{citation}}: Check |isbn= value: length (help); Unknown parameter |isbnistformalfalsch= ignored (|isbn= suggested) (help); Unknown parameter |umfang= ignored (help)

Comments? Suggestions?

Trappist the monk (talk) 19:29, 19 August 2021 (UTC)[reply]

If the bot can still subst it without error, I trust your work. Thanks. – Jonesey95 (talk) 21:14, 19 August 2021 (UTC)[reply]
Yep, that's a good idea. This will make it easier to translate citations and also to maintain the template. Not sure if the current version is actually updated to reflect all the features of the German live template (it's not by comparing the documentation), but this can by retrofitted later.
Conceptually I think the template should support all parameter variants of a parameter ever supported by the German original template, so that it works well even when someone pulls a citation from an archived page or a history diff. At some point, I might check the history of the German template and add some old parameters as aliases.
|TitelErg= (Titelergänzung, title extension) is not exactly the same as |type=, but good enough for the translation. It sometimes holds parts of an extended subtitle, but can also be used to hold stuff like "with a foreword by xyz", "comes with a CD-ROM" or similar. Putting that into |type= is fine because this typically appears after the title and is not added to the metadata, so it does not cause harm and can be cleaned up and the information possibly manually moved to more appropriate parameters later on.
|KBytes=. This is somewhat analog to |Umfang=. While I see quite a utility value for something like |total-pages= in our citation templates, I don't think we need something like |media-size=. However, some editors might have put other useful information into that parameter, so, like |Umfang=, I would simply pass it through for error handling by {{citation}}.
|ArtikelNr= (article number). Well, this is something that I plan to add to our templates for a long while already, because some publishers number their articles this way and there even is a COinS key for this (rft.artnum), so it would work similar to our other identifiers (including metadata creation), but without an external link to some page resolving that number. To expand the utility value I was playing with the idea to choose a name generic enough to be used also for other similar purposes like vendor catalog numbers, which, in absence of better identifiers like ISBNs, would be quite useful to end up in COinS metadata as well (at present, we can add them to |id=, but this doesn't show up in metadata, so cannot be used for indexing/searches). The definition of rft.artnum appears to be broad enough to allow such a dual use without violating the primary purpose: Module_talk:Citation/CS1/COinS. Anyway, for as long as this is not implemented, I think, it is best to just add this info to |id= like "Article number xyz".
|URN= is for Uniform Resource Names (see also {{URN}}), a concept we might add to our set of identifiers as well. The German Wikipedia resolves something like |URN=nbn:de:gbv:547-201000039 to urn:nbn:de:gbv:547-201000039, but for unknown namespaces, we could just display the string urn:nbn:de:gbv:547-201000039 for now. MW treats this like an external link and it could be resolved by a browser plugin. While we can do the latter even without adding support for it to CS1/CS2, adding it would allow us to also provide this as part of our COinS metadata which might be quite useful to connect citations with sources in both directions.
|DNB=. This could be translated to {{DNB-IDN}} using |id=.
|ZDB=. This could be translated to {{ZDB}} using |id=.
Keep up the good work.
--Matthiaspaul (talk) 12:37, 20 August 2021 (UTC)[reply]
|KBytes= and |ArtikelNr= are passed along to cs1|2 for error handling – nothing in the original template is discarded; if it can't be translated, it is passed on as is. Adding Article no.:&nbsp; to |id= is doable.
I don't think that we should attempt to use {{DNB-IDN}} and {{ZDB}} for the values assigned to |DNB= and |ZDB= because we don't know just what those values might be. If de.wiki somehow massages those values then we can mimic that but otherwise I think that we should simply report the value and leave it to editors to add {{DNB-IDN}} and {{ZDB}} as they see fit.
Trappist the monk (talk) 14:11, 20 August 2021 (UTC)[reply]
I don't understand what you mean by "we don't know just what those values might be"? Certainly we do know what they are as they are among the largest repositories of their kind. (DNB-)IDNs are catalog numbers of title database entries (Identifikationsnummer eines Titeldatensatzes [1][2]) at the German National Library (Deutsche Nationalbibliothek, DNB), and ZDB IDs link into the German Union Catalogue of Serials (Zeitschriftendatenbank, ZDB [3]). These are essential to identify, locate and obtain many older publications from 1500 up to the present, but in particular for publications prior to the introduction of ISBNs and ISSNs.
Instead of translating them as "[[DNB-IDN (identifier)|DNB]]: n" and "[[ZDB-ID (identifier)|ZDB]]: n" you could just translate them as "{{DNB-IDN|n}}" and "{{ZDB|n}}" for usage in |id=. This would ensure that they get properly linked and that the core link can be centrally updated would this become necessary in the future.
Of course, we could also add direct support for them into CS1/CS2 as |dnb= and |zdb=. This would allow to include them as part of the COinS metadata, which would certainly be a valuable addition.
--Matthiaspaul (talk) 15:58, 20 August 2021 (UTC)[reply]
What I meant is that we can't know if, in the original {{Literatur}} template, an editor wrote |DNB=<plain-text> or wrote |DNB=<{{template}}>. The latter is possible because de:Vorlage:DNB and de:Vorlage:ZDB exist. Because {{Literatur}} is to be subst'd and because substitution occurs before transclusion in the WikiMedia rendering process, we would have to inspect the value assigned to each of these identifier parameters and then make some decision about what to do. I'd rather not bother and leave that to the editor so that they get the result they want. A brief perusal of de:Modul:Zitation seems to suggest that, at de.wiki, |DNB= and |ZDB= are presumed to be plain-text. If we can rely on that presumption then, yeah, we can feed those parameter values to {{DNB-IDN}} and {{ZDB}}.
Trappist the monk (talk) 13:56, 21 August 2021 (UTC)[reply]
Yes, the identifier parameters such as |DNB= and |ZDB= at de:Vorlage:Literatur are all meant to take plain-text arguments - just as with our citation templates.
As our {{URN}} template at present only supports the nbn namespace directly, I think, that, for as long as we do not add direct support for URNs in CS1/CS2, it is best to retranslate them into their full URN form (which MW would detect and treat as external links optionally somehow to be resolved through browser plugins), so |URN=xyz would simply become urn:xyz (as plain text) in the |id= parameter (instead of the current URN: xyz), alternatively: URN: urn:xyz. (If we would add support for them in CS1/CS1, we would need an |urn= and an optional |urn-namespace-url= parameter to specify the URL to a namespace resolver for a specific namespace treated locally by us (so the template could output [[URN (identifier)|urn]]:[<urn-namespace-url>/xyz xyz]), instead of externally through the plain-text-method.)
|ArtikelNr= is part of a parameter set to specify in-source-locations in the German citation template (they support more parameters than only for sheets and pages, i.e. for columns, rows, etc.). I think, in our present template logic, we should better treat them similar to identifiers, translating |ArtikelNr=n into Article No. n for |id= (n might contain a link (like our |pages=), "Article No." would be simple text for now). Otherwise they might end up in |sheets= or |number=, where they don't belong IMO.
--Matthiaspaul (talk) 18:52, 21 August 2021 (UTC)[reply]
So I hacked my module to preprocess {{DNB-IDN}} which works fine when not subst'd:
{{Literatur/sandbox |Titel=Title |DNB=1234567890}}
Title, DNB-IDN1234567890
but, when subst'd, this is the resulting template call from the same example:
{{citation|id={{Catalog lookup link|1234567890|||||||||article-link=DNB-IDN (identifier)|article-name=DNB-IDN|link-prefix=http://d-nb.info/|list-leadout=}}|title=Title}}
which works:
Title, DNB-IDN 1234567890
but is unacceptable so we will have to mimic {{DNB-IDN}} because I don't want to go down the subst rabbit-hole.
Trappist the monk (talk) 19:40, 21 August 2021 (UTC)[reply]
I'm sure I'm missing something. Why can't we just make the resulting template call look like:
{{citation|id={{DNB-IDN|1234567890}}|title=Title}}
Title, DNB-IDN 1234567890
--Matthiaspaul (talk) 19:54, 21 August 2021 (UTC)[reply]
Because transclusions are processed before the module is #invoked. This is why frame:expandTemplate() exists. Were the module to create {{DNB-IDN|1234567890}}, that thing that looks like a template would not be transcluded because modules only return text strings. To get 'round that, in the hack that I described above, the module called frame:expandTemplate() on {{DNB-IDN}} which returned the user-facing rendering of that template so the unsubst'd rendering looks correct. But, substitution is done before transclusion so the result of the subst is {{citation|id={{Catalog lookup link|...}} which is then transcluded and then the module is processed (which makes it look like everything worked).
New hack, mimicking {{DNB-IDN}}:
{{Literatur/sandbox |Titel=Title |DNB=770150675}}
Title, DNB-IDN770150675
and the subst'd wiki text:
{{citation|id=[[DNB-IDN (identifier)|DNB-IDN]]: [http://d-nb.info/770150675 770150675]|title=Title}}
It appears that {{DNB-IDN}} renders without the colon after the identifier label (compare the above with your example).
Trappist the monk (talk) 20:19, 21 August 2021 (UTC)[reply]
ZDB:
Title, ZDB-ID94467-1
and the subst'd form:
{{citation|id=[[ZDB-ID (identifier)|ZDB-ID]]: [http://ld.zdb-services.de/resource/94467-1 94467-1]|title=Title}}
Trappist the monk (talk) 21:58, 21 August 2021 (UTC)[reply]
Thanks, Trappist, for the great explanation. I really missed that point. At this point it appears it would be easier and more straight-forward to simply add support for |dnb= and |zdb= parameters to CS1/CS2. This would ease maintenance by removing "clutter" from the |id= parameter, and improve (reverse-)lookup facilities through better metadata.
Yes, {{DNB-IDN}} and {{ZDB-ID}} (as well as de:Vorlage:Literatur) render them without the colon.
--Matthiaspaul (talk) 22:17, 21 August 2021 (UTC)[reply]