Thread:User talk:CodeCat/sort key in Greek headword lines/reply (18)

The actual rules are documented in the code of the module. If the rules should be documented elsewhere, then the best place would be WT:AEL for Greek. Not the documentation page of this module. The module should be thought of more as a means to an end. You already know how you want the sort key to be, you just need to define the rules in this module to make it happen. The module isn't supposed to define policy or common practice, only implement it.

A bit of knowledge of Lua is needed to understand the rules defined in the module, but the documentation shouldn't attempt to be a Lua documentation. Scribunto already has its own documentation at mw:Extension:Scribunto/Lua reference manual, and it would be silly to try to explain how Lua works on every documentation page. The documentation pages assume (rightly, IMO) that anyone making edits to the module has enough understanding of Lua to know what they're doing to a degree, but that to use the module elsewhere does not require knowledge of the module's internals. In other words, the interface (what you see and use from the outside) is separated from the implementation (internal details).

I didn't actually change the templates, though. I removed the sort keys from the entries, but the templates still support sort keys, so the parameter is still valid and may even be useful in a few cases. So their documentation doesn't need to change. What would only need to change is an explanation of what happens when the sort key is left out. Maybe you could do that?