Browse Source

Unified translation replace tokens

Ralfp 12 years ago
parent
commit
598f9920a3

+ 2 - 2
templates/cranefly/alerts.html

@@ -34,10 +34,10 @@
 
 
 {% macro get_title() -%}
 {% macro get_title() -%}
 {% if new_alerts -%}
 {% if new_alerts -%}
-{% trans count=new_alerts -%}
+{% trans alerts=new_alerts -%}
 You have one new alert
 You have one new alert
 {%- pluralize -%}
 {%- pluralize -%}
-You have {{ count }} new alerts
+You have {{ alerts }} new alerts
 {%- endtrans %}
 {%- endtrans %}
 {%- else -%}
 {%- else -%}
 {% trans %}Your Notifications{% endtrans %}
 {% trans %}Your Notifications{% endtrans %}

+ 1 - 1
templates/cranefly/private_threads/posting.html

@@ -141,7 +141,7 @@
     <li><i class="icon-time"></i> <a href="{% url 'private_thread_find' thread=thread.pk, slug=thread.slug, post=post.pk %}">{{ post.date|reltimesince }}</a></li>
     <li><i class="icon-time"></i> <a href="{% url 'private_thread_find' thread=thread.pk, slug=thread.slug, post=post.pk %}">{{ post.date|reltimesince }}</a></li>
     <li><i class="icon-user"></i> {% if post.user %}<a href="{% url 'user' user=post.user.pk, username=post.user.username_slug %}">{{ post.user.username }}</a>{% else %}{{ post.user_name }}{% endif %}</li>
     <li><i class="icon-user"></i> {% if post.user %}<a href="{% url 'user' user=post.user.pk, username=post.user.username_slug %}">{{ post.user.username }}</a>{% else %}{{ post.user_name }}{% endif %}</li>
     <li><i class="icon-pencil"></i> {% if post.edits > 0 -%}
     <li><i class="icon-pencil"></i> {% if post.edits > 0 -%}
-      {% trans count=post.edits %}One edit{% pluralize %}{{ count }} edits{% endtrans %}
+      {% trans edits=post.edits %}One edit{% pluralize %}{{ edits }} edits{% endtrans %}
     {%- else -%}
     {%- else -%}
       {% trans %}First edit{% endtrans %}
       {% trans %}First edit{% endtrans %}
     {%- endif %}</li>
     {%- endif %}</li>

+ 6 - 6
templates/cranefly/private_threads/thread.html

@@ -102,9 +102,9 @@
                   {% if post.edits %}
                   {% if post.edits %}
                   <span class="separator">&ndash;</span>
                   <span class="separator">&ndash;</span>
                   {% if acl.threads.can_see_changelog(user, forum, post) %}
                   {% if acl.threads.can_see_changelog(user, forum, post) %}
-                  <a href="{% url 'changelog' thread=thread.pk, slug=thread.slug, post=post.pk %}" class="post-changelog tooltip-bottom" title="{% trans %}Show changelog{% endtrans %}">{% trans count=post.edits %}One edit{% pluralize %}{{ count }} edits{% endtrans %}</a>
+                  <a href="{% url 'changelog' thread=thread.pk, slug=thread.slug, post=post.pk %}" class="post-changelog tooltip-bottom" title="{% trans %}Show changelog{% endtrans %}">{% trans edits=post.edits %}One edit{% pluralize %}{{ edits }} edits{% endtrans %}</a>
                   {% else %}
                   {% else %}
-                  <span class="post-changelog">{% trans count=post.edits %}One edit{% pluralize %}{{ count }} edits{% endtrans %}</span>
+                  <span class="post-changelog">{% trans edits=post.edits %}One edit{% pluralize %}{{ edits }} edits{% endtrans %}</span>
                   {% endif %}
                   {% endif %}
                   {% endif %}
                   {% endif %}
                 </div>
                 </div>
@@ -187,9 +187,9 @@
                 {% if post.edits %}
                 {% if post.edits %}
                 <span class="separator">&ndash;</span>
                 <span class="separator">&ndash;</span>
                 {% if acl.threads.can_see_changelog(user, forum, post) %}
                 {% if acl.threads.can_see_changelog(user, forum, post) %}
-                <a href="{% url 'private_thread_changelog' thread=thread.pk, slug=thread.slug, post=post.pk %}" class="post-changelog tooltip-bottom" title="{% trans %}Show changelog{% endtrans %}">{% trans count=post.edits %}One edit{% pluralize %}{{ count }} edits{% endtrans %}</a>
+                <a href="{% url 'private_thread_changelog' thread=thread.pk, slug=thread.slug, post=post.pk %}" class="post-changelog tooltip-bottom" title="{% trans %}Show changelog{% endtrans %}">{% trans edits=post.edits %}One edit{% pluralize %}{{ edits }} edits{% endtrans %}</a>
                 {% else %}
                 {% else %}
-                <span class="post-changelog">{% trans count=post.edits %}One edit{% pluralize %}{{ count }} edits{% endtrans %}</span>
+                <span class="post-changelog">{% trans edits=post.edits %}One edit{% pluralize %}{{ edits }} edits{% endtrans %}</span>
                 {% endif %}
                 {% endif %}
                 {% endif %}
                 {% endif %}
 
 
@@ -381,10 +381,10 @@
     </div>
     </div>
     <div class="span3">
     <div class="span3">
       <div class="thread-participants">
       <div class="thread-participants">
-        <h3>{% trans count=participants|length -%}
+        <h3>{% trans participants=participants|length -%}
           One participant
           One participant
           {%- pluralize -%}
           {%- pluralize -%}
-          {{ count }} participants
+          {{ participants }} participants
           {%- endtrans %}</h3>
           {%- endtrans %}</h3>
         <ul class="unstyled">{% for participant in participants %}
         <ul class="unstyled">{% for participant in participants %}
           <li>
           <li>

+ 1 - 1
templates/cranefly/threads/posting.html

@@ -150,7 +150,7 @@
     <li><i class="icon-time"></i> <a href="{% url 'thread_find' thread=thread.pk, slug=thread.slug, post=post.pk %}">{{ post.date|reltimesince }}</a></li>
     <li><i class="icon-time"></i> <a href="{% url 'thread_find' thread=thread.pk, slug=thread.slug, post=post.pk %}">{{ post.date|reltimesince }}</a></li>
     <li><i class="icon-user"></i> {% if post.user %}<a href="{% url 'user' user=post.user.pk, username=post.user.username_slug %}">{{ post.user.username }}</a>{% else %}{{ post.user_name }}{% endif %}</li>
     <li><i class="icon-user"></i> {% if post.user %}<a href="{% url 'user' user=post.user.pk, username=post.user.username_slug %}">{{ post.user.username }}</a>{% else %}{{ post.user_name }}{% endif %}</li>
     <li><i class="icon-pencil"></i> {% if post.edits > 0 -%}
     <li><i class="icon-pencil"></i> {% if post.edits > 0 -%}
-      {% trans count=post.edits %}One edit{% pluralize %}{{ count }} edits{% endtrans %}
+      {% trans edit=post.edits %}One edit{% pluralize %}{{ edit }} edits{% endtrans %}
     {%- else -%}
     {%- else -%}
       {% trans %}First edit{% endtrans %}
       {% trans %}First edit{% endtrans %}
     {%- endif %}</li>
     {%- endif %}</li>

+ 4 - 4
templates/cranefly/threads/thread.html

@@ -96,9 +96,9 @@
               {% if post.edits %}
               {% if post.edits %}
               <span class="separator">&ndash;</span>
               <span class="separator">&ndash;</span>
               {% if acl.threads.can_see_changelog(user, forum, post) %}
               {% if acl.threads.can_see_changelog(user, forum, post) %}
-              <a href="{% url 'changelog' thread=thread.pk, slug=thread.slug, post=post.pk %}" class="post-changelog tooltip-bottom" title="{% trans %}Show changelog{% endtrans %}">{% trans count=post.edits %}One edit{% pluralize %}{{ count }} edits{% endtrans %}</a>
+              <a href="{% url 'changelog' thread=thread.pk, slug=thread.slug, post=post.pk %}" class="post-changelog tooltip-bottom" title="{% trans %}Show changelog{% endtrans %}">{% trans edits=post.edits %}One edit{% pluralize %}{{ edits }} edits{% endtrans %}</a>
               {% else %}
               {% else %}
-              <span class="post-changelog">{% trans count=post.edits %}One edit{% pluralize %}{{ count }} edits{% endtrans %}</span>
+              <span class="post-changelog">{% trans edits=post.edits %}One edit{% pluralize %}{{ edits }} edits{% endtrans %}</span>
               {% endif %}
               {% endif %}
               {% endif %}
               {% endif %}
             </div>
             </div>
@@ -181,9 +181,9 @@
             {% if post.edits %}
             {% if post.edits %}
             <span class="separator">&ndash;</span>
             <span class="separator">&ndash;</span>
             {% if acl.threads.can_see_changelog(user, forum, post) %}
             {% if acl.threads.can_see_changelog(user, forum, post) %}
-            <a href="{% url 'thread_changelog' thread=thread.pk, slug=thread.slug, post=post.pk %}" class="post-changelog tooltip-bottom" title="{% trans %}Show changelog{% endtrans %}">{% trans count=post.edits %}One edit{% pluralize %}{{ count }} edits{% endtrans %}</a>
+            <a href="{% url 'thread_changelog' thread=thread.pk, slug=thread.slug, post=post.pk %}" class="post-changelog tooltip-bottom" title="{% trans %}Show changelog{% endtrans %}">{% trans edits=post.edits %}One edit{% pluralize %}{{ edits }} edits{% endtrans %}</a>
             {% else %}
             {% else %}
-            <span class="post-changelog">{% trans count=post.edits %}One edit{% pluralize %}{{ count }} edits{% endtrans %}</span>
+            <span class="post-changelog">{% trans edits=post.edits %}One edit{% pluralize %}{{ edits }} edits{% endtrans %}</span>
             {% endif %}
             {% endif %}
             {% endif %}
             {% endif %}
 
 

+ 2 - 2
templates/cranefly/usercp/username.html

@@ -27,10 +27,10 @@
     <div class="form-actions">
     <div class="form-actions">
       <button name="save" type="submit" class="btn btn-primary"{% if changes_left == 0 %} disabled="disabled"{% endif %}>{% trans %}Change Name{% endtrans %}</button>
       <button name="save" type="submit" class="btn btn-primary"{% if changes_left == 0 %} disabled="disabled"{% endif %}>{% trans %}Change Name{% endtrans %}</button>
       <span class="form-actions-protip">{% if changes_left > 0 -%}
       <span class="form-actions-protip">{% if changes_left > 0 -%}
-      {% trans count=changes_left -%}
+      {% trans changes=changes_left -%}
       You can change your username one more time.
       You can change your username one more time.
       {%- pluralize -%}
       {%- pluralize -%}
-      You can change your username {{ count }} more times.
+      You can change your username {{ changes }} more times.
       {%- endtrans %}
       {%- endtrans %}
       {%- elif acl.usercp.changes_expire() -%}
       {%- elif acl.usercp.changes_expire() -%}
       {% trans next_change=next_change|reldate|low %}You will be able to change your username on {{ next_change }}{% endtrans %}
       {% trans next_change=next_change|reldate|low %}You will be able to change your username on {{ next_change }}{% endtrans %}