rule editor: fix focus handling
rule editor: use url parameter to set default language
rule editor: improve var name
rule editor: fix tests