[damned-lies] Removed information about non-standard string extraction methods



commit 2fee8765b2adad617a2ef995a539b58853c02f82
Author: Claude Paroz <claude 2xlibre net>
Date:   Mon Sep 19 20:50:26 2016 +0200

    Removed information about non-standard string extraction methods
    
    Fixes bug #771634.

 stats/models.py                         |   15 ---------------
 templates/stats_show.html               |    6 ++++--
 templates/vertimus/vertimus_detail.html |    6 ++++--
 3 files changed, 8 insertions(+), 19 deletions(-)
---
diff --git a/stats/models.py b/stats/models.py
index 1ecd2ab..e2c0de6 100644
--- a/stats/models.py
+++ b/stats/models.py
@@ -1575,21 +1575,6 @@ class Statistics(models.Model):
     def set_error(self, tp, description):
         Information.objects.create(statistics=self, type=tp, description=description)
 
-    def informations(self):
-        """ Returns information_set, optionally augmented by domain information """
-        info_set = [i for i in self.information_set.all()]
-        if self.is_pot_stats() and self.domain.pot_method:
-            # Add a dynamic (ie not saved) Information
-            info_set.append(Information(
-                statistics  = self,
-                type        = 'info',
-                description = {
-                    'ui' : ugettext_noop("This POT file has not been generated through the standard intltool 
method."),
-                    'doc': ugettext_noop("This POT file has not been generated through the standard 
gnome-doc-utils method."),
-                }.get(self.domain.dtype, ""))
-            )
-        return info_set
-
     def most_important_message(self):
         """ Return a message of type 1.'error', or 2.'warn, or 3.'warn """
         error = None
diff --git a/templates/stats_show.html b/templates/stats_show.html
index 569d9f8..9cf67c1 100644
--- a/templates/stats_show.html
+++ b/templates/stats_show.html
@@ -24,10 +24,11 @@
     <p class="pot_information">{{ pot_stat.pot_text }}</p>
 
     <!-- This is the title of the section that lists notices about a module -->
-    {% if pot_stat.informations %}
+    {% with informations=pot_stat.information_set.all %}
+    {% if informations %}
         <div class="notices">
             <h4>{% trans "Notices" %}</h4>
-            {% for msg in pot_stat.informations %}
+            {% for msg in informations %}
                 <div class="item">
                     {{ msg.get_description|safe }}
 
@@ -47,6 +48,7 @@
             {% endfor %}
         </div>
     {% endif %}
+    {% endwith %}
 
     <div class="table-responsive">
     <table class="stats table">
diff --git a/templates/vertimus/vertimus_detail.html b/templates/vertimus/vertimus_detail.html
index e152d02..fc60623 100644
--- a/templates/vertimus/vertimus_detail.html
+++ b/templates/vertimus/vertimus_detail.html
@@ -124,10 +124,11 @@ $(document).ready(function() {
   {% endif %}
 </div>
 
-{% if stats.informations %}
+{% with informations=stats.information_set.all %}
+{% if informations %}
 <h4>{% trans "Notices" %}</h4>
 <table>
-  {% for info in stats.informations %}
+  {% for info in informations %}
   <tr>
     <td valign="top"><img src="{{ info.get_icon }}" alt="{{ info.type }}" /></td>
     <td>{{ info.get_description|safe }}</td>
@@ -135,6 +136,7 @@ $(document).ready(function() {
   {% endfor %}
 </table>
 {% endif %}
+{% endwith %}
 
 {% if other_states %}
 <div class="errornote">


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