Ejemplo n.º 1
0
def test_disable_translations():
    change_language('de')
    assert T('McAvoy or Stewart? These timelines are confusing.') ==\
      'McAvoy oder Stewart? Diese Zeitlinien sind verwirrend.'

    with disable_translations():
        assert T('McAvoy or Stewart? These timelines are confusing.') ==\
          'McAvoy or Stewart? These timelines are confusing.'

    assert T('McAvoy or Stewart? These timelines are confusing.') ==\
      'McAvoy oder Stewart? Diese Zeitlinien sind verwirrend.'
Ejemplo n.º 2
0
	def __str__(self):
		with disable_translations():
			return '{}(id={};worldid={})'.format(self.name, self.id, getattr(self, 'worldid', 'none'))