Use block translation tag where appropriate.

This commit is contained in:
Umair Khan
2016-10-13 16:16:07 +05:00
committed by Tim Abbott
parent 08b61c1b3d
commit ca0681a98b
11 changed files with 60 additions and 35 deletions

View File

@@ -3,38 +3,48 @@
<div id="loading_more_messages_indicator"></div> <div id="loading_more_messages_indicator"></div>
<div id="page_loading_indicator"></div> <div id="page_loading_indicator"></div>
<div id="first_run_message" class="empty_feed_notice"> <div id="first_run_message" class="empty_feed_notice">
<h4>{{ _('Welcome to') }} {{product_name}}</h4> <h4>{% trans %}Welcome to {{product_name}}.{% endtrans %}</h4>
<p>{% trans %}See, the thing about it is... there aren't any messages {% trans %}
<p>See, the thing about it is... there aren't any messages
here for you right now. I'm sure someone will eventually send here for you right now. I'm sure someone will eventually send
you one.{% endtrans %}</p> you one.</p>
<p>{{ _('Or') }}, <strong>{{ _('take matters into your own hands') }}</strong>, <p>Or, <strong>take matters into your own hands</strong>,
{{ _('and') }} <a href="#" class="empty_feed_compose_stream"> and <a href="#" class="empty_feed_compose_stream">
{{ _('compose a new stream message') }}</a>.</p> compose a new stream message</a>.</p>
{% endtrans %}
</div> </div>
<div id="empty_narrow_message" class="empty_feed_notice"> <div id="empty_narrow_message" class="empty_feed_notice">
<h4>{{ _("Nothing's been sent here yet!") }}</h4> <h4>{{ _("Nothing's been sent here yet!") }}</h4>
<p>{{ _('Why not') }} <a href="#" class="empty_feed_compose_stream"> {% trans %}
{{ _('start the conversation') }}</a>?</p> <p>Why not <a href="#" class="empty_feed_compose_stream">
start the conversation</a>?</p>
{% endtrans %}
</div> </div>
<div id="empty_narrow_all_private_message" class="empty_feed_notice"> <div id="empty_narrow_all_private_message" class="empty_feed_notice">
<h4>{{ _('You have no private messages yet!') }}</h4> <h4>{{ _('You have no private messages yet!') }}</h4>
<p>{{ _('Why not') }} <a href="#" class="empty_feed_compose_private"> {% trans %}
{{ _('start the conversation') }}</a>?</p> <p>Why not <a href="#" class="empty_feed_compose_private">
start the conversation</a>?</p>
{% endtrans %}
</div> </div>
<div id="empty_narrow_private_message" class="empty_feed_notice"> <div id="empty_narrow_private_message" class="empty_feed_notice">
<h4>{{ _('You have no private messages with this person yet!') }}</h4> <h4>{{ _('You have no private messages with this person yet!') }}</h4>
<p>{{ _('Why not') }} <a href="#" class="empty_feed_compose_private"> {% trans %}
{{ _('start the conversation') }}</a>?</p> <p>Why not <a href="#" class="empty_feed_compose_private">
start the conversation</a>?</p>
{% endtrans %}
</div> </div>
<div id="empty_narrow_multi_private_message" class="empty_feed_notice"> <div id="empty_narrow_multi_private_message" class="empty_feed_notice">
<h4>{{ _('You have no private messages with these people yet!') }}</h4> <h4>{{ _('You have no private messages with these people yet!') }}</h4>
<p>{{ _('Why not') }} <a href="#" class="empty_feed_compose_private"> {% trans %}
{{ _('start the conversation') }}</a>?</p> <p>Why not <a href="#" class="empty_feed_compose_private">
start the conversation</a>?</p>
{% endtrans %}
</div> </div>
<div id="silent_user" class="empty_feed_notice"> <div id="silent_user" class="empty_feed_notice">
<h4>{{ _("You haven't received any messages sent by this user yet!") }}</h4> <h4>{{ _("You haven't received any messages sent by this user yet!") }}</h4>
@@ -46,7 +56,7 @@
<h4>{{ _("You aren't subscribed to this stream and nobody has talked about that yet!") }}</h4> <h4>{{ _("You aren't subscribed to this stream and nobody has talked about that yet!") }}</h4>
<div class="sub_button_row"> <div class="sub_button_row">
<button class="btn empty_feed_sub_unsub btn-default" type="button" name="subscription"> <button class="btn empty_feed_sub_unsub btn-default" type="button" name="subscription">
Subscribe {{ _('Subscribe') }}
</button> </button>
</div> </div>
</div> </div>

View File

@@ -51,7 +51,7 @@ var page_params = {{ page_params }};
{% block content %} {% block content %}
<div id="css-loading"> <div id="css-loading">
<h3>{{ _('Loading') }}...</h3> <h3>{{ _('Loading') }}...</h3>
<p>{{ _('If this message does not go away, please wait a couple seconds and') }} <a href="javascript:location.reload(true)">{{ _('reload') }}</a> {{ _('the page') }}.</p> <p>{% trans %}If this message does not go away, please wait a couple seconds and <a href="javascript:location.reload(true)">reload</a> the page.{% endtrans %}</p>
</div> </div>
<div id="top-screen" class="screen"></div> <div id="top-screen" class="screen"></div>

View File

@@ -2,7 +2,7 @@
aria-labelledby="invite-user-label" aria-hidden="true"> aria-labelledby="invite-user-label" aria-hidden="true">
<div class="modal-header"> <div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button> <button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
<h3 id="invite-user-label">{{ _('Invite users to') }} {{product_name}}</h3> <h3 id="invite-user-label">{% trans %}Invite users to {{product_name}}{% endtrans %}</h3>
</div> </div>
<form id="invite_user_form" class="form-horizontal" <form id="invite_user_form" class="form-horizontal"
action="/json/invite_users" method="POST">{{ csrf_input }} action="/json/invite_users" method="POST">{{ csrf_input }}

View File

@@ -33,7 +33,7 @@
</div> </div>
<div id="share-the-love-contents"> <div id="share-the-love-contents">
<div id="tell-a-friend-success" class="alert alert-success"> <div id="tell-a-friend-success" class="alert alert-success">
<strong>{{ _('Thanks!') }}</strong> {{ _('A hand-crafted, artisanal invite is on the way') }}. {% trans %}<strong>Thanks!</strong> A hand-crafted, artisanal invite is on the way.{% endtrans %}
</div> </div>
<div class="still-have-invites" id="encouraging-invite-message"> <div class="still-have-invites" id="encouraging-invite-message">
<p> <p>
@@ -58,6 +58,7 @@
</div> </div>
<div class="invite-count-area"> <div class="invite-count-area">
<span id="invite-hearts"></span> <span id="invite-hearts"></span>
{# This translation should be handled through i18next because we control this text using JavaScript. #}
<small class="pull-right"><span class="invite-count">0</span> {{ _('invite') }}<span class="invite-count-is-plural">s</span> {{ _('remaining') }}</small> <small class="pull-right"><span class="invite-count">0</span> {{ _('invite') }}<span class="invite-count-is-plural">s</span> {{ _('remaining') }}</small>
</div> </div>
</div> </div>

View File

@@ -15,9 +15,11 @@
<span class="tagline os-tagline"> <span class="tagline os-tagline">
{{ _('Zulip has been released as open source software!') }} {{ _('Zulip has been released as open source software!') }}
</span> </span>
{% trans %}
<span class="footnote os-footnote"> <span class="footnote os-footnote">
{{ _('Read the') }} <a href="https://blogs.dropbox.com/tech/2015/09/open-sourcing-zulip-a-dropbox-hack-week-project" target="_blank">{{ _('announcement') }}</a> {{ _('or go to') }} <a href="https://www.zulip.org" target="_blank">{{ _('the Zulip open source project website') }}</a>. Read the <a href="https://blogs.dropbox.com/tech/2015/09/open-sourcing-zulip-a-dropbox-hack-week-project" target="_blank">announcement</a> or go to <a href="https://www.zulip.org" target="_blank">the Zulip open source project website</a>.
</span> </span>
{% endtrans %}
</div> </div>
</div> </div>
{% endif %} {% endif %}

View File

@@ -16,10 +16,12 @@ Form is validated both client-side using jquery-validate (see signup.js) and ser
<div class="center-container"> <div class="center-container">
<div class="center-block"> <div class="center-block">
<div class="pitch"> <div class="pitch">
{% trans %}
<h1>You're almost there.</h1> <h1>You're almost there.</h1>
<p> <p>
We just need you to do one last thing. We just need you to do one last thing.
</p> </p>
{% endtrans %}
</div> </div>
<form method="post" class="form-horizontal" id="registration" action="{{ url('zerver.views.accounts_register') }}"> <form method="post" class="form-horizontal" id="registration" action="{{ url('zerver.views.accounts_register') }}">
@@ -93,6 +95,7 @@ Form is validated both client-side using jquery-validate (see signup.js) and ser
<div class="m-v-20"> <div class="m-v-20">
<div class="help-box"> <div class="help-box">
<div id="org_type_blob_1" class="blob display-none"> <div id="org_type_blob_1" class="blob display-none">
{% trans %}
Create a corporate organization if your users will Create a corporate organization if your users will
be members of the same company, where the privacy be members of the same company, where the privacy
expectation is that the company's organization expectation is that the company's organization
@@ -101,8 +104,10 @@ Form is validated both client-side using jquery-validate (see signup.js) and ser
allow organization administrators to take control of allow organization administrators to take control of
accounts or access private message history for other accounts or access private message history for other
users are only available to corporate organizations. users are only available to corporate organizations.
{% endtrans %}
</div> </div>
<div id="org_type_blob_2" class="blob"> <div id="org_type_blob_2" class="blob">
{% trans %}
Create a community organization for an open source Create a community organization for an open source
project, social group, or other community where the project, social group, or other community where the
privacy expectation is that you and other privacy expectation is that you and other
@@ -112,6 +117,7 @@ Form is validated both client-side using jquery-validate (see signup.js) and ser
control of accounts or access private message control of accounts or access private message
history for other users are disabled in community history for other users are disabled in community
organizations. organizations.
{% endtrans %}
</div> </div>
</div> </div>
</div> </div>
@@ -125,7 +131,7 @@ Form is validated both client-side using jquery-validate (see signup.js) and ser
value="{% if form.password.value() %}{{ form.password.value() }}{% endif %}" value="{% if form.password.value() %}{{ form.password.value() }}{% endif %}"
maxlength="100" /> maxlength="100" />
{% if full_name %} {% if full_name %}
<span class="help-inline">{{ _('This is used for mobile applications and other tools that require a password') }}.</span> <span class="help-inline">{{ _('This is used for mobile applications and other tools that require a password.') }}</span>
{% endif %} {% endif %}
{% if form.password.errors %} {% if form.password.errors %}
{% for error in form.password.errors %} {% for error in form.password.errors %}
@@ -157,7 +163,7 @@ Form is validated both client-side using jquery-validate (see signup.js) and ser
<input id="id_terms" class="required" type="checkbox" name="terms" <input id="id_terms" class="required" type="checkbox" name="terms"
{% if form.terms.value() %}checked="checked"{% endif %} /> {% if form.terms.value() %}checked="checked"{% endif %} />
<label for="id_terms" class="inline-block"> <label for="id_terms" class="inline-block">
{{ _('I agree to the') }} <a href="{{ server_uri }}/terms" target="_blank">{{ _('Terms of Service') }}</a>. {% trans %}I agree to the <a href="{{ server_uri }}/terms" target="_blank">Terms of Service</a>.{% endtrans %}
</label> </label>
{% if form.terms.errors %} {% if form.terms.errors %}
{% for error in form.terms.errors %} {% for error in form.terms.errors %}

View File

@@ -10,7 +10,7 @@
<div class="password-reset"> <div class="password-reset">
<!-- TODO: Ask about meta viewport 1:1 scaling --> <!-- TODO: Ask about meta viewport 1:1 scaling -->
<div class="pitch"> <div class="pitch">
<h3>{{ _('Reset your password') }}.</h3> <h3>{{ _('Reset your password.') }}</h3>
</div> </div>
{% if validlink %} {% if validlink %}
@@ -69,7 +69,7 @@
autofocus('#id_new_password1'); autofocus('#id_new_password1');
</script> </script>
{% else %} {% else %}
<p>{{ _('Sorry, the link you provided is invalid or has already been used') }}.</p> <p>{{ _('Sorry, the link you provided is invalid or has already been used.') }}</p>
{% endif %} {% endif %}
</div> </div>
</div> </div>

View File

@@ -1,6 +1,6 @@
{% extends "zerver/portico_signup.html" %} {% extends "zerver/portico_signup.html" %}
{% block portico_content %} {% block portico_content %}
<h1 style="margin-top: 20px">{{ _("We've reset your password!") }}</h1> <h1 style="margin-top: 20px">{{ _("We've reset your password!") }}</h1>
<p>{{ _('Please') }} <a href="{{ url('django.contrib.auth.views.login') }}">{{ _('log in') }}</a>.</p> <p>{% trans login_url=url('django.contrib.auth.views.login') %}Please <a href="{{ login_url }}">log in</a>.{% endtrans %}</p>
{% endblock %} {% endblock %}

View File

@@ -1,6 +1,8 @@
{% extends "zerver/portico_signup.html" %} {% extends "zerver/portico_signup.html" %}
{% block portico_content %} {% block portico_content %}
<h1 style="margin-top: 20px">{{ _('We just sent you a password reset!') }}</h1> {% trans %}
<h1>{{ _('Check your email to finish the process') }}.</h1> <h1 style="margin-top: 20px">We just sent you a password reset!</h1>
<p>({{ _("Or don't, but then why did you fill out this form?") }})</p> <h1>Check your email to finish the process.</h1>
<p>(Or don't, but then why did you fill out this form?)</p>
{% endtrans %}
{% endblock %} {% endblock %}

View File

@@ -70,22 +70,24 @@
</tr> </tr>
<tr> <tr>
<td class="operator"><span class="operator_value">keyword</span></td> <td class="operator"><span class="operator_value">keyword</span></td>
<td class="definition">{{ _('Search for') }} <span class="operator_value">{{ _('keyword') }}</span> {{ _('in the topic or message content') }}</td> <td class="definition">{% trans %}Search for <span class="operator_value"> keyword </span> in the topic or message content {% endtrans %}</td>
</tr> </tr>
<tr> <tr>
<td class="operator">-topic:<span class="operator_value">topic</span></td> <td class="operator">-topic:<span class="operator_value">topic</span></td>
<td class="definition">{{ _('Exclude messages with topic') }} <span class="operator_value">topic</span></td> <td class="definition">{% trans %}Exclude messages with topic <span class="operator_value">topic</span>{% endtrans %}</td>
</tr> </tr>
</table> </table>
<p>{{ _('You can use any combination of these search operators in a single query') }}. {{ _('For example') }}:</p> {% trans %}
<p>You can use any combination of these search operators in a single query. For example:</p>
<p>&nbsp; <span class="operator">stream:<span class="operator_value">streamname</span> <p>&nbsp; <span class="operator">stream:<span class="operator_value">streamname</span>
sender:<span class="operator_value">user@example.com</span> sender:<span class="operator_value">user@example.com</span>
<span class="operator_value">keyword</span></span></p> <span class="operator_value">keyword</span></span></p>
<p>{{ _('would search for messages sent by') }} <span class="operator_value">user@example.com</span> {{ _('to stream') }} <p>would search for messages sent by <span class="operator_value">user@example.com</span> to stream
<span class="operator_value">streamname</span> <span class="operator_value">streamname</span>
{{ _('containing the keyword') }} <span class="operator_value">keyword</span>.</p> containing the keyword <span class="operator_value">keyword</span>.</p>
{% endtrans %}
</div> </div>
<div class="modal-footer"> <div class="modal-footer">
<button class="btn btn-primary" data-dismiss="modal" aria-hidden="true">{{ _('Close') }}</button> <button class="btn btn-primary" data-dismiss="modal" aria-hidden="true">{{ _('Close') }}</button>

View File

@@ -1,7 +1,9 @@
<p>({{ _("Welcome! We think you'll like it here") }}.)</p> <p>({{ _("Welcome! We think you'll like it here.") }})</p>
<hr/> <hr/>
<div class="pitch"> <div class="pitch">
<p>{{ _("Your organization has been migrated from zulip.com to zulipchat.com! New service, same great conversation. We just need you to do one last thing.") }}</p> {% trans %}
<h3>{{ _("Accept the Zulip terms of service") }}</h3> <p>Your organization has been migrated from zulip.com to zulipchat.com! New service, same great conversation. We just need you to do one last thing.</p>
<h3>Accept the Zulip terms of service</h3>
{% endtrans %}
</div> </div>