GNOME Bugzilla – Bug 405677
Stats may sometimes show a negative value for untranslated messages
Last modified: 2012-10-16 22:23:47 UTC
The release stats may sometimes show a negative total for untranslated messages. This occurs as the untranslated stats are derived by a formula: untranslated = total - translated - fuzzy If there is an error on generating either the pot or po files, old versions are used which may be out of sync with the current version, meaning that there are too many translated or fuzzy messages. This effects overview of releases and causing invalid XHTML.
The easiest way to fix this is to put in a low-tech hack of: if (untrans < 0) untrans=0; This would mean that the stats are no longer negative; but would not be reflecting the real stats (though, if we cannot generate a valid pot/po file, the stats are always going to be out)
Created attachment 83967 [details] [review] Proposed patch to fix problem I've gone through all cases where this is possible and put the hack. It's possible that a lot of these cases are not needed, but they don't harm.
Making some headway - in damned-lies some modules exist in the release sets, but either don't really exist or have always had pot generation problems. This no doubt means that the database stores some information about which is wrong. Some of these I've fixed by removing them from releases.xml.po (e.g. gnome-glossary, uf-view, optimystic, gnome-app-install). Some can be fixed by ensuring that the pot file builds (gnome-ruby, gnome-tiny-fu, mcatalog). For some reason (I can't work it out) beast has failed to generate a pot file since January. Which is strange as I can't replicate the problem by hand.
Created attachment 99110 [details] Module page mockup Here's a simple mockup of the module page modification to add a link to the /images page (link from the 'figure' image next to the stats).
Arghh, sorry I was on the bad page. I blame this "next bug" behaviour :-(
I would rather try to figure out why does that happen to begin with and later fix that than adding patches to fix errors generated somewhere else... I'm closing the bug, feel free to reopen it, but it would be far better if you can report a new bug with some actual way to reproduce (I know that in this case is really hard) a negative value.