Template:add etymology/documentation
Uses Lua: |
This template reformats entry pages ready for the addition of another etymology.
Usage
Start editing the language-specific section, and replace all of the present text with the following:
{{subst:add etymology|language code}}
This will reformat the page with the correct etymology headings. It will also reshuffle sections if adding another etymology to an originally single-etymology entry. The template will also add the heading for new etymology section, so etymology information should be entered directly below the template, rather than typing out another etymology heading.
If the original page:
- already has multiple etymologies, the template will simply add another heading (automatically counted).
- has no etymology heading, one will be added.
- has etymology headings without
{{Etymology}}
, the heading template will replace them.
Note: if you do not edit the target language section and use this on the whole page instead, you risk deleting all other language entries and whole-page templates if you simply replace all the present text with the template.
Examples
Here is the original wikitext for the Radestrian section on the page át:
== Radestrian == === {{Etymology|rad}} === From {{inherit|rad|rad-m|ahtt}}, from {{inherit|rad|rad-o|ahtt}}, inherited from {{inherit|rad|rad-pro|ahht}}, {{m|rad-pro|nobold=true|aɣɣht}}, from {{inherit|rad|hrd-pro|áhəgh}}, from {{inherit|rad|lnk-pro|ʔ(w)agʱ-|ʔ(w)aʔ(w)agʱ-}}. {{root|rad|lnk-pro|ʔ(w)agʱ-}} {{cog|rad |ryn=aiŗad }}. === Pronunciation === {{rad-pr}} === Verb === {{rad-verb |npst-1s=áe|npst-1s2=ài |npst-2s=ả|npst-2s2=á |npst-3s=áș |npst-3p=auvú |pst-1s=auvei |prespart=áșevú |pspart=aúl |vn=áș |label=tr}} # to {{eng|pull}}, to {{eng|tug}}, to {{eng|drag}} ==== Conjugation ==== {{rad-conj|irr=true|át |á|3s=áș |depers=á |altdepers=à*|altdepers_note=archaic |imp=ả |altimp=á*|altimp_note=archaic |alt1s=ài*|alt1s_note=archaic |alt2s=a*|alt2s_note=archaic |alta=á*|alta_note=archaic |altr=ar*|altr_note=archaic |auv* |áșe |a* |ár|altpassinf=ar*|altpassinf_note=archaic |áștr|rpst=aúr* |pl=auv* |vnoun=áș* }} ==== Derived terms ==== {{columns|rad |áșe<t:train> }} ==== Related terms ==== {{columns|rad |aut<t:to lead> |á<t:line> }} ==== Translations ==== {{t|rad|to pull |lfv=*mêhad* |ryn=*feŗad* }}
If I want to add another etymology to this page, I can replace the text with:
{{subst:add etymology|rad}} From earlier {{m|rad|átý}}, from {{inherit|rad|rad-m|áthǿ}}, from {{inherit|rad|rad-o|ādhø̄}}, inherited from {{inherit|rad|rad-pro|awad hwê}}. ==== Adverb ==== {{rad-adv |label=uncomp}} # {{eng|why}} #: {{synonyms|rad|otú|obúr}}
This yields:
== Radestrian == === Pronunciation === {{rad-pr}} === {{Etymology|rad|1}} === From {{inherit|rad|rad-m|ahtt}}, from {{inherit|rad|rad-o|ahtt}}, inherited from {{inherit|rad|rad-pro|ahht}}, {{m|rad-pro|nobold=true|aɣɣht}}, from {{inherit|rad|hrd-pro|áhəgh}}, from {{inherit|rad|lnk-pro|ʔ(w)agʱ-|ʔ(w)aʔ(w)agʱ-}}. {{root|rad|lnk-pro|ʔ(w)agʱ-}} {{cog|rad |ryn=aiŗad }}. ==== Verb ==== {{rad-verb |npst-1s=áe|npst-1s2=ài |npst-2s=ả|npst-2s2=á |npst-3s=áș |npst-3p=auvú |pst-1s=auvei |prespart=áșevú |pspart=aúl |vn=áș |label=tr}} # to {{eng|pull}}, to {{eng|tug}}, to {{eng|drag}} ===== Conjugation ===== {{rad-conj|irr=true|át |á|3s=áș |depers=á |altdepers=à*|altdepers_note=archaic |imp=ả |altimp=á*|altimp_note=archaic |alt1s=ài*|alt1s_note=archaic |alt2s=a*|alt2s_note=archaic |alta=á*|alta_note=archaic |altr=ar*|altr_note=archaic |auv* |áșe |a* |ár|altpassinf=ar*|altpassinf_note=archaic |áștr|rpst=aúr* |pl=auv* |vnoun=áș* }} ===== Derived terms ===== {{columns|rad |áșe<t:train> }} ===== Related terms ===== {{columns|rad |aut<t:to lead> |á<t:line> }} ===== Translations ===== {{t|rad|to pull |lfv=*mêhad* |ryn=*feŗad* }} === {{Etymology|rad|2}} === From earlier {{m|rad|átý}}, from {{inherit|rad|rad-m|áthǿ}}, from {{inherit|rad|rad-o|ādhø̄}}, inherited from {{inherit|rad|rad-pro|awad hwê}}. ==== Adverb ==== {{rad-adv |label=uncomp}} # {{eng|why}} #: {{synonyms|rad|otú|obúr}}
You will note that some of the sections in the original etymology (namely Pronunciation) have been rearranged in order to add the nested etymology heading.
This is the wikitext for the Radestrian section of á:
== Radestrian == === Pronunciation === {{rad-pr}} === {{Etymology|rad|1}} === From {{inherit|rad|rad-m|ahra}}, from {{inherit|rad|rad-o|ahra}}, inherited from {{inherit|rad|rad-pro|aɣhwer}}, {{m|rad-pro|nobold=true|ahhwer}}, from {{inherit|rad|hrd-pro|əghkhwés}}, from {{inherit|rad|lnk-pro|ʔ(w)agʱ-|ʔ(w)agʱk(ʰ)wés}}. {{root|rad|lnk-pro|ʔ(w)agʱ-}} ==== Noun ==== {{rad-noun |in |gen=aìsk |pl=aere |cpd=ae- |adj=aìș }} # {{eng|line}} # {{label|rad|geometry}} {{eng|straight line}} #: {{antonyms|rad|amus}} ===== Declension ===== {{rad-decl|a|e|nom=á|gen=aìsk|genpl_short=aìs}} ===== Translations ===== {{t|rad|line |lfv=*nehpi* }} === {{Etymology|rad|2}} === ==== Verb ==== {{head|rad|verb form }} # {{inflection of|rad|aut}}: ## {{inflection list|informal|2|sg|imp|/|npst|ind}} ## {{inflection list|depers|sg|npst|sbjv}} # {{inflection of|rad|át}}: ## {{inflection list|depers|sg|npst|ind}} ## {{lb|rad|archaic}} {{inflection list|informal|2|sg|imp|/|npst|ind}} ## {{lb|rad|archaic}} {{inflection list|depers|sg|npst|sbjv}}
If I replace this with the following:
{{subst:add etymology|rad}} ==== Interjection ==== {{head|rad|interjection}} # {{eng|ah}}!
This yields:
== Radestrian == === Pronunciation === {{rad-pr}} === {{Etymology|rad|1}} === From {{inherit|rad|rad-m|ahra}}, from {{inherit|rad|rad-o|ahra}}, inherited from {{inherit|rad|rad-pro|aɣhwer}}, {{m|rad-pro|nobold=true|ahhwer}}, from {{inherit|rad|hrd-pro|əghkhwés}}, from {{inherit|rad|lnk-pro|ʔ(w)agʱ-|ʔ(w)agʱk(ʰ)wés}}. {{root|rad|lnk-pro|ʔ(w)agʱ-}} ==== Noun ==== {{rad-noun |in |gen=aìsk |pl=aere |cpd=ae- |adj=aìș }} # {{eng|line}} # {{label|rad|geometry}} {{eng|straight line}} #: {{antonyms|rad|amus}} ===== Declension ===== {{rad-decl|a|e|nom=á|gen=aìsk|genpl_short=aìs}} ===== Translations ===== {{t|rad|line |lfv=*nehpi* }} === {{Etymology|rad|2}} === ==== Verb ==== {{head|rad|verb form }} # {{inflection of|rad|aut}}: ## {{inflection list|informal|2|sg|imp|/|npst|ind}} ## {{inflection list|depers|sg|npst|sbjv}} # {{inflection of|rad|át}}: ## {{inflection list|depers|sg|npst|ind}} ## {{lb|rad|archaic}} {{inflection list|informal|2|sg|imp|/|npst|ind}} ## {{lb|rad|archaic}} {{inflection list|depers|sg|npst|sbjv}} === {{Etymology|rad|3}} === ==== Interjection ==== {{head|rad|interjection}} # {{eng|ah}}!
This is the wikitext for the Radestrian section on áșeș:
== Radestrian == === Pronunciation === {{rad-pr}} === Participle === {{head|rad|participle }} # {{inflection of|rad|át|adjectival|act|pres|pcp}}; {{eng|pulling}} ==== Inflection ==== {{rad-decl|t=adj|áșe|ș}} ==== Derived terms ==== {{columns|rad |áșe<t:train> }}
If I replace this with the following:
{{subst:add etymology|rad}} {{affix|rad|áșe|-ș}} ==== Adjective ==== {{rad-adj|label=uncomp|adv=áșeí}} # {{eng|train-related}}
This yields:
== Radestrian == === Pronunciation === {{rad-pr}} === {{Etymology|rad|1}} === ==== Participle ==== {{head|rad|participle }} # {{inflection of|rad|át|adjectival|act|pres|pcp}}; {{eng|pulling}} ===== Inflection ===== {{rad-decl|t=adj|áșe|ș}} ===== Derived terms ===== {{columns|rad |áșe<t:train> }} === {{Etymology|rad|2}} === {{affix|rad|áșe|-ș}} ==== Adjective ==== {{rad-adj|label=uncomp}} # {{eng|train}}-related