Просмотр исходного кода

Exposed other lang strings to makemessages. #300

Rafał Pitoń 11 лет назад
Родитель
Сommit
5abf11aa59

+ 10 - 3
templates/cranefly/private_threads/posting.html

@@ -62,7 +62,7 @@
             {{ form_theme.row(form.thread_name, attrs={'class': 'span8'}) }}
             {% endif %}
             {% if action == 'new_thread' and 'invite_users' in form.fields %}
-            {{ form_theme.row(form.invite_users, attrs={'class': 'span8', 'placeholder': _("User1, User2, User3...")}) }}
+            {{ form_theme.row(form.invite_users, attrs={'class': 'span8', 'placeholder': lang_user1_user2_user3()}) }}
             {% endif %}
             {% if 'thread_name' in form.fields or (action == 'new_thread' and 'invite_users' in form.fields) %}
             <hr>
@@ -72,7 +72,7 @@
             {% if 'edit_reason' in form.fields or (action == 'new_reply' and 'invite_users' in form.fields) %}
             <hr>
             {% if action == 'new_reply' and 'invite_users' in form.fields %}
-            {{ form_theme.row(form.invite_users, attrs={'class': 'span8', 'placeholder': _("user1, user2, user3...")}) }}
+            {{ form_theme.row(form.invite_users, attrs={'class': 'span8', 'placeholder': lang_user1_user2_user3()}) }}
             {% endif %}
             {% if 'edit_reason' in form.fields %}
             {{ form_theme.row(form.edit_reason, attrs={'class': 'span8'}) }}
@@ -109,6 +109,13 @@
 {% endblock %}
 
 
+{# Language strings macros #}
+{% macro lang_user1_user2_user3() -%}
+{% trans %}user1, user2, user3...{% endtrans %}
+{%- endmacro %}
+
+
+{# Template Macros #}
 {% macro get_action() -%}
 {% if action == 'new_thread' -%}
 {{ url('private_thread_start') }}
@@ -180,4 +187,4 @@
 
 {% macro get_extra() %}
   <button id="editor-preview" name="preview" type="submit" class="btn pull-right">{% trans %}Preview{% endtrans %}</button>
-{% endmacro %}
+{% endmacro %}

+ 8 - 2
templates/cranefly/resend_activation.html

@@ -22,7 +22,7 @@
       <form action="{{ url('send_activation') }}" method="post">
         {{ form_theme.hidden_fields(form) }}
         <div class="form-fields">
-          {{ form_theme.row(form.email, attrs={'class': 'span6', 'placeholder': _("Enter your e-mail address.")}) }}
+          {{ form_theme.row(form.email, attrs={'class': 'span6', 'placeholder': lang_enter_your_email()}) }}
           {{ form_theme.captcha(form, attrs={'class': 'span6'}) }}
         </div>
         <div class="form-actions">
@@ -33,4 +33,10 @@
     </div>
   </div>
 </div>
-{% endblock %}
+{% endblock %}
+
+
+{# Translation Strings #}
+{% macro lang_enter_your_email() -%}
+{% trans %}Enter your e-mail address{% endtrans %}
+{%- endmacro %}

+ 8 - 2
templates/cranefly/reset_password.html

@@ -22,7 +22,7 @@
       <form action="{{ url('forgot_password') }}" method="post">
         {{ form_theme.hidden_fields(form) }}
         <div class="form-fields">
-          {{ form_theme.row(form.email, attrs={'class': 'span6', 'placeholder': _("Enter your e-mail address.")}) }}
+          {{ form_theme.row(form.email, attrs={'class': 'span6', 'placeholder': lang_enter_your_email()}) }}
           {{ form_theme.captcha(form, attrs={'class': 'span6'}) }}
         </div>
         <div class="form-actions">
@@ -33,4 +33,10 @@
     </div>
   </div>
 </div>
-{% endblock %}
+{% endblock %}
+
+
+{# Translation Strings #}
+{% macro lang_enter_your_email() -%}
+{% trans %}Enter your e-mail address{% endtrans %}
+{%- endmacro %}

+ 8 - 3
templates/cranefly/signin.html

@@ -38,7 +38,7 @@
         <div class="form-fields">
           {{ form_theme.hidden_fields(form) }}
           {{ form_theme.row(form.user_email, attrs={'class': 'span4', 'placeholder': lang_singnin_enter_email()}) }}
-          {{ form_theme.row(form.user_password, attrs={'class': 'span4', 'placeholder':lang_singnin_enter_password()}) }}
+          {{ form_theme.row(form.user_password, attrs={'class': 'span4', 'placeholder': lang_singnin_enter_password()}) }}
           {% if 'user_remember_me' in form.fields %}
           {{ form_theme.row(form.user_remember_me) }}
           {% endif %}
@@ -66,5 +66,10 @@
 {% endblock %}
 
 {# Language strings macros #}
-{% macro lang_singnin_enter_email() -%}{% trans %}Enter your e-mail{% endtrans %}{%- endmacro %}
-{% macro lang_singnin_enter_password() -%}{% trans %}Enter your password{% endtrans %}{%- endmacro %}
+{% macro lang_singnin_enter_email() -%}
+{% trans %}Enter your e-mail{% endtrans %}
+{%- endmacro %}
+
+{% macro lang_singnin_enter_password() -%}
+{% trans %}Enter your password{% endtrans %}
+{%- endmacro %}