[damned-lies] Django now supports translator comments in templates



commit 781064d82a65a217f5185cf079b51934233911d3
Author: Claude Paroz <claude 2xlibre net>
Date:   Sat Aug 6 14:54:14 2011 +0200

    Django now supports translator comments in templates

 templates/vertimus/vertimus_detail.html |    3 +++
 vertimus/models.py                      |    6 ------
 2 files changed, 3 insertions(+), 6 deletions(-)
---
diff --git a/templates/vertimus/vertimus_detail.html b/templates/vertimus/vertimus_detail.html
index 11d45b8..025176d 100644
--- a/templates/vertimus/vertimus_detail.html
+++ b/templates/vertimus/vertimus_detail.html
@@ -114,6 +114,9 @@ $(document).ready(function() {
     {% if level == 0 %}
       {% trans "Actions" %}
     {% else %}
+      {% comment %}Translators: human_level is an ordinal expression ('1st',' 2nd',...)
+                   which should be localized in Django itself
+      {% endcomment %}
       {% blocktrans with level|ordinal|safe as human_level %}Archived Actions ({{ human_level }} archived series){% endblocktrans %}
       <a href="{% url vertimus_by_names module.name,branch.name,domain.name,language.locale %}">
         {% trans "(Return to current actions)" %}
diff --git a/vertimus/models.py b/vertimus/models.py
index 60924bb..7fb6bf0 100644
--- a/vertimus/models.py
+++ b/vertimus/models.py
@@ -781,9 +781,3 @@ def reactivate_role(sender, instance, **kwargs):
     except Role.DoesNotExist:
         pass
 post_save.connect(reactivate_role)
-
-""" The following string is just reproduced from a template so as a translator comment
-    can be added (comments are not supported in templates) """
-# Translators: human_level is an ordinal expression ('1st',' 2nd',...)
-# which should be localized in Django itself
-dummy = ugettext("Archived Actions (%(human_level)s archived series)" % {'human_level':0})



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