示例#1
0
 def lang(self, source):
     key = 'en'
     for line in lazy_split_lines(source):
         if not comment_or_empty_line.match(line):
             break
         match = language_pattern.match(line)
         if match:
             key = match.groups(1)[0]
     return I18n.get(key)
示例#2
0
 def test_print_keyword_for_a_given_language(self):
     assert u"\n" + I18n.get('fr').keyword_table() == u"""