def update_lang(self,<EOL>lang: Optional[Text],<EOL>data: List[Tuple[Text, Text]],<EOL>flags: Flags):
sd = SortingDict()<EOL>for item in (self.parse_item(x[<NUM_LIT:0>], x[<NUM_LIT:1>], flags) for x in data):<EOL><INDENT>if item:<EOL><INDENT>sd.append(item)<EOL><DEDENT><DEDENT>if lang not in self.dict:<EOL><INDENT>self.dict[lang] = {}<EOL><DEDENT>d = self.dict[lang]<EOL>for k, v in sd.extract().items():<EOL><INDENT>if k not in d:<EOL><INDENT>d[k] = SentenceGroup()<EOL><DEDENT>d[k].update(v, flags)<EOL><DEDENT>
Update translations for one specific lang