if `current = 'de'` but there is no appcontent for 'de' then contents is an empty list after line 363. then line 372 always throws an IndexError because we try to get index 0 of an empty list. it would work if we use a different variable for the language filtered subset of contents.