Page MenuHomePhabricator

"error" class if #language can't parse a code
Open, LowPublicFeature

Description

Author: pinkampersand.wikimedia

Description:
Lately I've been working on some templates using the #language magic word, and I've wanted to write in fallbacks if someone specifies an invalid or unsupported code. Currently, I have to do this with the markup {{#ifeq:{{#language:{{{1}}}}}|{{{1}}}||<text to display>}}, which is somewhat cumbersome. So, my suggestion is that instead of simply returning the same thing someone input when the language code doesn't work, we also wrap it in <span class="error"></span>. That way, you'd be able to do fallbacks with the slightly simpler {{#iferror:{{#language:{{{1}}}}}||<text to display>}}.


Version: unspecified
Severity: enhancement
URL: http://en.wikipedia.org/w/index.php?title=User:PinkAmpersand/Extra_sandbox&oldid=565498205

Details

Reference
bz51892

Event Timeline

bzimport raised the priority of this task from to Low.Nov 22 2014, 2:04 AM
bzimport set Reference to bz51892.
bzimport added a subscriber: Unknown Object (MLST).
Aklapper changed the subtype of this task from "Task" to "Feature Request".Feb 4 2022, 11:13 AM
Aklapper removed a subscriber: wikibugs-l-list.