Template talk:Etymology

Page contents not supported in other languages.
From Wikipedia, the free encyclopedia
WikiProject iconLinguistics: Etymology Template‑class
WikiProject iconThis template is within the scope of WikiProject Linguistics, a collaborative effort to improve the coverage of linguistics on Wikipedia. If you would like to participate, please visit the project page, where you can join the discussion and see a list of open tasks.
TemplateThis template does not require a rating on Wikipedia's content assessment scale.
Taskforce icon
This template is supported by Etymology Task Force.

Move to Template:Etymology[edit]

The following discussion is an archived discussion of a requested move. Please do not modify it. Subsequent comments should be made in a new section on the talk page. No further edits should be made to this section.

The result of the move request was: moved, new template, seems uncontroversial billinghurst sDrewth 03:45, 8 July 2010 (UTC) billinghurst sDrewth 03:45, 8 July 2010 (UTC)[reply]



Template:EtyTemplate:Etymology — As a result of discussion at Wikipedia:Requested templates#Etymology, first {{etymology}} was created and then {{ety}} as an alternative implementation. As there seems to be a consensus that this template is better, I think this one should be moved to the proper name (along with all subpages). Svick (talk) 16:35, 30 June 2010 (UTC)[reply]

Qualified support. I've changed the doc and testpages so that this and any subsequent moves should work without having to recode them to the new names.
However, I think {{Ety/List}} deserves to be a template in its own right instead of a subtemplate. I'd suggest {{Enum}} (for enumerate) as it is not used and relatively brief name. ({{Enumerate}} could be a redirect, or vice versa). Si Trew (talk) 07:57, 1 July 2010 (UTC)[reply]
I've taken WP:BOLD and moved the templates to {{Enum}} and subpages thereof, since I think that is uncontroversial. So now the "Ety" hierarchy comprises only itself, its doc and subpages, and those for "Ety/Part".
This therefore becomes pretty much a question of either the proposed move or whether {{Ety}} stays where it is and {{Etymology}} becomes a redirect to it. Si Trew (talk) 09:56, 1 July 2010 (UTC)[reply]
The above discussion is preserved as an archive of a requested move. Please do not modify it. Subsequent comments should be made in a new section on this talk page. No further edits should be made to this section.

Original discussion AT Wikipedia:Requested Templates[edit]

With consent, this discussion has been moved from WP:RT, where it was listed and gave birth to this template. Si Trew (talk) 08:30, 5 July 2010 (UTC)[reply]

There is a great deal of variation in the way Wikipedia articles display etymology, both in style and placement. I recommend the creation of a new template, as well as guidelines for it's use. Specifically, I think that the guideline should be to place the etymology in the opening paragraph of each article (like you might find in a dictionary), and the template should simplify the process into language-word-meaning format. Here are a few examples, showing the current versions, followed by my recommendation:


Dinosaurs are a diverse group of reptiles. [...] The term "dinosaur" was coined in 1842 by the English paleontologist Richard Owen, and derives from Greek δεινός (deinos) "terrible, powerful, wondrous" + σαῦρος (sauros) "lizard".
Dinosaurs (from Greek δεινός (deinos), meaning 'terrible, powerful, wondrous', and σαῦρος (sauros), meaning 'lizard') are a diverse group of reptiles. [...] The term "dinosaur" was coined in 1842 by the English paleontologist Richard Owen.


Biology is a natural science concerned with the study of life and living organisms, [...] The term biology in its modern sense appears to have been introduced independently by Karl Friedrich Burdach (1800), Gottfried Reinhold Treviranus (Biologie oder Philosophie der lebenden Natur, 1802), and Jean-Baptiste Lamarck (Hydrogéologie, 1802). It was inspired by the Greek word βίος, bios, "life" and the suffix -λογία, -logia, "study of."
Biology (from Greek βίος (bios), meaning 'life', and -λογία (-logia), meaning 'study of-') is a natural science concerned with the study of life and living organisms, [...] The term "biology" in its modern sense appears to have been introduced independently by Karl Friedrich Burdach (1800), Gottfried Reinhold Treviranus (Biologie oder Philosophie der lebenden Natur, 1802), and Jean-Baptiste Lamarck (Hydrogéologie, 1802).


A eukaryote (pronounced /juːˈkæri.oʊt/ ew-KARR-ee-oht or /juːˈkæriət/) is an organism whose cells contain complex structures enclosed within membranes. The defining membrane-bound structure that sets eukaryotic cells apart from prokaryotic cells is the nucleus, or nuclear envelope, within which the genetic material is carried. The presence of a nucleus gives eukaryotes their name, which comes from the Greek ευ (eu, "good") and κάρυον (karyon, "nut" & "kernel").
A eukaryote (pronounced /juːˈkæri.oʊt/ ew-KARR-ee-oht or /juːˈkæriət/) is an organism whose cells contain complex structures enclosed within membranes. The defining membrane-bound structure that sets eukaryotic cells apart from prokaryotic cells is the nucleus, or nuclear envelope, within which the genetic material is carried. The presence of a nucleus gives eukaryotes their name (from Greek ευ (eu), meaning 'good', and κάρυον (karyon), meaning 'nut, kernel').


All these are single-language, two-word examples. There are also words that are derived from more than one language (or more than 2 words). For example, sociology (from Latin socius, meaning 'companion', and Greek -λογία (-logia), meaning 'study of-'), (don't quote me on that!) in which case a language-word-meaning-language-word-meaning... format would be necessary. It's hard to come up with a mark-up format, especially considering that I'm not really sure how templates work, but there it is. I've said what I wanted to say. Sorry for the long-winded post, or if this is in the wrong place - you know how it is! Best of luck to whomever takes the baton. :)

Nagualdesign (talk) 04:49, 24 June 2010 (UTC)[reply]

I have created first version of the template: {{etymology}}. Svick (talk) 15:25, 24 June 2010 (UTC)[reply]
Brilliant! But may I suggest a very minor change? Could you place a second comma after "Meaning1". That way the meaning is properly parenthesized. Did I just make that word up? Well, you know what I mean. Thanks Svick! :)
By the way, before I start deploying the new template here, there and everywhere, is there somewhere I should make an announcement to the community? Basically, I want to move etymology statements up into the first paragraph of an article wherever I see fit. Nagualdesign (talk) 19:59, 24 June 2010 (UTC)[reply]
Well, Wikipedia is not a dictionary. There certainly are encyclopaedic uses for this template, but in my opinion it should be used sparingly, and only where relevant (and sourced). You could bring this up at the Village Pump or the Manual of Style talk page, preferably before you deploy it. Intelligentsium 20:53, 24 June 2010 (UTC)[reply]
I second that. while I think this is an interesting idea, you can be sure of two things: (1) someone is going to want to modify it, and (2) someone is going to hate it. you'd best give those people a chance to air their views before you try to edit it into masses of pages. --Ludwigs2 21:00, 24 June 2010 (UTC)[reply]
Thank you for the feedback. To be clear, I was only suggesting that etymology statements that already exist in various formats be moved closer to the top of the page. From Wikipedia is not a dictionary; "Wikipedia articles should begin with a good definition and description of one topic, however, they should provide other types of information about that topic as well." I personally find etymology to be a great mnemonic but, due to a lack of standardization, I'm often left scanning a page to find the etymology, which may or may not be present. I'm no wordsmith, but I am a professional designer, and I'm irked by so many differences in style - it makes it look like Wikipedia was written by lots of individuals, with individual tastes. :P Nagualdesign (talk) 23:15, 24 June 2010 (UTC) PS. It is not my mission in life to edit masses of pages![reply]
But WP was and is "written by lots of individuals, with individual tastes". What's your point there? Si Trew (talk) 22:38, 25 June 2010 (UTC)[reply]
The point is that it shouldn't look that way – ideally the whole Wikipedia should be consistent where it makes sense. Svick (talk) 22:46, 25 June 2010 (UTC)[reply]
I'm not sure if I agree with that. Even attributed encyclopaedias are written by lots of different people, and although they will conform (or try to) to some overall style guide, no one person is going to edit the whole lot to a "consistent" style. And in any case, I know my own style changes depending on the kind of article I am writing. I am not really arguing with you here: consistency is generally good, but "a foolish consistency is the hobgoblin of small minds".
There's probably a strong case for improving etymologies of nouns such as placenames, surnames, names of products and so on, which are not generally well served by the dictionaries. However, in these cases frequently there might be more need for a separate section instead of a simple inline etymology. I really do have no problem with the template – all to the good – only with trying to crowbar it into a guideline where I don't think it's suited. I suppose what you are implying is "a certain kind of article should follow a certain order of sections", but beyond the top-and-tail of the article (lead, references, external links and so on) the meat of it doesn't have to follow any particular order. Of course, individual projects often specify more constrained orders, as is their proper right and function, but any particular article doesn't have to belong to a project (and I imagine that if an article is in the sights of more than one project, there may be conflicting constraints on them.)
This is all rather academic with you, good luck with the template, little by little we make progress. I'll keep it in mind to use it when it makes sense to me. Best wishes Si Trew (talk) 11:13, 26 June 2010 (UTC)[reply]

As per Intelligentsium's recommendation, I have moved the formatting standards part of this discussion over to the Manual of Style talk page. Please leave comments on that page, unless you wish discuss Svick's template here. Nagualdesign (talk) 00:14, 25 June 2010 (UTC)[reply]

Sometimes, a complex etymology requires more space, and perhaps its own section within an article, possibly in addition to a condensed version. Some examples can be found at List of country name etymologies. (See also Lists of etymologies.)—Wavelength (talk) 00:59, 25 June 2010 (UTC)[reply]
I agree that WP:NOTDICT but that neither requires nor excludes an etymology; it should be made clear that this is not something "expected" of an article (I don't think the proposer is suggesting that).
I don't see that etymologies should particularly be in the lead; it depends if they are that important. I'm thinking of different categories of things that might or might not give them due or undue prominence: physical objects, placenames, surnames, names of species/genera etc, fungible objects, and so on.
A similar claim on such a positioning in the lead tends to exist when placenames differ in multiple languages or are named differently by different cultures even in the same language (e.g. Londonderry). The alternate there is given in this kind of parenthesised form; do we then have an etymology for each? Nested parentheses? Which comes first? Doesn't it get rather confusing?
One precedent is that for biographicsal articles, where dates of birth and death are quite rigidly prescribed.
So, I have no trouble with this template being made, but would not want it to start creeping into MOS: it should be entirely optional and left to editors' judgment. Si Trew (talk) 22:34, 25 June 2010 (UTC)[reply]
I've added some testcases. It's not very friendly when bad input is supplied.
In doing so, I also realised that it's overdoing a bit when a foreign word has been taken into English unaltered; i.e. either its orthography or its meaning is unchanged. Ideally I should like blank fields there to suppress parts of the output, for example for café:
What I'd like is:
  • {{etymology|fr|coffee}}
  • {{etymology|fr|café}}
  • {{etymology|fr}}
What we get now is:
What I'd like to get is:
  • "from French, meaning 'coffee'" (omit the identical spelling)
  • "from French: café" (omit the identical meaning)
  • "from French" (omit both)
This is a contrived example (without checking, I don't know if café comes from French meaning "coffee house" or from French meaning "coffee") but I hope you see the point; there's no point giving the meaning or spelling if the loanword has identical meaning or spelling or both.
I think that it would be possible to change the template to cope with blank fields; omitting the fields entirely would be more tricky (i.e. there's no easy way to decide if a field indicates a language marker or a spelling, especially in the two-words case, so to "shift" the parameters down to take account of the omission is perhaps more tricky.)
I'm happy to code this up if there is any consensus.
On a more minor note, the documentation says "one word", "two words, same language" and "two words, two languages". I don't know if "word" is tbe best nomenclature there; one example in fact has multiple words for a "word". I didn't change it as I am not sure of a better word; "part" sprang to mind but is rather general.
Trivially, I think a redirect {{etym}} or {{ety}} might be handy.
Best wishes Si Trew (talk) 15:16, 26 June 2010 (UTC)[reply]
Perhaps Morpheme would be more correct, but is itself an unusual word. Given that this will only be viewed by editors (who, presumably, understand the thrust of the documentation), and will not feature in the encyclopedia proper, I think I prefer Word Part. It says what it is and also works as a 'variable' name (..Word Part 1|Meaning 1|Word Part 2...) Everything else you said I agree with. Regards, Nagualdesign (talk) 23:49, 26 June 2010 (UTC)[reply]
I think "stem" would be more appropriate than "morpheme". The template has the issue that it can support a second language only if a meaning is provided for the second "word part". I or someone else might be able to find a way to fix this, but it may be necessary to name the parameters. Intelligentsock 00:39, 27 June 2010 (UTC)[reply]
Thanks to User:Intelligentsock and User:Svick for adding the empty parameters (which does make my above examples somewhat meaningless now that they work, but that is always the fate of these things unless one hard-codes them with their output).
I don't see why there should be a problem in principle with the first and second "word parts" having the same grammar (or third or fourth and so on if we were to support them). The metagrammar is of the form (language|orthography|meaning) and so always has three parts; the second or third can be empty but not missing. I deliberately chose that for my suggestion for this very reason, otherwise it's hard to determine which bit is missing.
Named named parameters would seem to be rather overboard if we can avoid them; while they are great for long templates, they are clutter for short ones, in my opinion.
If third or fourth parts are necessary, I'd suggest that processing this triple goes into a subtemplate which is then invoked for each triple. In that way all the main template does is conjoin them with a comma or "and". (Is there a template that does that? Like, "list" or something? It would be very handy in lots of cases.)
I'll update the doc and testcases to include these cases. I don't mind if the template doesn't do what the doc says right now, if it's agreed that it's what it should do then that's just a bug! i.e. treat the documentation as specification. Si Trew (talk) 04:26, 27 June 2010 (UTC)[reply]
Actually I've realised that if part of the word comes from English, it might be useful to omit the language parameter (assume english). Not to save having to type the "en" but to avoid the etymology saying "(from English ...". For contrived example, "uberbunny" (from German uber, over, and bunny). My Collins Concise does it this way, although others may think it is confusing (it only works in the Collins really because bunny would be in small caps). Necessarily I can't think of a real life example right now (though there are thousands)! Si Trew (talk) 04:31, 27 June 2010 (UTC)[reply]
Currently, the second language is not displayed (nor entered), if it is the same as the first one, so omitting it, if it's English, would be ambiguous. Compare (from German uber, meaning "over", and bunny) and from German uber 'over', and Hase (produced by {{etymology|de|uber|over|Hase}}). Svick (talk) 17:33, 27 June 2010 (UTC)[reply]
Yes, I agree it could well be ambigious; as I say my Collins does it that way (I think my Shorter Oxford does too, but there the small caps indicates that it is English, but as a consequence of the fact that it is a headword in the dictionary. Therefore our analogy would be that the second word was linked; that is, it would say '(from German: uber, meaning "over", and bunny)'. I admit there is still a problem there if the linked word is also in the foreign language, as might well happen with Nazi terms, for example. I don't think it would be ambiguous in the majority of cases, and the ambiguity could be easily solved just by the trasncluding editor adding the "en" in manually, but on the other hand these are all edge cases that are perhaps not worth worrying about, at least not right now. Si Trew (talk) 09:02, 28 June 2010 (UTC)[reply]

So would we all agree that adopting a single "Many Word Parts, Many Languages" parameter format, and allowing fields to be left blank, and extraneous fields at the end to be omitted, would simplify the whole process?
ie, {{etymology|lang1|word1|meaning1|lang2|word2|meaning2|lang3|word3|meaning3|..ad nauseum}}
Provided that the user sticks to groups of 3 parameters, that is! (4, 7, 10, 13 or 16 should suffice). Basically, I'm saying let's get rid of the current "Two Word Parts, One Language" mark-up. Do enter a second language, just don't display it if it's the same as the first. one before it.
eg, {{etymology|grc|βίος (bios)|life|grc|-λογία (-logia)|study of-}}
~ (from Ancient Greek βίος (bios), meaning "life", and -λογία (-logia), meaning "study of-")
Nagualdesign (talk) 04:42, 28 June 2010 (UTC)[reply]

I'd agree with that.
I think I will have a go at my own implementation incorporating the comments I have made here. That's not to criticize the great constructive work by everyone here (an example everyone should be proud of) but to hold it up for comparison. I'll let you know when I've finished it (see you some time in 2015 with the usualy vermicelli from Italian vermi 'worms' Si Trew (talk) 09:10, 28 June 2010 (UTC)[reply]

I've been trying to find a good, real-world example to sum up everything. It's no easy task, I'm sure you'll agree, but here's a nice little one:

The ngoja kidogo bush (from Swahili ngoja, meaning "wait", kidogo, meaning "a little", and bush), or Wait-a-bit thorn bush, is the common name for several species of Acacia, including Acacia brevispica, Acacia colletioides, Acacia cuspidifolia and Acacia greggii...

For which the etymology code would be: {{etymology|swahili|ngoja|wait|swahili|kidogo|a little||bush|}} I'm not sure what the code for Swahili is, and the bush bit is probably unnecessary, really, but you get the gist.

Nagualdesign (talk) 06:24, 28 June 2010 (UTC)[reply]

May I suggest taking a look at the etymology at Anniversary(WP; versioned link), which is pretty much what is desired as far as being in the lead and so on, but is hard to crowbar into the current template:
  • There's no part for the date of first use. That could perhaps be usefully and easily added as an optional free-form named parameter date= (since some dates of introduction are known more accurately than others). I leave it to others to decide where best this would be placed: My dictionaries tend to show it at the start; but in a general encyclopaedic article a reader may not automatically associate a date with otherwise no introduction to be part of an etymology. i.e. "(13th century, from Latin...)" might be a bit jarring to many readers.
  • This example further derives Latin: anniversarius from [annum] Error: {{Lang}}: text has italic markup (help) "year" and Latin: versus "to turn", which in this example are not given in the Latin but only in English. My attempts to use etymology template here fail because the parentheses or quote marks are never where I want them, whether I try to put the extended derivation entirely inside or outside the template transclusion. This leads me to suggest that perhaps there should be a named parameter disp= (as an analogy with that in {{convert}} to disable the parens, quotation marks, or both.
I hope these suggestions are taken in the constructive manner they are given. Best wishes Si Trew (talk) 08:44, 28 June 2010 (UTC)[reply]

Alternative implementation[edit]

Taking note of the points raised above, I have created an alternative implementation at {{Ety}} and subtemplates, of which {{Ety/Part}} is substantially "borrowed" from {{Etymology}}; the other two parts are {{Ety/List}} and {{Ety/ListItem}} which construct lists separated by commas and " and ".

I think this nicely separates the two concerns of making an etymology for a "part" and constructing the list of those parts.

Its main incompatibility with the existing {{Etymology}} is the case of "two parts, same language", which in {{Ety}} requires an extra blank parameter. This could, of course, be made a special case (check if there are exactly five parameters), but I am not sure that is worthwhile or even useful to do, considering the questions asked above: keeping it to three parameters for each part makes it regular, and so perhaps easier to remember the syntax, at the expense of having to specify blank parameters.

{{Ety}} currently handles up to four "parts" but, as a cursory look at the implementation will reveal, it could easily be expanded to handle up to eight, or beyond. Eight seems to be a kinda "magic number" with templates designed to handle arbitrary numbers of parameters, so I've followed that lead for that in {{List}} (but Ety only handles four at the moment: I can't really imagine many words would have more than four parts to their etymology, at least not without needing further explanation (floccinaucinihilipilification, for example)).

All the templates have documentation and test cases, although I know some don't like the style that I write that in. For me it is clear, but then I'm a computer programmer.

The named parameters in Ety/List are not implemented yet; I had trouble correctly not passing them down to the child Ety/ListItem if they are not present. As regulars here no doubt know (and I only half-know), leading and trailing spaces are handled differently (not stripped) for named parameters and this can lead to fun when passing them down to subtemlates; my attempts were not successful so I gave up for now; I've done it on templates elsewhere but can't remember where. To that end, I am somewhat amazed there is not a "List of items" template in general, since it would be very handy as a helper for all kinds of templates, but I can't find one. I think I should check 'my' {{Time of day in words}} which I think uses that technique, and try again, but for now I can live without it.

My aim of all this, then, is by decoupling "list" from "etymology of part" we can discuss one without the other. Please do accept this is not an attempt at subversion or "I can do better than you" but to give us all a different implementation so we can refine any requirements we have.

I realise at this stage it may be better to take this discussion to one of the two templates' talk pages; I'll happily redirect Template Talk:Ety to [[Template Talk::Etymology]] if you want.

As always, I apologies for making this way too long, a bad habit of mine.

Best wishes Si Trew (talk) 10:02, 29 June 2010 (UTC)[reply]

I think your way is better. I changed the templates so that they can handle empty language parameter and created testcases. Svick (talk) 16:22, 29 June 2010 (UTC)[reply]
Thanks for that, yes I didn't have test cases for the main template, I admit it. Neither I think for Ety/Part cos really the examples are about as much as a test as one could really do. I've remembered how to do the "empty named parameters" business from {{Number to word}} so I might try to get those working, it does make it more verbose though. Si Trew (talk) 16:47, 29 June 2010 (UTC)[reply]
Yeah, nice work Si, but as with Svick's template (since corrected) I have a very minor niggle. Wherever implemented, the meaning part is parenthetical and should therefore be followed by a comma, even when followed by an "and".
eg, Anniversary (from Latin annum, meaning "year", and versus, meaning "to turn")
Nagualdesign (talk) 22:56, 29 June 2010 (UTC)[reply]
Personally I prefer " and " without the comma, but I'll let this lie – I can see your point about it being parenthetical. The {{Ety/List}} template "should" pipe through a named parameter "and" which allows you to set it to whatever you like (specifically to allow you to set it to a comma, or not), but I haven't implemented that fully yet. Si Trew (talk) 12:44, 30 June 2010 (UTC)[reply]
I've been programming since I was 8 years old, so I realize this is a bit of a challenge just for a minor formatting issue, but such is the way with these things. It's actually made me want to learn whatever language Wikipedia uses, so any pointers (to documentation and such) would be greatly appreciated.
Kind regards, Nagualdesign (talk) 23:06, 29 June 2010 (UTC)[reply]
It's really just a string substitution language, and yes, it is rather opaque! For myself I found the easiest way to learn it was just to look at existing templates until it made sense. However, some good starting points are Help:Magic words, [1] and [2]. From there I'm sure you'll be able to navigate your way around. Si Trew (talk) 12:44, 30 June 2010 (UTC)[reply]
I solved it the same way as in the original template – by adding a comma before “and” every time. You can read more about how templates are created at Help:Template (parser functions like {{#if}} are especially useful here). But if you are used to programming in any sane language, you will be probably surprised how limited and “hacky” the system is. Svick (talk) 23:44, 29 June 2010 (UTC)[reply]
Hmmm.. I'm a big fan of the KISS principle, but are you sure that that covers all possible implementations? Even where the meaning is excluded? Just a thought - though I can't think of a good example.
And thanks for the heads-up. I've actually been pouring over Help:Template and other pages for the last few hours (before reading your comment). To be honest, I think I'll find it easier to learn by example, using yours and Si's templates and such (once I've had a good nights sleep!) I've learned a few languages over the years: BASIC (I was born in 1977!), Pascal, HTML, PHP, SQL/MySQL, JavaScript. Never did learn C++. Looking forward to adding another string to my bow. But anyway, I guess I'm going on a bit. I must say before I pop off that it's been a pleasure working with you guys, and this experience has made me want to do more with Wikipedia in the future. Kudos to all involved. :)
Night night, Nagualdesign (talk) 04:18, 30 June 2010 (UTC)[reply]

RE: "The {{Ety/List}} template "should" pipe through a named parameter "and" which allows you to set it to whatever you like" (by Si Trew)
The original reason for me requesting this template was because of the various ways in which people have written in-line etymologies. Some use "+", some use "&", different parts are variously italicized, placed within 'single quotes', some "double quotes"... I could go on. My point is that we are here to simplify and standardize. The style we have been using seems to capture the best qualities of readability, so why allow the user to set parts of that format to whatever they like? If the user wishes to, they can of course hard-code the whole thing, write an entire etymology subsection, include date of first use (although WP:NOTDICT, remember), et cetera. In short, and without wishing to sound contrary, I think this template may begin suffering from creeping featuritis if we are not careful to reel ourselves in. I think that what we have achieved here is great, but perhaps it is time to put this discussion to bed, so we can start implementing it within the article pages. What say you?
Kind regards, Nagualdesign (talk) 14:55, 30 June 2010 (UTC)[reply]

I'd not intended {{Ety}} to allow the "and" to be set; but {{Ety/List}} is more general and the only reason I've made it a subtemplate is that I imagine another already exists that does its job, but I can't find one. So I might make List a top-level template, and in that more general case I think that the and= parameter is more useful.
Yep, if this template meets requirements, let's go ahead and use it. If others agree, I'd copy this discussion to its talk page, or at least refer from there to here (once archived). Si Trew (talk) 16:21, 30 June 2010 (UTC)[reply]
In that case, I think we should move {{ety}} (along with all the subpages) over {{etymology}}, so I requested the move. {{ety}} can be left as a redirect. Svick (talk) 16:36, 30 June 2010 (UTC)[reply]
I've changed all the doc and testcases to use {{BASEPAGENAME}} so that when moved there's no need to change them. However I can't seem to do that to have "relative references" in {{Ety}} itself (and possibly {{Ety/List}} too) since references are relative to the transcluding page, not the template itself. I have tried various ways around that without success; I would have thought there was a way, because it's pretty obvious one wants to build up a subtree in this manner, but I can't find one. "../somewhere" seems to work but not just "/somewhere". If you know of a way, fixing {{Ety}} to do it that way would be useful. ("./somewhere"?) Si Trew (talk) 07:54, 1 July 2010 (UTC)[reply]

Examples[edit]

Here's some examples that are mentioned above. They might be useful in the doc:

  • Dinosaurs from Ancient Greek δεινός (deinos) 'terrible, powerful, wondrous', and σαῦρος (sauros) 'lizard'
  • Biology from Ancient Greek βίος (bios) 'life', and -λογία (-logia) 'study of-'
  • Eukaryote (pronounced /juːˈkæri.oʊt/ ew-KARR-ee-oht or /juːˈkæriət/) from Ancient Greek ευ (eu) 'good', and κάρυον (karyon) 'nut, kernel'
  • Café from French 'coffee'
  • Ngoja kidogo bush from Swahili ngoja 'wait', kidogo 'a little', and English bush
    • Alternatively, from Swahili ngoja 'wait', kidogo 'a little', and bush
  • Anniversary from Latin anniversarius; from annum 'year', and verso 'turn'

I do note the parentheses here are perhaps ugly; but all kinds of other things would suffer that fate (e.g. a place's toponymy + pronunciation, a person's dates of birth/death + pronunciation, and so on). Si Trew (talk) 08:00, 2 July 2010 (UTC)[reply]

Parenthesis of meaning[edit]

I've taken the liberty of changing the way {{Ety}} (with {{Ety/Part}}) implements the parenthetical "meaning" part. The fact is, at least to my eyes, the comma is only needed if the meaning is present AND there is another part afterwards. So we expect:

(From French port and manteau) – no meaning, no comma
(From French port, meaning "carry", and manteau, meaning "cloak") – meaning, so comma
(From Greek tele and Latin visio) – again, no meaning, no comma

This is how I interpret User:Svick's desire for parenthesis of the meaning (and follows the general rules for using commas for parentheses).

To do this I've changed {{Enum/Item}} to have " and " without the comma as the default. I could pipe this through anyway (setting the and= parameter of the transclusion {{Enum}}), but more properly we don't want "A, and B" in the general case. Then, in {{Ety/Part}} a fourth parameter can be passed to indicate if there is another part coming afterwards (since we don't want the comma if we're going to close the whole etymology with a closing paren). All we do here is pipe the first parameter of the next "triple", which may or may not be present. And job's a good 'un.

Hope this all makes sense and you agree it's better for the general case (i.e. no comma when no meaning). To write "(from French, and English)" for example, would look strange to me.

On a minor point I notice the doc was changed somewhere from "parentheses" to "brackets", personally I prefer to use (parentheses), [brackets], and {braces} as terms for those, but I realise different distinctions are made in different subject areas.

Best wishes Si Trew (talk) 08:47, 2 July 2010 (UTC)[reply]

I agree, (parentheses), [brackets], and {braces} are terms that I would use. Curly brackets just sounds silly (like saying comma with a dot above it!). It doesn't matter that the page I linked it to is called Brackets (which is also an umbrella term for all 3), and parens isn't at all common. Parentheses is totally unambiguous. nagualdesign (talk) 01:38, 3 July 2010 (UTC)[reply]
I noted also that {{Ety}} expected the first parameter of each treble to be non-empty were it to be processed. I've changed that so it processes it, via {{Ety/Part}}, if any part of the treble is non-empty. That's as it should be. Si Trew (talk) 09:01, 2 July 2010 (UTC)[reply]

Really, can we close this now?[edit]

With consent, can I now move this discussion to Template Talk:Ety? Thanks. Si Trew (talk) 09:02, 2 July 2010 (UTC)[reply]

Sorry for the late reply. Definately, yes to the above. I like the Examples too - much better for the /doc than the word "example". And the other examples ("portmanteau" and such) are exactly the kind of thing I was struggling to put my finger on with regards to the comma-and thing. Another bullseye! Although I don't understand half of the technical details that you stated, I'm glad that you've explained them. Might help me make sense of the {{{{millions}}}} {{{{{{of}}}}{{{{brackets}}}}}} in the code! ..So aye lad, tha's got my vote. Kind regards, nagualdesign (talk) 01:23, 3 July 2010 (UTC)[reply]

Two braces each side surround a template transclusion (as always), three a template parameter. So they do tend to stack up rather, yes. Si Trew (talk) 08:33, 5 July 2010 (UTC)[reply]

End of discussion before I moved it here. Si Trew (talk) 08:30, 5 July 2010 (UTC)[reply]

The continuing saga of the comma-and...[edit]

Sorry to be a stickler, but after all that we've said and agreed the template doesn't quite seem to work. Looking at the Examples posted above, only the first implementation of Ngoja kidogo bush is rendered correctly (using the dreaded comma-and). At the time of writing all of the other examples which include a meaning, followed by another word-part in an 'undisclosed' language, are not showing a comma. I hope this little bug is a worthy opponent to one of you (that means you, Si and Svick - your kung fu is strong!) ...I myself will only be cheering from the sidelines. ;)
Kind regards, nagualdesign (talk) 23:08, 6 July 2010 (UTC)[reply]

It should be fixed now. Svick (talk) 00:17, 7 July 2010 (UTC)[reply]
I've undid most of it because I think the implementation overcomplicated - in particular, the need to enumerate numerous "force comma n" parameters for what should really only need to be one. I'll try to put in a more succint implementation shortly. Si Trew (talk) 08:18, 7 July 2010 (UTC)[reply]
The bit I had forgotten is to catenate the three parts of each "Ety part" when passing them from {{Ety}} to {{Ety/Part}} to indicate that there is any part following (i.e. any of them can be non-empty, not just the first one, to indicate a follow-on). The small change in {{Ety/Part}} (here) is all that seems to be necessary.
Thanks Svick also for fixing the documentation for {{Enum}} which I'd not updated to specify the new default for " and ". Si Trew (talk) 08:28, 7 July 2010 (UTC)[reply]
I've backed into the opposite problem now of two commas in some cases. The problem really stems from commas being used both for list separation and for parenthesis, and so being either omitted or duplicated in some cases. I think it is better to try to work out where the responsibility for this lies in each of the templates rather than to try to just fix them by brute force. Si Trew (talk) 08:43, 7 July 2010 (UTC)[reply]
Yes, I could see that this was going to be a tough one. Although I can't help you with the code (if you can even call it code!), I can determine some of the logic behind the code. For instance, for each 'triplet' only the middle parameter (the morpheme) is always* required. The other 2 parameters are always* optional. That could form the most reliable check as to whether there are more word-parts to process. *As far as I can tell the only exception to this is where no morphemes (and only one 'triplet') are used. eg, Café (from French) or even (from French, meaning "coffee") I can't imagine a case where words with multiple morphemes wouldn't be listed separately as such.
nagualdesign (talk) 13:20, 7 July 2010 (UTC)[reply]
Not really. Just the {{Ety/Part}} needs to know "am I going to be followed by at least two more things" to suppress the comma (if it's put out a meaning). I think that's all. But that's essentially what {{Enum/Item}} does anyway, so it might be redundant to use {{Enum}} at all. Which does not mean to say splitting it was worthless, but for this special case we might as well essentially implement the logic in {{Enum/Part}} instead of attempting to defer it (via {{Enum}} to {{Enum/Item}} and effectively coupling them anwyay via kinda "hidden" parameters. Si Trew (talk) 15:35, 7 July 2010 (UTC)[reply]

Another alternative implementation[edit]

...Okay, maybe not tough, but certainly slippery. How about this (in a readable language I sort of made up):
if (!1 & !2) { return "error message"; stop; }
return "(from ";

if (1) return ISOlang(1);
if (1 & 2) return " ";
if (2) return "''",2,"''";
if (3) return ", meaning &quot",3,"&quot";
if (!5) { return ")"; stop; }
if (5 & 8) return ", ";
if (3 & 5 & !8) return ",";
if (5 & !8) return " and ";

if (4) return ISOlang(4);
if (4 & 5) return " ";
if (5) return "''",5,"''";
if (6) return ", meaning &quot",6,"&quot";
if (!8) { return ")"; stop; }
if (8 & 11) return ", ";
if (6 & 8 & !11) return ",";
if (8 & !11) return " and ";

etc...
(One 'section' per 'triplet')
nagualdesign (talk) 16:10, 7 July 2010 (UTC)[reply]

After mentally running the Examples through my 'code', I realized that I may have introduced another problem - double spaces! (Slippery little bugger..) Assuming extra spaces are not ignored, I slightly altered my code, which runs fine now (in my grey matter, at least) Now, if you could just compile this into wikicode... ;)
Regards, nagualdesign (talk) 18:02, 7 July 2010 (UTC)[reply]
For your information, double spaces are ignored in HTML in normal text, so it shouldn't matter. Svick (talk) 18:24, 7 July 2010 (UTC)[reply]
Yeah, I thought that they would be ignored, but I like to hope for the best, prepare for the worst. To that end, removing a couple of spaces and adding the line if (1 & 2) return " "; 'fixed' the problem before it became one. How's about writing it up for us? :) nagualdesign (talk) 19:11, 7 July 2010 (UTC)[reply]
You two have made a proper Wikipedian out of me! I've cracked it! I coded up my scheme in vermicelli and it bloody works! Out of repect for your template I have just piggybacked mine on my own Talk page for now, with examples/testcases on my User page. Please take a look at it. Feel free to play around with the test cases or, if you're happy with it, copy and paste the template code into {{ety}} or {{etymology}}. It works just like my faux-code above, with very minor tweeking. Ta-da! ;) nagualdesign (talk) 00:04, 8 July 2010 (UTC) ...I've still got it![reply]
In case you're interested, for the final version (fingers crossed!) of my template code I couldn't get my nots and ands going, so I just used ifs instead. Something like this:
if ((1) or (2)) {
return "from";
<?-- for each triplet... -->
if (1) return " ",ISOlang(1);
if (2) return " ''",2,"''";
if (3) return ", meaning &quot",3,"&quot";
if ((4) or (5)) {
:if ((7) or (8)) return ",";
else {
if (3) return ",";
return " and";
}
}
<?-- ...add on 3s each time -->
}
else return "error message";
Kind regards, nagualdesign (talk) 02:43, 8 July 2010 (UTC)[reply]
Now altered to match current template, for reference. nagualdesign (talk) 18:13, 11 July 2010 (UTC)[reply]
If you're happy with it, I'm quite happy for you to overwrite it – we can always go back either to my or Svick's version. That being said, have you tested it for the cases with missing parts? In the doc I added the examples above yesterday. Si Trew (talk) 08:19, 8 July 2010 (UTC)[reply]
Okay, I will be bold and do that. Regards, nagualdesign (talk) 22:25, 8 July 2010 (UTC) (PS. I moved your previous post from the old discussion section down to this new section. Hope that's okay.)[reply]
That seems to be working. If you abuse it it will blindly output ugly looking text - there's only one error code, but it handles real-world input as intended, and is economical with page-calls (being self-contained). Though perhaps it should be tested more thoroughly. :) I've radically altered the documentation, too. I thought it was difficult to read. The new version is still a little bit busy, but I think it gets the message across better. Regards, nagualdesign (talk) 00:08, 9 July 2010 (UTC)[reply]
I've also added some Examples of improper use to the /doc, as I thought the Invalid input on the /testcases page were mostly the same error, repeated, and some of the examples of Valid input were badly posed. (No offence meant!) Note that I chose Über-nerd from German and English, which even if rendered correctly (from German and English) would remain meaningless (in the context of an etymological statement).
Best wishes, nagualdesign (talk) 04:01, 9 July 2010 (UTC)[reply]

Nice work there getting it how you wanted. It seems like trying to separate responsibility to {{Enum}} was overdoing it in the end; but it's through the work of all three of us that we get to a stable and maintainable solution; although the template is long it is quite clear that it is just a repeat for each part, since (as you can see) we can't do loops in templates (we can't do recursion either to get the same effect) so the repetition is inevitable and it seems to me the obvious thing is to make it quite clear the pattern of loop unrolling, which you have done.

I'm still not sure it works properly for the case "From French and English":

from French and English
from French  quelquechose 'anything', and English

bizarrely it does work if anything is given after the "en":

from French and English  anything
from French  quelquechose and English  anything
from French  quelquechose 'anything', and English  anything

which suggests that the if-statements are not correctly nested.

However there comes a point at which one can classify that as improper use, as you have done. Si Trew (talk) 14:45, 9 July 2010 (UTC)[reply]

Thank you. :) The nesting was fine; I fixed the problem by using the 1st or 2nd params of each triplet to check if there are further triplets to be processed, and not just the 2nd param as I had assumed above. It's actually more elegant this way, and only 'cost' 148 bytes. I would still argue that from French and English is meaningless (or maybe it just needs a context), but at least it renders well now, and the user can use their own discretion. Would you agree that Über-nerd from German and English counts as improper use, because it just leads to more questions? ...I'm sure there's a phrase for that sort of thing. Regards, nagualdesign (talk) 01:16, 10 July 2010 (UTC)[reply]
Clawed back 142 bytes by removing all the if (x or y) close-parentheses terms, and placing a simple ")" at the end. I've updated the pseudo-code above, too. nagualdesign (talk) 08:02, 11 July 2010 (UTC)[reply]
I would tend to agree that the "From German and English" does not often make sense, but it's not purely for "completeness" that I ask for it, just that I think my Collins does it that way when it is kinda "obvious" where the morpheme split is. That being said, it only really makes sense to me if the English word is linked, which is kinda equivalent to a dictionary leading you to another headword, which in my Collins is done by showing it in small caps; the fact it is English is thus implied, so indeed we'd not have to say it anyway.
There is a different semantic meaning, I suppose, in that (say) "From German and Dutch" might be taken to mean "From German, via Dutch", which I don't think is our intent. So, on the whole, it may be more trouble than it's worth, as you suggest. In any case, as you see with anniversary, we don't handle chaining etymologies very well, but at that point I think we say WP:NOTDIC.
I note also that I've used "triplet" when I should have just said "triple". This is in the error message and I think in the documentation page. I have no trouble fixing this unless you have a particular attachment to "triplet".
Similary, I don't know German at all, and don't know if "Über" is correct there (e.g. the umlaut) even for a made-up word. The Germans are in the process of getting rid of a lot of their umlauts, I hear; the Swiss and Austrians have always done things a little differently (for example with the sharp S) so I don't really know what to say there.
Looking good! Si Trew (talk) 09:20, 11 July 2010 (UTC)[reply]
Removed another 113 bytes! Commas and "and" are never needed after the 6th triplet, and commas are never used before (unless it's comma-and). Here's a contrived example (which is, of course, complete bullshit) just to test if all 6 triplets are still functioning:
Antidisestablishmentarianism from Latin anti- 'against', dis- 'apart', stablis 'stable', -mentum '-act of', -ārius 'pertaining to-', and -isma 'follower of-'
I guess this also shows that any word with that many parts is better off with it's own (hand coded) etymology subsection! nagualdesign (talk) 09:43, 11 July 2010 (UTC)[reply]
RE: Triplet; The definition of Triplet is "a group or set of three of one kind" (like DNA codons), the definition of Triple is "a threefold amount" (or as a verb, "to multiply by 3"). Fair enough, there is certainly some overlap of usage, but I tend to prefer the former. Regards, nagualdesign (talk) 09:44, 11 July 2010 (UTC)[reply]
...Also, Über-nerd is a real phrase (or at least one that I didn't make up). It's what I would describe (disapprovingly) as Buffy-speak. A better example would be appreciated. (That's a request, not a tautology!) Kind regards, nagualdesign (talk) 09:54, 11 July 2010 (UTC)[reply]
I made it up. However, wiktionary lists "uberdork" and "upergeek" (and even has a category for "English words prefixed with uber", of which these are the sole entries) – it does not have the umlaut; interestingly putting "ubergeek" into Google Translate (English to German) produces "Übergeek", suggesting it knows about it (knows it's a noun, has an umlaut etc) whereas "uberdork" comes out the same as it goes in, which usually happens when it's unknown. Si Trew (talk) 22:49, 11 July 2010 (UTC)[reply]
I realize that you do a lot of work on WP, so I can understand that it's difficult to keep track of these things, but you didn't make it up! I searched for ages to find an example to fit from French and English but I couldn't find anything. Then I searched for something to fit from German and English. Eventually I Googled everything beginning with uber, and settled on Über-nerd (with umlaut and hyphen) because it seemed to have more presence. (And you said, 'I note also that I've used "triplet"... ' That was me, too!) Please don't take this the wrong way, I'm certainly not trying to scent mark my contributions, just bear in mind who said what! The important thing is that we both agree that Über-nerd is a poor example for the /doc. What we need is a common word or expression, whereby (from Language A and Language B) yields zero information (in terms of an etymology) and therefore counts as an example of improper use. Regards, nagualdesign (talk) 01:05, 12 July 2010 (UTC)[reply]
I'm sorry, I thought I had made it up, for pretty much the same reasons that you did, but I must have been thinking of some other made-up example. Similarly "triplet", I was really just saying mea culpa if it was decided to change the word; I wasn't making any kind of claim to it, and in fact it seems I hadn't used it at all. Actually I was more trying to convey the impression I don't think I'm perfect, but I see in the light of day how that might have backfired! So, sorry about that.
As far as the "improper use" you want, I can't think of a zero-information one either. I can think it would be zero-information to give etymology for a compound word where both parts are English e.g. groundhog (from English ground and English hog). Si Trew (talk) 07:47, 12 July 2010 (UTC)[reply]
No harm, no foul. :) RE: Examples of improper use; Café (from French) counts as proper use because it's a loanword, with the same spelling and meaning in French. Other loanwords, like doppelganger, glockenspiel and poltergeist (from German), have deeper roots, which I think ought to be explained. However, that might blur the lines between an etymology and a translation.
So how about Electron (from Ancient Greek)..? The only problem I can see is that, without knowing that it comes from ῆλεκτρον (elektron) 'amber', it might be difficult for people to see why it's classed as improper use. nagualdesign (talk) 01:53, 13 July 2010 (UTC)[reply]
...Groundhog (from English ground and English hog) is wrong, but in a different way (and a more obvious one). I'll add it to the list. nagualdesign (talk) 01:58, 13 July 2010 (UTC)[reply]
I just wonder if you're being too prescriptive here (I don't really know how you're trying to define "improper use"). Is it the business of the template to say how it is used? I would only say it is insofar as, if the template were changed, it could break examples that fell into "improper use" but could be expected to honour those in "proper use" (even if, for example, it changed their formatting and so on). That is to say, "improper use" means undefined behavior for our purposes.
For example, I don't know why you think Groundhog is "obviously wrong" except that it is redundant, i.e. are you suggesting that "ground" or "hog" are not English, i.e. that "groundhog" came whole from another language? Oddly my 1982 Collins Concise lists it only as two words, my 2002 Oxford Concise only as one word, my 1990 Webster's Concise as one word, and none gives an etymology, all referring to woodchuck.
As far as French-to-English goes, how about barley sugar (from French sucre brûle 'boiled sugar', since "barley" is a corruption of [brûle] Error: {{Lang}}: text has italic markup (help)? Oddly enugh the French then reimported it and translated "barley" back as [orge] Error: {{Lang}}: text has italic markup (help), so that on both sides of the Channel we have a confection containing no barley being called "barley sugar". The point here is, should the fact that "brûle" does not mean barley make it an "improper use"?
Similarly the other day I noted that portmanteau itself, for the word, is now in French called mot-valise, "word suitcase", what with portmanteaus having fallen out of fashion, I suppose. THis kind of etymology is interesting but probably beyond what we want here, is that what you were aiming at? I think we are probably at cross purposes.
The fact English "coup" comes from shortening "coup d'état", but "coup" in French just means "knock" (and seventeen other things like that), is that more like it?
What about hemidemisemiquaver (from Ancient Greek, French, Latin and Germanic)? (We don't have an {{ISO 639 name}} for "Germanic languages", unfortunately: this just sticks "ic" on the end of "German", so it pipes to German language, as you see. Si Trew (talk) 09:19, 13 July 2010 (UTC)[reply]
Actually, you're quite right - I was being prescriptive, as I thought that that was within the remit of the /doc. If, as you say, the business of the template is not to say how it is used, then I'm happy to remove the examples. This would bring us back to valid/invalid examples, which I can see might be advantageous. All I was really trying to say is that, Electron (from Ancient Greek), say, would be a poor example of an etymology (or, conversely, an example of a poor etymology).
All this has been very confusing. Trying to say, "that's a good bad example" (expressing agreement) without sounding contrary is hard enough between the two of us, nevermind trying to shoehorn the results into the /doc! (Laughs at self) So I guess we'll just draw a line under that.
Thanks for all the support, I didn't mean to lead us down the garden path. I think now it's safe to say Quod Erat Faciendum, and thank you again to all involved. Kind regards, nagualdesign (talk) 01:16, 14 July 2010 (UTC)[reply]

Should we remove the outer parentheses?[edit]

RE: In any case, as you see with anniversary, we don't handle chaining etymologies very well. (Si Trew)
Since it's inception our template has used the format (from ...), which looks great but does not, as you say, handle chaining etymologies. Looking at how the compound pronunciation works, where the outer parens (and the "or") are always hard-coded by the user (and, it seems, never missed), I was wondering if it would be a good idea to change {{etymology}} to match. So we'd have:
Anniversary (from Latin anniversarius, meaning "returning annually"; from annus, meaning "year", and versus, meaning "to turn")
'''Anniversary''' ({{etymology|la|anniversarius|returning annually}}; {{etymology||annus|year||versus|to turn}})
Although I still think pronunciation and etymology should be remain separated, using the format (pron) (ety).
I'd be happy to change all the examples and wotnot myself if there is a consensus.
Kind regards, nagualdesign (talk) 17:39, 11 July 2010 (UTC)[reply]

I decided that it would be more expedient to simply make those changes (while I was in the mood) as they can very easily be reverted if no-one agrees. I think it looks miles better. I also changed the instructions in the /doc. Is that okay with everybody? nagualdesign (talk) 18:06, 11 July 2010 (UTC)[reply]
May I also recommend that the /testcases page be deleted, as it is has served it's purpose and is no longer of any use. nagualdesign (talk) 18:27, 11 July 2010 (UTC)[reply]
I don't think it should be deleted. If someone will want to modify this template in the future, those testcases might be useful to him. Svick (talk) 18:38, 11 July 2010 (UTC)[reply]
I'm happy with removing the parens. I also think the testcases should remain – they serve as regression tests. Ideally we should hard-code the expected output as another column (er, another set of rows...). There are templates then to compare the actual and expected output, but they're not pretty and they're not clever. Si Trew (talk) 22:27, 11 July 2010 (UTC)[reply]

Cool. Now we can say, antidisestablishmentarianism (from anti- 'against', and disestablishmentarianism; from disestablish 'to deprive of special state patronage', and establishment 'The Church of England') ...Still a bit ugly, but a vast improvement! Kind regards, nagualdesign (talk) 05:39, 12 July 2010 (UTC)[reply]

Iso2lang parses proper language names[edit]

I noticed that the etymology template now accepts proper (full) language names, so {{etymology|french}} is no longer an Invalid Example, and I have removed it. However, the documentation currently reads:

  • language: The ISO 639 code for the language. This might be omitted if the language is obvious (e.g. the same as the language of the previous part, or English).

...And I am unsure how to re-word it as I can't comprehend {{Iso2language}}, {{Iso2lang}} or {{ISO 639 name|}}. Any suggestions? nagualdesign (talk) 00:15, 23 February 2011 (UTC)[reply]

Italicization of non-Latin alphabets[edit]

This template was mentioned on the talk page for WikiProject Linguistics as something that should be applied more widely to etymologies in articles. I have added many etymologies to articles, and there is an issue with the template that I immediately noticed upon looking at the documentation: it applies italics to all foreign terms. Foreign terms in a non-Latin alphabet should not be italicized (MOS:Ety), so there needs to be a way to specify non-italicization for Greek and Arabic etymons, for example, before this template can be more widely implemented. I'm not interested in making this change myself, but this is just a note on what should be done. — Eru·tuon 22:01, 6 March 2012 (UTC)[reply]

Thanks for looking into it. Surrounding the non-Latin part with double inverted commas and using a space at the beginning to avoid making the text bold seems to do the trick. For (a made up!) example: {{ety||''銀果'' (yínguǒ)|silver fruit}} yields, from 銀果 (yínguǒ) 'silver fruit'. Is that acceptable? Regards, nagualdesign (talk) 02:29, 7 March 2012 (UTC)[reply]
..I've added the spaces into the template itself, so just adding the inverted commas works now. :-) nagualdesign (talk) 02:37, 7 March 2012 (UTC)[reply]
I've amended the documentation slightly. As some of the examples use greek letters, do you think they should be changed so that they're no longer italicized, or is it just Chinese and suchlike that shouldn't be italics (as it makes them harder to read)? nagualdesign (talk) 02:55, 7 March 2012 (UTC)[reply]
..Having read MOS:Ety and re-read your comment I will now amend the examples. nagualdesign (talk) 03:22, 7 March 2012 (UTC)[reply]
Yes, all non-Latin alphabets should be left un-italicized.
I'm not satisfied by using double apostrophes to turn off italicization within the template; it seems rather lame and clunky. It would make more sense if we had a template parameter that allows the original language not to be italicized. Then we could turn the italicization off for Greek, Russian, Chinese, and so on, and leave it on for French, German, Swahili, and so on. Having to turn off italicization using double apostrophes suggests that the template is only designed for languages with Latin alphabets, but the template should be designed for all languages. What do you think? — Eru·tuon 16:05, 15 April 2012 (UTC)[reply]
The template is designed for editors of the English Wikipedia. In that way it favours English (and hence Latin alphabet) use in the form of the template. For example, the name of the template is English (well, it's Greek, but it is not Hungarian: Hungarian etymologia). That does not mean that text parameters are restricted to be English language or latin alphabets. {{lang}} must surely serve as the canonical example here; but this template has no translations on other Wikipedias, so there is no chance to compare. In many other Wikipedias, there are translated templates, some of which use the English names and some of which put them in their own language; there are also templates made independently which serve the same purpose by different routes, but are linked because of their semantics rather than their surface grammars. Si Trew (talk) 23:57, 3 August 2012 (UTC)[reply]

One possibility would be to decide this based on the language parameter. If it's a language that uses the Latin script, it will be italicized and not otherwise. One problem could be with languages that use both Latin and non-Latin scripts, like Serbian. User<Svick>.Talk(); 20:27, 6 June 2012 (UTC)[reply]

I awake after a long sleep. You can do this is with template traits, i.e. run the phrase through a template provided to the template. For example, {{tlc|add-eyeteyes|myparameter|{{|{{is-latin||myparameter}}}}. Then in {{|is-latin}}, which should fall within the ISO-lang kinda category templates, would return a boolean value, e.g. empty string if latin alphabet, and non-empty string (such as the parameter itself) if not. {{add-eyeties}} then adds the italics if the third parameter to it is not empty. {{is-latin}} would just be an enormous switch statement, i.e. a map. A map with encoded knowledge that already exists in most font systems, Unicode, and in the Wikimedia software itself of course, but there is nothing quite like conquering the known.
Everything can be solved by another layer of indirection. We should either assume latin or assume not latin (I can see arguments on both sides why words would be more likely in a latin or non-latin alphabet in an etymology, without having an easy way to check stats; but we should assume latin as that is current behaviour). Svick makes an interesting point with Serbian, because the language can be written either in latin or in Cyrillic alphabet, depending on circumstances. Arabic has also been written in the latin alphabet in Turkey, since the 1920s.
I have deliberately written "latin" with a lower case l here, though I am not sure why.
Si Trew (talk) 23:36, 3 August 2012 (UTC)[reply]
My basic point is that one cannot tell an alphabet from the language designation. Can we not just tell it from the characters in it? That would seem a better guess. Si Trew (talk) 23:52, 3 August 2012 (UTC)[reply]

Incorrect results[edit]

I attempted to use this template today for Old Javanese and {{etymology|kaw|nūsa|island}} results in "from Kawi nūsa 'island'" - which, incidentally, is a redirect to the Siouan language known as Kansa (code KSK). HALP. Ogress smash! 06:39, 3 July 2015 (UTC)[reply]

Ogress: I fixed this (almost two years later) by creating the missing template Template:ISO 639 name kaw. – Jonesey95 (talk) 04:59, 3 March 2017 (UTC)[reply]

Single quotemarks[edit]

I'd like to update this template to be consistent with MOS:SINGLE, introduced sometime in the last couple years, which specifies single quotation marks for glosses. Thoughts? Ibadibam (talk) 17:47, 26 January 2017 (UTC)[reply]

 Done following no objections. Ibadibam (talk) 05:49, 3 March 2017 (UTC)[reply]

Invalid examples[edit]

I believe it is not standard in Wikipedia to provide "invalid examples" that result in actual errors in the template. I don't think we need an example showing five parameters instead of six, with the fourth parameter omitted and not just blank. Nobody would do that, and if anyone did, it would be really obvious. I don't believe we need an example with the surrounding parentheses omitted. I don't believe we need an example with both language and orthography omitted. In any case, I believe that invalid calls to this template, if we must have them, should be entered only within <nowiki>...</nowiki>, so the errors aren't executed and the page does not appear on Lint errors: Misnested tag with different rendering in HTML5 and HTML4 and Lint errors: Stripped tags. —Anomalocaris (talk) 04:24, 19 October 2017 (UTC)[reply]

Anomalocaris I think the Invalid examples are helpful, since not all errors throw up an error message. I take your point about unnecessary invalid calls though. I'll try to reformat those... nagualdesign 22:07, 19 November 2017 (UTC)[reply]
 Done Please check my work for errors (or in this case an absence of real errors). Cheers. nagualdesign 22:28, 19 November 2017 (UTC)[reply]
nagualdesign: Well, the doc page doesn't seem to generate lint errors any more, so I guess your fix to the template took care of those. Anyway, I am OK with it now. Thank you for fixing the template. —Anomalocaris (talk) 23:03, 19 November 2017 (UTC)[reply]
To be clear, the template itself was generating errors each time it was instantiated since January, when somebody altered it and it broke. I reverted to the last stable version. The template doc page was also systematically generating errors due to the Invalid examples, which I've also fixed. Sorry it took so long, I had no idea that it was throwing up 'lint errors' (I didn't even know such things existed). nagualdesign 20:04, 20 November 2017 (UTC)[reply]

Template protection[edit]

I only realized today that this template has been broken since January. Perhaps it's time to add template protection. nagualdesign 22:02, 19 November 2017 (UTC)[reply]

The right venue for that is WP:RFPP. I'll take care of it.  — SMcCandlish ¢ >ʌⱷ҅ʌ<  22:32, 19 November 2017 (UTC)[reply]
Thank you, Stanton. nagualdesign 22:40, 19 November 2017 (UTC)[reply]

Help me correct the 'fix'?[edit]

@Anomalocaris: As you know, the template was broken from mid-January until the other day. Omitting the language code would have thrown up a visible error. I've encountered a couple of pages now where someone has evidently 'fixed' the error by repeating the language code, as in: Panspermia (from Ancient Greek πᾶν (pan) 'all', and Ancient Greek σπέρμα (sperma) 'seed')... I'd like to correct this by removing the repeated code on any pages where this fix was made. Is there any way you can help me find the pages where the etymology was bodged like this, using your Jedi powers? nagualdesign 23:34, 21 November 2017 (UTC)[reply]

Scratch that. I'm working my way through Special:WhatLinksHere/Template:Etymology now. It turns out that there isn't that much work to be done. nagualdesign 23:52, 21 November 2017 (UTC)[reply]
@Nagualdesign: I agree, the uncorrected Panspermia looked pretty lame, so thanks for fixing it and engaging on a project to fix any others. There are about 590 items that link to this template, so what are your Jedi powers that enable you to quickly determine which of them need editing? —Anomalocaris (talk) 00:00, 22 November 2017 (UTC)[reply]
Keyboard shortcuts. I have the list (WhatLinksHere) open in one tab. Holding down the CTRL key I click the next item on the list, click TAB to switch tabs, and if the etymology's at the top and looks fine I click W to close the tab, rinse and repeat. If the etymology isn't forthcoming I click F to find the word "meaning" (which, thankfully, I don't need to keep re-typing), scan the etymology and ESC then W to close the tab. I only have to let go of the CTRL key if I need to make an edit.
I've looked at about 55 articles so far. I've only had to correct 5 so far (so just 7 in total). I wish you hadn't told me how many there are! nagualdesign 00:13, 22 November 2017 (UTC)[reply]
Cool! I didn't know about Ctrl+Tab moving right one tab in the web browser, and I see Ctrl+Shift+Tab moves left one tab. Your method works as long as there aren't additional uses of the template "below the fold", which is probably true most of the time. By the way, among the keystrokes I use a lot is Alt+D, to get the cursor in the address line of the browser and highlight it. —Anomalocaris (talk) 00:52, 22 November 2017 (UTC)[reply]
...Well, I got as far as Lisbon Lisburn - about 110 articles I reckon - and my wrist's killing me now. Using keyboard shortcuts certainly speeds things up but keeping my hand in one position for so long to hold the CTRL key really aggravates it. That's enough for me for one evening. Maybe tomorrow I'll try using a bit of Blu Tack to hold the CTRL key down.
The good news is that nobody has been going through every page systematically applying the bodge, so there isn't a lot of work to be done in that regard. I think I ended up spending most of my time trying to come up with clever ways of wrestling the template into submission where necessary, as at South Gyeongsang Province#Etymology:
The name derives from Korean Gyeongsang 'joyous furthermore'; from gyeong (Korean , Hanja ) 'happy', and sang (Korean , Hanja ) 'still more'.
The name derives {{etymology|ko|Gyeongsang|joyous furthermore}}; {{etymology||gyeong ''(Korean {{linktext|경|}}, Hanja {{linktext|慶}})''&#8203;|happy||sang ''(Korean {{linktext|상|}}, Hanja {{linktext|尚|}})''&#8203;|still more}}.
Well worth the extra effort, I reckon. Those zero-width spaces (&#8203;) work wonders. nagualdesign 01:18, 22 November 2017 (UTC)[reply]
Uh, Lisbon doesn't use {{Etymology}}, and hasn't recently ... ? —Anomalocaris (talk) 01:44, 22 November 2017 (UTC)[reply]
Hah! Well spotted! I meant Lisburn. It's been a long day. Well, that's my excuse, and I'm sticking with it. ;-) nagualdesign 01:55, 22 November 2017 (UTC)[reply]
Lisburn shows up 99th for me just now. —Anomalocaris (talk) 06:40, 22 November 2017 (UTC)[reply]

Convert to Lua?[edit]

There are two problems I can see with this template — one has a workaround but the other doesn't. Neither is a world-changing deal-breaker, but it would be good to get them fixed.

The first is that we don't apply language tagging, which is recommended by the Manual of Style (see MOS:LANG) That would be relatively simple to do, but would involve adding another #if parser function per triplet, which doesn't feel like the best idea. The second is that italics are automatically applied — and need to be worked around for non-Latin languages.

Module:Lang, as invoked from Template:Lang, handles both of these things, and Lua can do a simpler job at nullity-checking. I might take a look at working out how to do this myself, but someone with Lua skills already might be beat me to it :)

OwenBlacker (talk) 13:14, 15 December 2017 (UTC)[reply]

@OwenBlacker: Sounds like a good idea, I suppose. I have no experience with Lua, so I won't be much help. Having said that, I knew nothing about template syntax before coding this template (with Si Trew), and I've never encountered a programming language that I couldn't wrap my head around. It could be interesting. nagualdesign 20:06, 20 December 2017 (UTC)[reply]

Suggestion: Wiktionary link[edit]

Perhaps each orthography could have a built in link to Wiktionary if the page exists? I'm not sure if it's possible to test whether a page exists beforehand. Apologies if this should be located at the Village Pump rather than here on the talk page. Zumley (talk) 21:02, 11 March 2018 (UTC)[reply]

Wikilinks of language name[edit]

This template has a function similar similar to Template:Lang. That template has a option to suppress the wikilinking of the the language name (|links=no). This option should be included with Template:Etymology. Senator2029 “Talk” 01:17, 18 April 2019 (UTC)[reply]

Nearly a year later, and on my birthday, could someone please action this? When this is used multiple times in one article for the same language, the overlinking should be avoided. The Rambling Man (Stay indoors, stay safe!!!!) 10:50, 11 April 2020 (UTC)[reply]

Lang tagging[edit]

This template takes language codes, but isn't actually marking up the relevant text with it. For example, if the first parameter was "grc" for Ancient Greek, the Greek text should be wrapped in <span lang="grc"></span>. Opencooper (talk) 01:34, 5 July 2021 (UTC)[reply]

A agree that this change is necessary. I have a marginally working version in template:etymology/sandbox. However there are issues with italics, and I am not experienced enough with templates to fix them. AquitaneHungerForce (talk) 08:13, 18 July 2021 (UTC)[reply]
I agree, plus the gloss should be tagged, à la {{gloss}}. (class="gloss-quot" and class="gloss-text")
Unfortunately, romanization makes lang tagging difficult. That is, {{translit}} uses lang="grc-Latn". So maybe we should make another template that has a transliteration parameter. As a plus, it could automatically avoid italicizing the word if a transliteration is given.
For example, used like this:
{{ety-translit|grc|ἄρθρον|arthron|joint}}
equivalent to:
from {{ISO 639 name|grc|link=yes}} {{lang|grc|ἄρθρον}} ({{translit|grc|arthron}}) {{gloss|joint}}
which renders as:

from Ancient Greek ἄρθρον (arthron) 'joint'

(example based on Arthropod)
W.andrea (talk) 17:29, 19 February 2024 (UTC)[reply]
I am going to work on a new version of this template takes text and transliteration as separate parameters, which solves all existing problems with this version. Remsense 09:53, 23 February 2024 (UTC)[reply]

Comma redux[edit]

In Chondrichthyes, the template yields the following result:

from Ancient Greek χόνδρος (khóndros) 'cartilage', and ἰχθύς (ikhthús) 'fish'

Clearly, the comma before "and" is incorrect in this case, given that 'cartilage' isn't a parenthetical remark and isn't introduced with a starting comma – unlike , meaning "cartilage",. --Florian Blaschke (talk) 06:06, 4 March 2024 (UTC)[reply]

Nomination for deletion of Template:Ety2[edit]

Template:Ety2 has been nominated for deletion. You are invited to comment on the discussion at the entry on the Templates for discussion page. -- 65.92.247.66 (talk) 00:15, 10 March 2024 (UTC)[reply]