Drop the checksum field from catkeys file header
|Reported by:||rq||Owned by:||pulkomandy|
|Has a Patch:||no||Platform:||All|
From discussions with PulkoMandy, it seems to me that the checksum field in the catkeys header is superflous and could be dropped (PulkoMandy doesn't think that way though). My reasons for dropping it are:
1) it's being used at compile time to ensure that the source strings have not been altered, which is IMO not the best way to ensure integrity. Instead, checks could be done at compile time, or a special script could be developed to make checks for missing/obsolete strings easier. Here's an example output of such app, used for Mozilla: rq@sugar:~/src/mozilla/mercurial$ compare-locales mozilla-central/browser/locales/l10n.ini . lt lt
lt: keys: 984 unchanged: 257 changed: 5257 missing: 3 95% of entries changed
2) the checksum is also used at runtime for the same purpose. Again, I think it's even less useful in this case. At runtime, the application may have five of fifty new strings that don't exist in my file anyway, and my invalid string may have already been dropped. What's the point on invalidating whole translation just based on that? I see none. Also, PulkoMandy said that the checksum may at some point used to block outdated translations from being used. If that were ever to happen, I suggest to compute the effective checksum of a localization at runtime instead (which has to be done anyway, at least for languages with fallbacks, like pt_BR).
3) if someone were to ever edit the catkeys files manually, the checksum isn't easy to calculate.
4) the checksum doesn't say anything about the target language strings, which means these can have any amount of errors, bad encoding and anything else. This again mandates a compile-time check, which, once existing, could be expanded to take over the checksums job anyway.