Community Wishlist Survey 2023/Wiktionary/Add LUA function to read out previous section heading/Proposal/en

From Meta, a Wikimedia project coordination wiki
  • Problem: Ca 99% of templates in wiktionary need a language code. The same code must be fed separately into every single template. This is junk work, and brings risk of wrong codes. Also, templates intended to be invoked from certain sections only cannot check whether they are used correctly.
  • Proposed solution: Add a LUA function to read out previous section heading of specified level. The most interesting levels are 2 and 3. Level 2 requested below ==Swedish== (at any distance until a different level 2 heading appears) would return "Swedish", level 3 requested below === Subordinator === would return "Subordinator", if no heading of given level has been passed then return empty string or type "nil".
  • Who would benefit: All contributors of wiktionary, template editors on wiktionary, to a lesser degree also all other wikis.
  • More comments: Probably relatively easy to implement, but maybe ideological obstacles.
  • Phabricator tickets: There is at least one but I can't find it anymore.
  • Proposer: Taylor 49 (talk) 19:02, 3 February 2023 (UTC)[reply]