damned-lies r1236 - in trunk: . stats



Author: claudep
Date: Tue Dec 23 17:31:51 2008
New Revision: 1236
URL: http://svn.gnome.org/viewvc/damned-lies?rev=1236&view=rev

Log:
2008-12-23  Claude Paroz  <claude 2xlibre net>

	* stats/models.py: Always compute stats for languages containing LINGUAS
	errors, to check if the error has been resolved.
	Fixes #565442.

Modified:
   trunk/ChangeLog
   trunk/stats/models.py

Modified: trunk/stats/models.py
==============================================================================
--- trunk/stats/models.py	(original)
+++ trunk/stats/models.py	Tue Dec 23 17:31:51 2008
@@ -317,10 +317,13 @@
             # 6. Update language po files and update DB
             # *****************************************
             command = "msgmerge -o %(outpo)s %(pofile)s %(potfile)s"
+            stats_with_linguas_errors = Statistics.objects.filter(branch=self, domain=dom, information__description__contains='LINGUAS')
+            langs_with_linguas_errors = [stat.language.locale for stat in stats_with_linguas_errors]
             for lang, pofile in self.get_lang_files(dom, domain_path):
                 outpo = os.path.join(self.output_dir(dom.dtype), dom.potbase() + "." + self.name + "." + lang + ".po")
 
-                if not force and not pot_has_changed and os.access(outpo, os.R_OK) and os.stat(pofile)[8] < os.stat(outpo)[8]:
+                if not force and not pot_has_changed and os.access(outpo, os.R_OK) and os.stat(pofile)[8] < os.stat(outpo)[8] \
+                   and not lang in langs_with_linguas_errors :
                     continue
 
                 realcmd = command % {



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]