damned-lies r1171 - in trunk: . languages templates/teams



Author: claudep
Date: Fri Nov 14 22:12:03 2008
New Revision: 1171
URL: http://svn.gnome.org/viewvc/damned-lies?rev=1171&view=rev

Log:
2008-11-14  Claude Paroz  <claude 2xlibre net>

	* languages/models.py: Provide summary stats for default categ. Corrected
	link for svn_path.
	* languages/views.py:
	* templates/teams/team_detail.html: Don't try to translate the language
	locale (only if human-readable name).

Modified:
   trunk/ChangeLog
   trunk/languages/models.py
   trunk/languages/views.py
   trunk/templates/teams/team_detail.html

Modified: trunk/languages/models.py
==============================================================================
--- trunk/languages/models.py	(original)
+++ trunk/languages/models.py	Fri Nov 14 22:12:03 2008
@@ -27,7 +27,7 @@
         return None
     
     def get_name(self):
-        if self.name:
+        if self.name != self.locale:
             return _(self.name)
         else:
             return self.locale

Modified: trunk/languages/views.py
==============================================================================
--- trunk/languages/views.py	(original)
+++ trunk/languages/views.py	Fri Nov 14 22:12:03 2008
@@ -79,14 +79,14 @@
     for catname, categ in stats['ui']['categs'].items():
         if catname != 'default':
             content += "<category id=\"%s\">" % catname
-            # totals for category
-            if stats['doc']['categs'].has_key(catname):
-                content += "<doctranslated>%s</doctranslated>" % stats['doc']['categs'][catname]['cattrans']
-                content += "<docfuzzy>%s</docfuzzy>" % stats['doc']['categs'][catname]['catfuzzy']
-                content += "<docuntranslated>%s</docuntranslated>" % stats['doc']['categs'][catname]['catuntrans']
-            content += "<translated>%s</translated>" % categ['cattrans']
-            content += "<fuzzy>%s</fuzzy>" % categ['catfuzzy']
-            content += "<untranslated>%s</untranslated>" % categ['catuntrans']
+        # totals for category
+        if stats['doc']['categs'].has_key(catname):
+            content += "<doctranslated>%s</doctranslated>" % stats['doc']['categs'][catname]['cattrans']
+            content += "<docfuzzy>%s</docfuzzy>" % stats['doc']['categs'][catname]['catfuzzy']
+            content += "<docuntranslated>%s</docuntranslated>" % stats['doc']['categs'][catname]['catuntrans']
+        content += "<translated>%s</translated>" % categ['cattrans']
+        content += "<fuzzy>%s</fuzzy>" % categ['catfuzzy']
+        content += "<untranslated>%s</untranslated>" % categ['catuntrans']
         # Modules
         for modname, mod in categ['modules']:
             content += "<module id=\"%s\" branch=\"%s\">" % (modname, mod[1][1].branch.name)
@@ -103,7 +103,7 @@
                             content += "<fuzzy>%s</fuzzy>" % stat.fuzzy
                             content += "<untranslated>%s</untranslated>" % stat.untranslated
                             content += "<pofile>%s</pofile>" % stat.po_url()
-                            content += "<svnpath>%s</svnpath>" % stat.vcs_path()
+                            content += "<svnpath>%s</svnpath>" % stat.vcs_web_path()
                             content += "</document>"
             # iterate ui domains
             for ui_dom in mod:
@@ -115,7 +115,7 @@
                 content += "<fuzzy>%s</fuzzy>" % stat.fuzzy
                 content += "<untranslated>%s</untranslated>" % stat.untranslated
                 content += "<pofile>%s</pofile>" % stat.po_url()
-                content += "<svnpath>%s</svnpath>" % stat.vcs_path()
+                content += "<svnpath>%s</svnpath>" % stat.vcs_web_path()
                 content += "</domain>"
             content += "</module>"
         

Modified: trunk/templates/teams/team_detail.html
==============================================================================
--- trunk/templates/teams/team_detail.html	(original)
+++ trunk/templates/teams/team_detail.html	Fri Nov 14 22:12:03 2008
@@ -17,7 +17,7 @@
 {% endif %}
 
 {% for lang in team.get_languages %}
-  <h2>{% trans lang.name %}</h2>
+  <h2>{{ lang.get_name }}</h2>
   <table class="stats">
   <thead><tr><th>{% trans "Release" %}</th><th>{% trans "Documentation" %}</th><th>{% trans "Graph" %}</th>
          <th>{% trans "User Interface" %}</th><th>{% trans "Graph" %}</th></tr></thead>



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