Use md5 for compare file translation content. Because it is possible that timestamp changed, but content of translation is the same.

Here is the patch

CommentFileSizeAuthor
l10n_update.md5-for-compare.patch2.57 KBigor.ro

Comments

sutharsan’s picture

Version: 7.x-1.0-beta3 » 7.x-2.x-dev
Issue summary: View changes

What problem are we solving with this proposal? How often does it happen that time stamps change and what is the impact?

igor.ro’s picture

I have Continous Deployment that runs update translations.
timestamp differs (because of capistrano, that makes copy of code), but content of po files are the same.
So I have overhead import that takes time.

thepanz’s picture

Some overhead may occur given that you're using GET instead of HEAD (thus getting the entire file contents and not just the headers).
HTTP headers may contain also MD5 signatures of the contents, thus avoiding to manually download and compute them (see: http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.15). I don't know the current adoption of such header, but could be good to integrate it.
my 2 cents.

hass’s picture

Title: Use md5 for compare file translation content » Use sha256 for compare file translation content

If we compare something, than only with secure functions.