damned-lies r1115 - in branches/djamnedlies: . stats templates



Author: claudep
Date: Tue Oct 28 16:35:17 2008
New Revision: 1115
URL: http://svn.gnome.org/viewvc/damned-lies?rev=1115&view=rev

Log:
2008-10-28  Claude Paroz  <claude 2xlibre net>

	* stats/models.py: Missing branch name in po file name produced by 
	update-stats.
	* stats/views.py: Fixed typo in template name.
	* templates/index.html:
	* TODO: Hardcoded '/stats/teams' in index.html fixed.

Modified:
   branches/djamnedlies/ChangeLog
   branches/djamnedlies/TODO
   branches/djamnedlies/stats/models.py
   branches/djamnedlies/stats/views.py
   branches/djamnedlies/templates/index.html

Modified: branches/djamnedlies/TODO
==============================================================================
--- branches/djamnedlies/TODO	(original)
+++ branches/djamnedlies/TODO	Tue Oct 28 16:35:17 2008
@@ -3,6 +3,5 @@
  * replace entirely defaults.py by conf/settings.py
  * we could use username instead of person_id (get_absolute_url must
    be updated accordingly) in urls.py
- * FIX '/stats/teams' in index.html
  * Still a webroot in stats_show.html
 

Modified: branches/djamnedlies/stats/models.py
==============================================================================
--- branches/djamnedlies/stats/models.py	(original)
+++ branches/djamnedlies/stats/models.py	Tue Oct 28 16:35:17 2008
@@ -338,7 +338,7 @@
             # Update po files and update DB with new stats
             command = "msgmerge -o %(outpo)s %(pofile)s %(potfile)s"
             for lang, pofile in self.get_lang_files(dom, domain_path):
-                outpo = os.path.join(self.output_dir(dom.dtype), dom.potbase() + "." + lang + ".po")
+                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]:
                     continue
@@ -872,7 +872,7 @@
                 if fig['translated']: stats['translated'] += 1
         stats['untranslated'] = stats['total'] - (stats['translated'] + stats['fuzzy'])
         if stats['total'] > 0:
-            stats['prc'] = stats['translated']/stats['total']
+            stats['prc'] = 100*stats['translated']/stats['total']
         return stats
             
     def vcs_path(self):

Modified: branches/djamnedlies/stats/views.py
==============================================================================
--- branches/djamnedlies/stats/views.py	(original)
+++ branches/djamnedlies/stats/views.py	Tue Oct 28 16:35:17 2008
@@ -113,7 +113,7 @@
         'module': mod,
         'stat': stat
     }
-    return render_to_response('module-_images.html', context)
+    return render_to_response('module_images.html', context)
 
 def releases(request):
     all_releases = Release.objects.order_by('status', '-name')

Modified: branches/djamnedlies/templates/index.html
==============================================================================
--- branches/djamnedlies/templates/index.html	(original)
+++ branches/djamnedlies/templates/index.html	Tue Oct 28 16:35:17 2008
@@ -18,7 +18,8 @@
 </td><td valign="top">
 
 <h2><a href="{% url languages %}">{% trans "Languages" %}</a></h2>
-<p>{% trans "List of all languages there are <a href='/stats/teams'>Translation Teams</a> for."%}
+{% url teams as teams_url %}
+<p>{% blocktrans %}List of all languages there are <a href='{{ teams_url }}'>Translation Teams</a> for.{% endblocktrans %}
   {% trans "Some teams manage more than one language (usually just simple variants), and here you can see all the languages GNOME is being translated to." %}</p>
 
 </td></tr><tr><td valign="top">



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