Commit 4b77ecef authored by Michal Čihař's avatar Michal Čihař

No source in checksum for template/ID based translations

The source can change in this case without changing ID, so it makes no
sense to use it as an identifier.
parent 455e02a7
...@@ -161,7 +161,8 @@ class FileUnit(object): ...@@ -161,7 +161,8 @@ class FileUnit(object):
We use MD5 as it is faster than SHA1. We use MD5 as it is faster than SHA1.
''' '''
md5 = hashlib.md5() md5 = hashlib.md5()
md5.update(self.get_source().encode('utf-8')) if self.template is None:
md5.update(self.get_source().encode('utf-8'))
md5.update(self.get_context().encode('utf-8')) md5.update(self.get_context().encode('utf-8'))
return md5.hexdigest() return md5.hexdigest()
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment