Page MenuHomePhabricator

Wiktionary should only allow 'lang' tags corresponding to the current language in an article
Closed, InvalidPublic

Description

For example, this shouldn't be allowed:

==English==

===Noun===
{{en-noun|-}}

# {{context|meats|lang=it}} A kind of [[ham]] ...

Same for 'label', and all other applicable templates that are expected to be in the current language only.

Event Timeline

Yurivict raised the priority of this task from to Needs Triage.
Yurivict updated the task description. (Show Details)
Yurivict subscribed.

Hmm, which problem would you like to solve here?

This is related to local on-wiki templates? How should an edit be (performantly) identified which violates this proposed restriction? Via the MediaWiki parser? As far as I understand so far I'd propose declining this...

(In general please also associate code projects to tasks and not only "Wiktionary". Please also see https://phabricator.wikimedia.org/project/profile/1115/ )

Problem is that people copy/paste wrong language a lot.

Ideally language should disappear - section says what the language is. But both templates are still defined to require the language.

I was under impression that there is some Lua code that runs behind the scenes? I don't know why that language is even needed to be there.

This is a local en.wiktionary issue: you should ask directly here: https://en.wiktionary.org/wiki/Wiktionary:Grease_pit.

@Yurivict: Have you done this? Any link? What was the outcome?

After looking into this, I believe now that Lua functions that handle wiktionary templates don't have access to the section information, as it has been parsed. Particularly, to the location of template in the document hierarchy isn't accessible within Lua script.

This is the reason why my original suggestion isn't easily implementable.

Aklapper triaged this task as Lowest priority.Sep 18 2015, 9:50 AM
Aklapper set Security to None.