示例#1
0
 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
示例#2
0
 def decode(cls, string):
     return quote.xwiki_properties_decode(string)
示例#3
0
 def source(self):
     # Need to decode property encoded string
     return quote.xwiki_properties_decode(super().source)