Template talk:la-ndecl
(Notifying Metaknowledge, Fay Freak, Brutal Russian, JohnC5): I've created a new template {{la-ndecl}} to replace all of the noun {{la-decl-*}} templates. Some examples can be seen at User:Benwing2/test-la-ndecl. I'll document it better but in general the first param is the declension class, the second param is the lemma, and the third param if necessary is the stem of third-declension nouns (same as the second argument before to various of the {{la-decl-3rd*}} templates). It does a good job of autodetecting the declension subclasses, but you can also specify them explicitly using a slash and one or more subtypes, or force the autodetector not to autodetect a certain subtype by specifying a minus before the subtype (e.g. 2/-ius to turn off the automatic detection of the ius subtype for nouns whose lemma ends in -ius). I've also created a script to convert all the old template calls to the new format, and verified that each of them doesn't change the contents of the declension table (but in the process, a lot of likely bugs in the preceding tables have been revealed). Benwing2 (talk) 05:39, 5 July 2019 (UTC)
@Benwing2: Seems reasonable. Out of curiosity, does it have a better way to deal with heteroclitic nouns like epulum and with all the stuff {{la-decl-multi}} handles? —*i̯óh₁n̥C[5] 08:54, 6 July 2019 (UTC)
@JohnC5 I am modelling it after Module:ru-noun, which is pretty much able to handle all of these things, although the syntax isn't quite as nice as Module:la-decl-multi. It would work like this (not yet implemented):
{{la-ndecl|3|Serapis|_or_|3|Serapis|Serapid}} (a noun with two possible declensions, either Serapis -is -ium or Serapis -idis -idum)
{{la-ndecl|2/sg|epulum|_or_|1|epulae}} (a heteroclite, modeled as a noun with two-declensions, one singulare tantum and one plurale tantum; I might need a bit of special-casing here to avoid thinking the noun has two possible lemmas)
{{la-ndecl|4|accentus|_|+|gravis}} (for accentus gravis; the _ means "join two words with a space", the + means adjectival, the masculine gender of the noun is autodetected as the default for decl-4, the fact that the adjective is third-declension two-stem is autodetected)
{{la-ndecl|2|ablātīvus|_|0|causae}} (for ablātīvus causae; 0 means "indeclinable")
{{la-ndecl|2|foenum|-|2|graecum}} (for foenum-graecum; the - means "join two words with a hyphen")
{{la-ndecl|5/F|rēs|:|+|pūblica}} (for rēspūblica; a colon followed by arbitrary text means "join two words with that text"; here, there is no text, hence the words will be joined directly)
{{la-ndecl|5/F|rēs|:|+|pūblicus}} (this should also work for rēspūblica, because adjectives have no inherent gender [I think I will implement it this way] and the gender for rēs is explicitly given as feminine)
{{la-ndecl|3/M|rōs|rōr|_|+|marīnus}} (for rōs marīnus; the gender of rōs cannot be autodetected so it must be given, and an error will result otherwise)
Benwing2 (talk) 14:29, 6 July 2019 (UTC)
@Benwing2: A little verbose for my taste, but whatever. Can you also handle quicquid assimilation? —*i̯óh₁n̥C[5] 19:12, 6 July 2019 (UTC)
@JohnC5 If you have suggestions for making it less verbose, while still supporting cases with multiple declensions (e.g. Serapis, epulum), I can certainly implement them. As for quicquid, can't you just use overrides, rather than having a special case in the module? Benwing2 (talk) 21:29, 6 July 2019 (UTC)
BTW I can certainly imagine a {{la-decl-multi}}-type syntax that autodetects. Benwing2 (talk) 21:32, 6 July 2019 (UTC)
@JohnC5 One possibility: {{la-ndecl|((epulum<2.sg>,epulae<1>)) vetus/veter<3+.-I>}} = epulum vetus pl. epulae veterēs. The other cases would be expressed like this:
{{la-ndecl|((Serapis<3>,Serapis/Serapid<3>))}}
{{la-ndecl|accentus<4> gravis<+>}}
{{la-ndecl|ablātīvus<2> causae}}
{{la-ndecl|foenum<2>-graecum<2>}}
{{la-ndecl|rēs<5.F>pūblica<+>}}
{{la-ndecl|rōs/rōr<3.M> marīnus<+>}}
Benwing2 (talk) 23:22, 6 July 2019 (UTC)
@Benwing2: This syntax looks very good. —*i̯óh₁n̥C[5] 01:57, 7 July 2019 (UTC)