Community Wishlist Survey 2020/Wiktionary/Wikicode variables usable in and between templates

Wikicode variables usable in and between templates

  • Problem: Wiktionaries organize their pages using a section for each language. However, in each template of each language section, we must add the language code, which leads to errors and a lot of repetitions
  • Who would benefit: All projects needing to define a value and to use it several times. Also it would make contribution for beginners much easier.
  • Proposed solution: Be able to define variables, to assign and reassign values and to use them in templates.
  • More comments:
    • As an example, here's what I thought for French Wiktionary:
      1. Define and assign the language code to the variable lang at the beginning of the section.
      2. For each template which needs the language code, use the variable lang in the template's source code.
    • The templates of the French Wiktionary which would benefit from this proposition are:
      • the pronunciation templates pron, phon and phono
      • the stub templates such as ébauche, ébauche-étym, ébauche-exe, etc...
      • the domain and lexicon templates such as poissons, apiculture, mathématiques, etc...
  • Phabricator tickets:
  • Proposer: Lepticed7 (talk) 15:15, 10 November 2019 (UTC)[reply]

Discussion

  • Having this kind of variable or being able to identify a section of a page as describing a specific language could help a lot to deal with multilinguism. The challenge here is to not include the whole in a template as it will make it more difficult to edit, but to tag a segment where a language code is valid. It could clarify the wikicode a lot. Noé (talk) 15:39, 10 November 2019 (UTC)[reply]

Voting