Topic on Project:Support desk

Any way to sort under multiple sort keys?

1
Eirikr (talkcontribs)

I spend most of my time lately on the EN Wiktionary adding and editing Japanese entries. These present a real problem for categorization in the wiki, as a single spelling may have multiple pronunciations, and Japanese dictionaries generally index by pronunciation.

Example:

The Japanese male given name spelled could be read variously as, and should be indexed under, all of the following:

  1. はかる (Hakaru)
  2. きよし (Kiyoshi)
  3. のぶ (Nobu)
  4. おさむ (Osamu)
  5. せいじ (Seiji)
  6. しずむ (Shizumu)
  7. やす (Yasu)
  8. やすし (Yasushi)

However, due to the limitations of how category sorting is currently implemented, the page can only ever be indexed under one listing at wikt:Category:Japanese_male_given_names. The MediaWiki software appears to use the value of the last sort argument provided in the wikitext of the page, ignoring any previous values. The workarounds that folks have come up with include creating empty pages redirecting to the intended entry page, and using the same entry headword plus some non-rendering character, but this is cludgy at best, and is increasingly untenable for each additional index.

This is a huge problem for Japanese entries. Almost all Japanese entries that are kanji-only spellings, and even many spellings that include phonetic kana, have multiple readings. These entries should be indexed under all of those readings. I know of no feasible way to make this work in the current MediaWiki implementation.

One simple example: wikt:桜花 should appear twice in wikt:Category:Japanese_nouns, once under the reading おうか (ōka) and once under the reading さくらばな (sakurabana). Checking https://en.wiktionary.org/w/index.php?title=Category:Japanese_nouns&from=おうか shows that the entry is missing entirely here, despite the wikitext on the entry page itself clearly listing it as a Japanese noun with a reading of おうか. Checking https://en.wiktionary.org/w/index.php?title=Category:Japanese_nouns&from=さくらばな shows the entry 桜花 in its second expected list location, collated under さくらばな.

Is there any clean way of categorizing a single page under multiple category indices? If not, could this feature be added in a future version of the MW software? Eiríkr ÚtlendiTala við mig

Reply to "Any way to sort under multiple sort keys?"