Community Wishlist Survey 2017/Wiktionary/Context-dependent sort key

From Meta, a Wikimedia project coordination wiki

Context-dependent sort key

  • Problem: In most Wiktionary projects, words of different languages share a page if their spellings are identical. Currently, the magic word DEFAULTSORT works for an entire page, which means we cannot define a default sort key for each language in the same page. That is an issue especially for Chinese and Japanese. They share characters but their sort keys are totally different (pinyin for Chinese, hiragana for Japanese). If it is allowed to define a default sort key for each section, it will be much easier to correctly categorize pages.
  • Who would benefit: Editors of Wiktionary, especially those who edit Chinese and Japanese entries.
  • Proposed solution: Introduction of a new magic word, say, SECTIONSORT, that works for all categories after it up to the next usage of the same magic word. SECTIONSORT should override DEFAULTSORT if both are defined. The use of SECTIONSORT without a sort key should clear the previous sort key (and should not define an empty sort key).
  • More comments:
  • Phabricator tickets:


  • IMHO the sort problem (at least in wiktionaries) is not a "page" problem but a category problem. We should be more directed to create "category" sort keys (which probably will solve allmost all problems) and not a new section key. General categories (ex. categories for "pages with errors") should have no key but categories for specific languages (or dialects of a language) should include a (say) CATSORT key.--Xoristzatziki (talk) 20:39, 9 December 2017 (UTC)Reply[reply]
    You can specify a sort key for a category now. That is not a problem. In the case of Wiktionary, each entry often has quite a few categories. See wikt:en:日本 for example. Japanese categories should use a sort key of にほん, while Korean categories should use a sort key of 일본. Specifying an appropriate sort key for each category is possible but redundant and very tiresome. — TAKASUGI Shinji (talk) 05:33, 11 December 2017 (UTC)Reply[reply]

@TAKASUGI Shinji: Vote is over now. Twenty votes, it's quite good. Should we put forward this proposal in Phabricator? I think a ticket could be a way to keep track of this request and may be appealing for a dev in the future. What do you think? Noé (talk) 07:08, 18 December 2017 (UTC)Reply[reply]

Yes, that’s a very good idea. Actually I’m not sure about the procedure on Phabricator. What should I do now? — TAKASUGI Shinji (talk) 08:39, 18 December 2017 (UTC)Reply[reply]
It's quite easy. In Phabricator, you can get an access with your wiki account and then on the top-right corner there is a link "Create task" where you can describe your idea. If I am right, there is two places with names: "subscribers" is for you and I, "assigned to" is for people that take responsability of coding it. There is "tag" where I usually put "Wiktionary" but as your proposal is wider, you may let it blank and someone with a better understanding of Phabricator could fill it. For the specific writing, I am still not very confident, so try to be as specific as possible. I am still a beginner on this platform, so I am sorry if I give you vague advices. Well, people are nice there anyway. Noé (talk) 09:02, 18 December 2017 (UTC)Reply[reply]
Thank you very much. I have created a task: phab:T183747. — TAKASUGI Shinji (talk) 13:47, 28 December 2017 (UTC)Reply[reply]