- // Workaround for Spanish wiktionary {{ES}} pattern
- text = text.replace("{{ES}}", "== {{lengua|es}} ==");
+ // Workaround for Spanish wiktionary {{ES}} and {{ES|word}} patterns
+ text = text.replaceAll("\\{\\{ES(\\|[^{}=]*)?}}", "== {{lengua|es}} ==");