Module talk:etymology/templates

From Wiktionary, the free dictionary
Jump to navigation Jump to search

Links to the same page[edit]

@Erutuon: Right now, {{desc}} works in a very different way to {{l}} when the link points to a different language section on the same page. At chwerw#Middle Welsh, under Descendants, if I write "Welsh: {{l|cy|chwerw}}", I get a link to chwerw#Welsh; but if I write "{{desc|cy|chwerw}}" I get bold-face chwerw with no link (as if it were a bare link [[chwerw]]). Can this be fixed so that a link is created? Thanks. —Aɴɢʀ (talk) 19:48, 9 April 2017 (UTC)Reply

@Angr: Oh, yes, that's right. Thanks for mentioning it. Done. — Eru·tuon 03:05, 10 April 2017 (UTC)Reply

Nil term[edit]

@Erutuon could you add a "-" nil option for terms in {{desc}} so that I can use it for cases like {{desc|sh|-}} which is parent to the Cyrillic and Latin forms? --Victar (talk) 20:57, 5 June 2017 (UTC)Reply

Done, though I wonder if it shouldn't have a different template. — Eru·tuon 21:17, 5 June 2017 (UTC)Reply
Thanks, Erutuon! I think the template should always have a colon, as per the nature of the template. An alternative could be {{etyl|sh|nocat=1|nolink=1}}: but I think {{desc|sh|-}} is more appropriate in this use and simpler to boot. --Victar (talk) 21:25, 5 June 2017 (UTC)Reply
@Erutuon, I had to restore the original. It worked for {{desc|sh|-}}, but not normal entries. =P --Victar (talk) 22:17, 5 June 2017 (UTC)Reply
@Victar: I went to a previous version and fixed it so it works in all cases. — Eru·tuon 22:38, 5 June 2017 (UTC)Reply
@Erutuon: Awesome, Thanks! --Victar (talk) 22:50, 5 June 2017 (UTC)Reply

@Erutuon, I'd like to be able to use null for the term, but still provide a definition and transliteration. Is that easily possible?--Victar (talk) 07:29, 1 March 2018 (UTC)Reply

@Victar: That can be done this way: {{desc|ar|t=huh|tr=blah}} → Arabic: [script needed] (blah, huh). — Eru·tuon 10:36, 1 March 2018 (UTC)Reply
@Erutuon: LOL, of course I know I can do that. What I'm trying to do is {{desc|pal|-|t=high|tr=/buland/}} and not get [script needed]. --Victar (talk) 14:55, 1 March 2018 (UTC)Reply
@Victar: It might be possible, but why do you want to do that? Is this word never going to have an entry for some reason? — Eru·tuon 18:37, 1 March 2018 (UTC)Reply
(I realize Middle Persian is written in Book Pahlavi among other scripts, and that B.P. isn't in Unicode, but there are Latin-script entries for these words as a workaround.) — Eru·tuon 18:40, 1 March 2018 (UTC)Reply
No, this would be used in descendents in descendent lists with multiple scripts:
* {{desc|pal|-|t=high|tr=/buland/}} *: Manichaean: {{desc|pal|tr=brnd}} *: Pahlavi: {{desc|pal|tr=blnd}}
Right now I'm having to manually type (/buland/, "high") --Victar (talk) 20:50, 1 March 2018 (UTC)Reply
@Victar: Ahh. Well, currently {{desc|language code|-}} calls the function in Module:links, which adds the [script needed] bit as well as the other information in brackets. I'd rather add this feature here than modify that module. How do you want it to look? — Eru·tuon 22:09, 1 March 2018 (UTC)Reply
@Erutuon: Well, {{l|pal|-|t=high|tr=/buland/}} yields - (/buland/, high), so the solution might just be to allow |1=- to pass through to {{l}}, and then filter the - out when it comes back into {{desc}}. --Victar (talk) 22:41, 1 March 2018 (UTC)Reply
@Victar: So, do you mean Middle Persian: (transliteration, “gloss”)? That's badly punctuated; the colon shouldn't have anything following it on the same line. — Eru·tuon 23:00, 1 March 2018 (UTC)Reply
@Erutuon: I'd like to {{desc|pal|-|t=high|tr=/buland/}} to yield Middle Persian: (/buland/, "high"). --Victar (talk) 23:06, 1 March 2018 (UTC)Reply
@Victar: Okay. Well, I don't like that format, but it would be best to templatize this so that it can be standardized. Creating a link and then deleting it is too hacky; I'll have to come up with another method. — Eru·tuon 23:47, 1 March 2018 (UTC)Reply
@Erutuon: I was alternatively also thinking I could do something like {{desc|pal|-}} {{translation|high|tr=/buland/}}. There are cases then as well, were I'll be not needing |1=, ex. {{translation|tr=/buland/}}. Perhaps we could integrate that module into {{desc}}, which might be less "hacky". --Victar (talk) 00:03, 2 March 2018 (UTC)Reply
Here is a straightforward practical example. --Victar (talk) 03:55, 2 March 2018 (UTC)Reply
There also is a potential need for a {{translation}} template when you have multiple non-Latin terms on a single line, and you want to associate the translation and translation with all the items on that line, i.e. 𐫟𐫇𐫏𐫁𐫢 (xwybš), 𐫟𐫇𐫏𐫢 (xwyš /xwēbaš/)𐫟𐫇𐫏𐫁𐫢 (xwybš), 𐫟𐫇𐫏𐫢 (xwyš) (/xwēbaš/). --Victar (talk) 04:13, 2 March 2018 (UTC)Reply

{{alter}} |trN= paraments[edit]

@Erutuon, I got another one for you, if you have a moment. |trN= don't seem to be getting parsed from {{alter}} properly. Here is an example. --Victar (talk) 22:47, 6 June 2017 (UTC)Reply

@Victar: I think this has to do with Module:descendants tree, not this module. — Eru·tuon 22:54, 6 June 2017 (UTC)Reply
@Erutuon: That's true, but {{desc}} pulls from that module with |alts=1. --Victar (talk) 22:57, 6 June 2017 (UTC)Reply
@Victar: In this case, {{desctree}} was the template with the problem. Anyway, it's fixed now. — Eru·tuon 23:16, 6 June 2017 (UTC)Reply
@Erutuon: Thanks! You rock! --Victar (talk) 23:21, 6 June 2017 (UTC)Reply

|alts= in {{desc}} broken[edit]

@Erutuon: |alts= in {{desc}} doesn't seem to be working anymore. Any ideas? --Victar (talk) 05:06, 21 July 2017 (UTC)Reply

I'm tracking the alts parameter to try to find examples of the problem. I don't know why it would suddenly stop working when it worked before. — Eru·tuon 18:31, 21 July 2017 (UTC)Reply
@Erutuon: Yeah, it's really strange. Thanks for looking into it. --Victar (talk) 18:40, 21 July 2017 (UTC)Reply
@Victar: The tracking function isn't finding anything. Could you point to some examples? — Eru·tuon 19:03, 21 July 2017 (UTC)Reply
@Erutuon: Sure. Check out the descendants sections of *-sneh₂. --Victar (talk) 19:12, 21 July 2017 (UTC)Reply
@Victar: Heh. The problem was the hyphens in the language name and code (Proto-Germanic, gem-pro). It was trying to find ProtoGermanic, ProtooGermanic, ProtoooGermanic, ... and gempro, gemmpro, gemmmpro, .... Escaping fixes the problem. — Eru·tuon 19:45, 21 July 2017 (UTC)Reply
@Erutuon: Ah! Sweet, thanks! --Victar (talk) 19:56, 21 July 2017 (UTC)Reply

tr param without a term specified[edit]

@Erutuon, the {{desc}} template needs to be updated so that the transliteration will display in the absence of a term (like {{l}} does: [script needed] (bšn)). Thanks. —JohnC5 21:45, 9 August 2017 (UTC)Reply

{{desc}} and {{l}} look to function the same to me in that respect. --Victar (talk) 00:16, 10 August 2017 (UTC)Reply
It looks okay to me: Middle Persian: [script needed] (bšn). — Eru·tuon 00:30, 10 August 2017 (UTC)Reply
@Erutuon: Welp, I think I must have messed something up. Sorry! —JohnC5 01:09, 10 August 2017 (UTC)Reply

Problem inheriting or deriving from a language family (showing up with tovarăș)[edit]

I'm trying to update the term tovarăș from

From {{etyl|sla|ro}} ''[[tovarištĭ]]'', comparable to Russian {{m|ru|товарищ|tr=továrišč}}.

but

From {{inherited|ro|sla|tovarištĭ}}, comparable to {{cognate|ru|товарищ|tr=továrišč}}.

gives an error message about The language or etymology language code "sla" is not valid., because line 181 explicitly disallows language families:

181  local source = fetch_source(args[2], "no family")

See:

From Lua error in Module:etymology/templates at line 20: The language or etymology language code "sla" is not valid., comparable to Russian товарищ (továrišč).

Whereas

From {{derived|ro|sla|tovarištĭ}}, comparable to {{cognate|ru|товарищ|tr=továrišč}}.

is not recognising that I've passed in the term tovarištĭ; it's just outputting [[w:Slavic languages|Slavic]]

From Slavic, comparable to Russian товарищ (továrišč).

My Lua isn't good enough to see why it's not working. — OwenBlacker | Talk 12:11, 18 November 2017 (UTC)Reply

"Slavic" is a language family, not an actual language, so it doesn't actually have terms. You probably meant Proto-Slavic? —Rua (mew) 12:32, 18 November 2017 (UTC)Reply
Also, Romanian isn't a Slavic language, so {{inherited}} is wrong anyway- it had to have been borrowed into either Romanian or one of its ancestors at some point. Chuck Entz (talk) 01:47, 19 November 2017 (UTC)Reply

Descendants - alts - error[edit]

The alts parameter creates an error message instead of just no text if it cannot find alt forms (example), which renders the entire parameter moot. I'd like to understand why that is the case, and get it fixed. Korn [kʰũːɘ̃n] (talk) 09:12, 18 June 2018 (UTC)Reply

@Korn: The assumption seems to have been that you wouldn't use the parameter unless there was actually an Alternative forms section for that language. I suppose it is easier if you can add the parameter without checking for alternative forms. — Eru·tuon 21:12, 18 June 2018 (UTC)Reply
Well, if I have to regularly check for whether there are alt forms on my own and then add the tag manually only when I find them to be there, I've gained no benefit of automatisation from the module. I cannot tackle this myself, I don't understand the jungle of modules our local coding coven has made mainly for their own administration. Korn [kʰũːɘ̃n] (talk) 21:18, 18 June 2018 (UTC)Reply
@Korn: I removed the error message for a missing Alternative forms section in Module:descendants tree, where the error message was triggered. Hopefully no one will object. — Eru·tuon 21:57, 19 June 2018 (UTC)Reply
Thanks, @Erutuon! --Victar (talk) 04:04, 20 June 2018 (UTC)Reply

2nd gender parameter[edit]

Can someone add a g2= parameter? For {{cog|de|Worb|g=m|g2=f}} I'm getting this: German Worb m or f. Thanks, Julia 17:14, 11 March 2019 (UTC)Reply

You can combine genders with hyphens. DTLHS (talk) 17:16, 11 March 2019 (UTC)Reply
No, you can't. Hyphens are for separating the different parts of a single specification. —Rua (mew) 17:18, 11 March 2019 (UTC)Reply
See Special:WhatLinksHere/Template:tracking/gender_and_number/multiple for a list of all entries that use an invalid gender specification. It looks like the vast majority were actually your doing, so can you please fix them? —Rua (mew) 17:31, 11 March 2019 (UTC)Reply
No. Make it throw a module error if it's that big of a problem. DTLHS (talk) 17:34, 11 March 2019 (UTC)Reply

{{desc}}, {{desctree}} changes[edit]

@Benwing2, can you explain your changes to {{desc}} and {{desctree}}, particularly "implementation supporting multiple terms"? Is there a discussion I missed? @Erutuon, Rua --{{victar|talk}} 03:17, 27 November 2020 (UTC)Reply

@Victar I was about to post about this. I implemented multiple terms using term2=, term3= etc. to allow replacing this:
  • {{desc|LANG|foo}}, {{l|LANG|bar}}, {{l|LANG|baz}}
with this:
  • {{desc|LANG|foo|term2=bar|term3=baz}}
What I'd like to do, however, is change {{desc}} so that the following works, similar to {{alter}}:
  • {{desc|LANG|foo|bar|baz}}
This requires that we move the existing 3= to alt= and the existing 4= to t=. I don't think there are all that many existing uses of 3= and 4=, so this shouldn't be too hard. What do you think? Benwing2 (talk) 03:21, 27 November 2020 (UTC)Reply
BTW I slightly broke things, give me a sec to fix it. Benwing2 (talk) 03:22, 27 November 2020 (UTC)Reply
@Benwing2: That feature was discussed before, and I myself, don't support that addition. --{{victar|talk}} 03:44, 27 November 2020 (UTC)Reply
@Victar (e/c) The motivation for these changes was that it's impossible to write this:
  • {{desctree|LANG|foo}}, {{l|LANG|bar}}, {{l|LANG|baz}}
because the 'bar' and 'baz' terms will end up after the whole tree and badly formatted, instead of before the tree on the same line as 'foo'. Benwing2 (talk) 03:45, 27 November 2020 (UTC)Reply
Ummm, don't support {{desc|LANG|foo|bar|baz}}, or don't support the addition of this feature in any form? Why not? Benwing2 (talk) 03:46, 27 November 2020 (UTC)Reply
@Benwing2: The latter. It's unneeded. There really should have been a discussion first. --{{victar|talk}} 03:52, 27 November 2020 (UTC)Reply
I'm not sure why that's a relative motivation, but no one should ever need to do {{desctree|LANG|foo}}, {{l|LANG|bar}}, {{l|LANG|baz}}. People should be filling in {{alter}} on the relative page. --{{victar|talk}} 03:52, 27 November 2020 (UTC)Reply
@Victar The original motivation was that I was trying to obsolete {{etymtree}} and in fact the usage you claim should not be needed is quite common, and the terms aren't always suitable for Alternative forms. Benwing2 (talk) 03:59, 27 November 2020 (UTC)Reply
@Benwing2: In the rarest case you would need to exclude Alternative forms, you could do: {{desc|LANG|foo}}, {{l|LANG|bar}}, {{l|LANG|baz}} {{desctree|LANG|foo|noparent=1}}. --{{victar|talk}} 04:04, 27 November 2020 (UTC)Reply
@Victar This is really ugly syntax, as for that matter is the very common {{desc|LANG|foo}}, {{l|LANG|bar}}, {{l|LANG|baz}}. It's even worse if LANG is an etymology language, because then the {{l}}'s have to use the parent language. I still don't see why you prefer this syntax over the simpler syntax {{desc|LANG|foo|bar|baz}}. This works very much like {{alter}}, which replaced earlier invocations of {{l|this}}, {{l|that}} in a similar fashion. Benwing2 (talk) 04:15, 27 November 2020 (UTC)Reply
In fact, given how much you create descendant lists, I'm very surprised to see you're not in favor of the simpler syntax. Benwing2 (talk) 04:16, 27 November 2020 (UTC)Reply
@Benwing2: You are, of course, welcome to that opinion, but you should revert your changes and start a discussion first to gauge support for their implementation. --{{victar|talk}} 05:15, 27 November 2020 (UTC)Reply

@Benwing2: You also removed [Term?] from {{desc}}? Can you please revert your edits and start a new discussion about implementing your changes? --{{victar|talk}} 20:19, 28 November 2020 (UTC)Reply

@Victar I just saw all your messages and reverts; real life intervened in a big way. I did not intentionally remove any functionality and I'm not terribly happy that you feel the need to force this issue over some added functionality that (modulo a few accidental edge cases) caused you no harm. I will definitely be starting a BP discussion. Benwing2 (talk) 06:38, 1 December 2020 (UTC)Reply
@Benwing2: I figured real life snagged you, which I why I didn't wait on you. Hope everything is OK. @Erutuon guessed that the above was unintended. It really does affect me considerably because filling {{desc}} term requests is something I often do and visually seeing if a term in nulled out with {{desc|lang|-}} is really helpful. I'm not totally opposed to multiple terms -- my largest argument against it is I don't want to promote people being lazy and not using {{alter}} on the proper pages. I look forward to the discussion. --{{victar|talk}} 21:28, 1 December 2020 (UTC)Reply

{{desc}}: moving alts after translation; automatic transliteration; multiple-form translation[edit]

  • Would moving alts after the translation be possible and agreeable? The usual and expected approach in etymology is to list all the forms and then give a translation, and that the translation currently preceeds the alt forms is confusing; doubly confusing if you add a qualifying text after, so that it's impossible to tell which of the forms the qualification belongs to.
  • Come to think of it: currently alts=1 automatically gives transliteration, but not the default - this doesn't seem helpful. Is there a reason transliteration shouldn't be made automatic for main forms as well?
  • In case of several forms, all with transliterations, I think it's desirable that the translation be given in separate brackets with the text "all meaning X" - otherwise it will again raise questions as to which forms the translation belongs to.
  • Ottoman Turkish: زغر (hound), زاغر (zağar), زغار (zağar), زاغار (zağar) (of a particlar breed) Brutal Russian (talk) 06:57, 28 April 2021 (UTC)Reply