def target(self): """Return target string from a Translate Toolkit unit.""" if self.unit is None: return "" # Need to decode property encoded string # This is basically stolen from # translate.storage.properties.propunit.gettarget # which for some reason does not return translation value = quote.xwiki_properties_decode(self.unit.value) value = re.sub("\\\\ ", " ", value) return value
def decode(cls, string): return quote.xwiki_properties_decode(string)
def source(self): # Need to decode property encoded string return quote.xwiki_properties_decode(super().source)