Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update translate template tag #2289

Merged
merged 1 commit into from
Jul 8, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions onadata/apps/api/templates/api_password_reset_email.html
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
{% load i18n %}

{% blocktrans %}
{% blocktranslate %}
Hi {{ username }},

You recently requested a link to reset your {{ site_name }} password for the username {{ username }}.
Please set a new password by following the link below:
{% endblocktrans %}
{% endblocktranslate %}
{% block reset_link %}
{{ protocol }}://{{ domain }}{{ path }}?uid={{ uid }}&token={{ token }}&username={{ encoded_username }}
{% endblock %}

{% blocktrans %}
{% blocktranslate %}
Thanks,
- The {{ site_name }} Team.
{% endblocktrans %}
{% endblocktranslate %}
2 changes: 1 addition & 1 deletion onadata/apps/logger/templates/bulk_submission_form.html
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ <h2>Bulk Upload Form</h2>
<input type="file" name="zip_submission_file" />
</div>
<div>
<input type="submit" value="{% trans 'Submit' %}" />
<input type="submit" value="{% translate 'Submit' %}" />
</div>
{% csrf_token %}
</form>
Expand Down
2 changes: 1 addition & 1 deletion onadata/apps/logger/templates/form.html
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
<tr>
<td>
{% csrf_token %}
<input type="submit" value="{% trans 'Submit' %}" />
<input type="submit" value="{% translate 'Submit' %}" />
</td>
</tr>
</tfoot>
Expand Down
16 changes: 8 additions & 8 deletions onadata/apps/logger/templates/list_xforms.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@
<table class="pretty padded fullw">
<thead>
<tr>
<th>{% trans "Downloadable by Phone" %}</th>
<th>{% trans "Form ID" %}</th>
<th>{% trans "Number of Submissions" %}</th>
<th>{% trans "Time of Last Submission" %}</th>
<th>{% trans "CSV" %}</th>
<th>{% translate "Downloadable by Phone" %}</th>
<th>{% translate "Form ID" %}</th>
<th>{% translate "Number of Submissions" %}</th>
<th>{% translate "Time of Last Submission" %}</th>
<th>{% translate "CSV" %}</th>
</tr>
</thead>
<tbody>
Expand All @@ -16,9 +16,9 @@
<td>
<a href={% url "toggle-downloadable" id_string=xform.id_string %} class="delete">
{% if xform.downloadable %}
[ {% trans 'yes' %} ]
[ {% translate 'yes' %} ]
{% else %}
[ {% trans 'no' %} ]
[ {% translate 'no' %} ]
{% endif %}
</a>
</td>
Expand All @@ -29,7 +29,7 @@
{{ xform.time_of_last_submission }}
{% endif %}
</td>
<td><a href="#" class="button">{% trans "Download CSV" %}</a></td>
<td><a href="#" class="button">{% translate "Download CSV" %}</a></td>
</tr>
{% endfor %}
</tbody>
Expand Down
6 changes: 3 additions & 3 deletions onadata/apps/logger/templates/submission.html
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
{% load i18n %}

<p>{% trans "Your submission was successful!" %}</p>
<p>{% translate "Your submission was successful!" %}</p>
<ul>
<li><a class="webform-link" href="http://{{ domain }}{% url "form-show" username id_string %}">{% trans "Return to the form page" %}</a></li>
<li><a class="webform-link" href="http://{{ domain }}{% url "enter_data" username id_string %}">{% trans "Fill the form out again" %}</a></li>
<li><a class="webform-link" href="http://{{ domain }}{% url "form-show" username id_string %}">{% translate "Return to the form page" %}</a></li>
<li><a class="webform-link" href="http://{{ domain }}{% url "enter_data" username id_string %}">{% translate "Fill the form out again" %}</a></li>
</ul>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.6.4/jquery.min.js"></script>
<script type="text/javascript">
Expand Down
4 changes: 2 additions & 2 deletions onadata/apps/logger/templates/submission_test_form.html
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
{% extends "base.html" %}
{% load i18n %}
{% block title %}
{% trans "List XForms" %}
{% translate "List XForms" %}
{% endblock %}
{% block content %}
<!-- this page is only intended for use in debugging purposes -->
<form action="/submission" method="post" enctype="multipart/form-data">
<p><input type="file" name="xml_submission_file" /></p>
<p><input type="submit" value="{% trans 'Submit' %}" /></p>
<p><input type="submit" value="{% translate 'Submit' %}" /></p>
</form>
{% endblock %}
2 changes: 1 addition & 1 deletion onadata/apps/main/static/js/lightmodal.js
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ function deleteData(idToDelete){
console.log("successfully deleted.")
})
.error(function(){
alert("{% trans 'BAD REQUEST' %}");
alert("{% translate 'BAD REQUEST' %}");
});
$('.delete_modal').trigger("closeModal");
}
Expand Down
2 changes: 1 addition & 1 deletion onadata/apps/main/templates/activity.html
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
{% block content %}
<section id="activity">
<div class="page-header">
<h1>{% trans "Account Activity" %}</h1>
<h1>{% translate "Account Activity" %}</h1>
</div>
<div class="row">
<span class="span12">
Expand Down
2 changes: 1 addition & 1 deletion onadata/apps/main/templates/api_token.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
{% block content %}
<section id="api_token">
<div class="page-header">
<h1>{% trans "Developer API Token" %}</h1>
<h1>{% translate "Developer API Token" %}</h1>
</div>
<div class="row">
<div class="span6">
Expand Down
28 changes: 14 additions & 14 deletions onadata/apps/main/templates/dashboard.html
Original file line number Diff line number Diff line change
Expand Up @@ -7,22 +7,22 @@
<section id="profile">
<div class="row">
<div class="span5">
<h1>{% blocktrans %}Publish a Form <small>Upload XLSForm</small>{% endblocktrans %}</h1>
<h1>{% blocktranslate %}Publish a Form <small>Upload XLSForm</small>{% endblocktranslate %}</h1>
{% url "tutorial" as tutorial_url %}
{% blocktrans %}For a quick introduction on how to publish a form try do download <a href="/examples/forms/tutorial/form.xls">tutorial.xls</a> and publish it.{% endblocktrans %}
{% blocktranslate %}For a quick introduction on how to publish a form try do download <a href="/examples/forms/tutorial/form.xls">tutorial.xls</a> and publish it.{% endblocktranslate %}
<br/>
<br/>
{% url "syntax" as syntax_url %}
{% blocktrans %}Learn about the XLSForm syntax <a href="{{ syntax_url }}">here</a> along with more <a href="/examples/">form examples</a>.{% endblocktrans %}
{% blocktranslate %}Learn about the XLSForm syntax <a href="{{ syntax_url }}">here</a> along with more <a href="/examples/">form examples</a>.{% endblocktranslate %}
<br/>
<br/>
<form action="." method="post" enctype="multipart/form-data">
{% csrf_token %}
<div class="tabbable">
<ul class="nav nav-tabs nomarginbottom">
<li class="active"><a href="#upload" data-toggle="tab">{% trans "Upload" %}</a></li>
<li><a href="#url" data-toggle="tab">{% trans "URL" %}</a></li>
<li><a href="#db-chooser" data-toggle="tab">{% trans "Dropbox" %}</a></li>
<li class="active"><a href="#upload" data-toggle="tab">{% translate "Upload" %}</a></li>
<li><a href="#url" data-toggle="tab">{% translate "URL" %}</a></li>
<li><a href="#db-chooser" data-toggle="tab">{% translate "Dropbox" %}</a></li>
</ul>
<div class="tab-content bordered-side">
<div class="tab-pane active" id="upload">
Expand All @@ -42,7 +42,7 @@ <h1>{% blocktrans %}Publish a Form <small>Upload XLSForm</small>{% endblocktrans
</div>
<div style='float:middle;'>
<div class="form-actions bordered-side bordered-bottom nomargintop">
<input type="submit" class="btn large btn-primary" value="{% trans 'Publish' %}" />
<input type="submit" class="btn large btn-primary" value="{% translate 'Publish' %}" />
</div>
</div>
</form>
Expand All @@ -55,7 +55,7 @@ <h1>{% blocktrans %}Publish a Form <small>Upload XLSForm</small>{% endblocktrans
<div class="row">
<div class="span1">
{% if not profile.gravatar_exists %}
<a style="display: inline-block;" title="{% trans "Click to change your avatar" %}" href="https://secure.gravatar.com/site/login" id="gravatar">
<a style="display: inline-block;" title="{% translate "Click to change your avatar" %}" href="https://secure.gravatar.com/site/login" id="gravatar">
{% endif %}
<img src='{{ profile.gravatar }}' alt='gravatar' width='60' height='60' />
{% if not profile.gravatar_exists %}
Expand All @@ -69,7 +69,7 @@ <h3 class="short">
<span class="name">|&nbsp;{{ profile.name }}</span>
{% endif %}
</h3>
<span><a href="{% url "public_profile" content_user.username %}">{% trans "View Profile Page" %}</a></span>
<span><a href="{% url "public_profile" content_user.username %}">{% translate "View Profile Page" %}</a></span>
</div>
</div>
<div class="row">
Expand All @@ -85,13 +85,13 @@ <h4>{{ user_instances|intcomma }}</h4>
</div>
<div class="row">
<div class="span1">
<small>{% trans "FORMS" %}</small>
<small>{% translate "FORMS" %}</small>
</div>
<div class="span2">
<small>{% trans "SHARED FORMS" %}</small>
<small>{% translate "SHARED FORMS" %}</small>
</div>
<div class="span2">
<small>{% trans "SUBMISSIONS" %}</small>
<small>{% translate "SUBMISSIONS" %}</small>
</div>
</div>
</div>
Expand All @@ -100,11 +100,11 @@ <h4>{{ user_instances|intcomma }}</h4>
</section>
{% include "published_surveys.html" %}
<p>
{% blocktrans with url=url %}
{% blocktranslate with url=url %}
The url "of" this web application <strong>{{ url }}</strong>
must be given to ODK Collect before it will get forms from and
submit data to ona. In Collect's Main Menu, press the Menu
button. Select Server Preferences, then Server. Enter
<strong>{{ url }}</strong> as the server. {% endblocktrans %}
<strong>{{ url }}</strong> as the server. {% endblocktranslate %}
</p>
{% endblock %}
14 changes: 7 additions & 7 deletions onadata/apps/main/templates/form_gallery.html
Original file line number Diff line number Diff line change
Expand Up @@ -6,17 +6,17 @@

<section id="shared-forms">
<div class="page-header">
<h1>{% blocktrans %}Form Gallery <small>Shared Forms</small>{% endblocktrans %}</h1>
<h1>{% blocktranslate %}Form Gallery <small>Shared Forms</small>{% endblocktranslate %}</h1>
</div>
<div id="mfeedback">&nbsp;</div>

<table id="forms-table" class="table table-bordered table-striped">
<thead>
<tr>
<th>{% trans "User" %}</th>
<th>{% trans "Name" %}</th>
<th>{% trans "Description" %}</th>
<th>{% trans "XLSForm" %}</th>
<th>{% translate "User" %}</th>
<th>{% translate "Name" %}</th>
<th>{% translate "Description" %}</th>
<th>{% translate "XLSForm" %}</th>
</tr>
</thead>
<tbody>
Expand All @@ -30,11 +30,11 @@ <h1>{% blocktrans %}Form Gallery <small>Shared Forms</small>{% endblocktrans %}<
<td>{{ data_dictionary.description }}</td>
<td>
{% if data_dictionary.xls %}
<a href="{% url "download_xlsform" data_dictionary.user.username data_dictionary.id_string %}" class="btn btn-small btn-success">{% trans "Excel" %}</a>
<a href="{% url "download_xlsform" data_dictionary.user.username data_dictionary.id_string %}" class="btn btn-small btn-success">{% translate "Excel" %}</a>
{% if not data_dictionary.id_string in cloned %}
{% if loggedin_user and data_dictionary.xls|length > 0 and loggedin_user.username != data_dictionary.user.username %}
<a href="" data-url="{% url "clone-xlsform" data_dictionary.user.username %}"
data-username="{{ data_dictionary.user.username }}" data-id="{{ data_dictionary.id_string }}" class="clonexls btn small" onclick="$(this).hide()">{% trans "Clone" %}</a>
data-username="{{ data_dictionary.user.username }}" data-id="{{ data_dictionary.id_string }}" class="clonexls btn small" onclick="$(this).hide()">{% translate "Clone" %}</a>
{% endif %}
{% endif %}
{% endif %}
Expand Down
20 changes: 10 additions & 10 deletions onadata/apps/main/templates/getting_started.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@
<h1>{% trans "Getting Started" %}</h1>
</div>

<p>{% blocktrans %}ona aims to make collecting survey data with Android smart phones easy and free.{% endblocktrans %}
<p>{% blocktranslate %}ona aims to make collecting survey data with Android smart phones easy and free.{% endblocktranslate %}
</p>
<p>
{% trans "One uses ona as follows:" %}
{% translate "One uses ona as follows:" %}
<ol>
<li><a href="./#translate-survey">{% trans "Translate survey into the xsl2xform syntax." %}</a></li>
<li><a href="./#publish-form">{% trans "Upload XLSForm file to ona." %}</a></li>
Expand All @@ -27,7 +27,7 @@ <h2>{% trans "Translate survey into the XLSForm syntax" %}</h2>
<div class="row">
<div class="span6">
<p>
{% blocktrans %}The first step in collecting survey data is to actually write the survey. For this tutorial we will be using the following survey:{% endblocktrans %}
{% blocktrans %}The first step in collecting survey data is to actually write the survey. For this tutorial we will be using the following survey:{% endblocktranslate %}
<ol>
<li>{% trans "What is your name?" %}</li>
<li>{% trans "How old are you?" %}</li>
Expand All @@ -36,7 +36,7 @@ <h2>{% trans "Translate survey into the XLSForm syntax" %}</h2>
<li>{% trans "Record your GPS coordinates." %}</li>
<li>{% trans "What web browsers do you use?" %}</li>
</ol>
{% blocktrans %}The second step is writing this survey in the xls2xform syntax. The idea behind this approach is that each question in the survey is a row in the spreadsheet. By using a spreadsheet we can expose most of the XForm features supported by ODK Collect. Check out the images to the right that show the xls2xform syntax for this survey.{% endblocktrans %}
{% blocktranslate %}The second step is writing this survey in the xls2xform syntax. The idea behind this approach is that each question in the survey is a row in the spreadsheet. By using a spreadsheet we can expose most of the XForm features supported by ODK Collect. Check out the images to the right that show the xls2xform syntax for this survey.{% endblocktranslate %}
</p>
</div>
<div class="span10">
Expand All @@ -45,7 +45,7 @@ <h2>{% trans "Translate survey into the XLSForm syntax" %}</h2>
</div>
</div>
{% url "syntax" as syntax_url %}
{% blocktrans %}For more in depth information about the XLSForm syntax go <a href="{{ syntax_url }}">here</a>.{% endblocktrans %}
{% blocktrans %}For more in depth information about the XLSForm syntax go <a href="{{ syntax_url }}">here</a>.{% endblocktranslate %}
</section>

<section id="publish-form">
Expand All @@ -56,7 +56,7 @@ <h2>{% trans "Upload XLSForm file to ona" %}</h2>
<div class="row">
<div class="span6">
<p>
{% blocktrans %}After creating an account and signing into the site you can publish forms for use with ODK Collect. On the right, we submit <a href="{{ STATIC_URL }}tutorial/tutorial.xls">tutorial.xls</a>, described above, for publication.{% endblocktrans %}
{% blocktrans %}After creating an account and signing into the site you can publish forms for use with ODK Collect. On the right, we submit <a href="{{ STATIC_URL }}tutorial/tutorial.xls">tutorial.xls</a>, described above, for publication.{% endblocktranslate %}
</p>
</div>
<div class="span10">
Expand All @@ -66,7 +66,7 @@ <h2>{% trans "Upload XLSForm file to ona" %}</h2>
<div class="row">
<div class="span6">
<p>
{% blocktrans %}After publishing our first form, a new table appears showing our new form. Next we need to use ODK Collect to submit data for this form...{% endblocktrans %}
{% blocktrans %}After publishing our first form, a new table appears showing our new form. Next we need to use ODK Collect to submit data for this form...{% endblocktranslate %}
</p>
</div>
<div class="span10">
Expand All @@ -86,7 +86,7 @@ <h2>{% trans "Use ODK Collect to download form and submit data" %}</h2>
<img width="210px" class="thumbnail" src="{{ STATIC_URL }}tutorial/server_preferences.png" alt="server preferences">
</a></li></ul>
<p>
{% blocktrans %}The url "of" this web application must be given to ODK Collect before it will get forms from and submit data to ona. In ODK Collect's Main Menu, press the Menu button. Select Server Preferences, then Server. Enter <strong>{{ url }}</strong> as the server.{% endblocktrans %}
{% blocktrans %}The url "of" this web application must be given to ODK Collect before it will get forms from and submit data to ona. In ODK Collect's Main Menu, press the Menu button. Select Server Preferences, then Server. Enter <strong>{{ url }}</strong> as the server.{% endblocktranslate %}
</p>
</div>

Expand All @@ -113,7 +113,7 @@ <h2>{% trans "Use ODK Collect to download form and submit data" %}</h2>
<img width="210px" class="thumbnail" src="{{ STATIC_URL }}tutorial/send_finished_data.png" alt="send finished data">
</a></li></ul>
<p>
{% blocktrans %}After filling out the form on your phone submit the data to the server.{% endblocktrans %}
{% blocktrans %}After filling out the form on your phone submit the data to the server.{% endblocktranslate %}
</p>
</div>
</div>
Expand All @@ -127,7 +127,7 @@ <h2>{% trans "Use ona to download and map data submissions" %}</h2>
<div class="row">
<div class="span6">
<p>
{% blocktrans %}After submitting data from ODK Collect to the server you can now download the data as a nicely formatted csv or xls file.{% endblocktrans %}
{% blocktrans %}After submitting data from ODK Collect to the server you can now download the data as a nicely formatted csv or xls file.{% endblocktranslate %}
</p>
</div>
<div class="span10">
Expand Down
10 changes: 5 additions & 5 deletions onadata/apps/main/templates/home.html
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@

{% block content %}
{% if SITE_READ_ONLY%}
<h1>{% blocktrans %}We're down for maintenance. We will be back shortly.{% endblocktrans %}</h1>
<h1>{% blocktranslate %}We're down for maintenance. We will be back shortly.{% endblocktranslate %}</h1>
{% endif %}
<div id="ona-tagline">
<h1>Collect, Analyze and Share Data.
Expand All @@ -95,18 +95,18 @@ <h1>Collect, Analyze and Share Data.
<br/>
<input type="password" class="form-control" autocomplete="off" name="password" placeholder="Password">
<br/>
<button type="submit" class="btn btn-primary btn-lg btn-block">{% trans 'Sign in' %}</button>
<button type="submit" class="btn btn-primary btn-lg btn-block">{% translate 'Sign in' %}</button>
<br/>
<p> Or if you want to create an account, please </p>
{% url "registration_register" as registration_url %}
{% blocktrans %}
{% blocktranslate %}
<a class="btn btn-info btn-lg btn-block" href="{{ registration_url }}">Sign up</a>
{% endblocktrans %}
{% endblocktranslate %}
{% csrf_token %}
<input type="hidden" name="next" value="{{ next }}" />
</form>
{% url "auth_password_reset" as reset_url %}
<p>{% blocktrans %}Can't access your account? <a href="{{ reset_url }}">Reset your password.</a>{% endblocktrans %}</p>
<p>{% blocktranslate %}Can't access your account? <a href="{{ reset_url }}">Reset your password.</a>{% endblocktranslate %}</p>
</div>
</div>
{% endblock %}
12 changes: 6 additions & 6 deletions onadata/apps/main/templates/people.html
Original file line number Diff line number Diff line change
Expand Up @@ -6,16 +6,16 @@

<div class="page-header">
<br>
<h1>{% blocktrans count nb_users=users.count %}Ona users <small>({{ nb_users }})</small>{% plural %}Ona Users <small>({{ nb_users }})</small>{% endblocktrans %}</h1>
<h1>{% blocktranslate count nb_users=users.count %}Ona users <small>({{ nb_users }})</small>{% plural %}Ona Users <small>({{ nb_users }})</small>{% endblocktranslate %}</h1>
</div>
<table id="people-table" class="table table-bordered table-striped">
<thead>
<tr>
<th>{% trans "User" %}</th>
<th>{% trans "Name" %}</th>
<th>{% trans "Organization" %}</th>
<th>{% trans "Location" %}</th>
<th>{% trans "Member Since" %}</th>
<th>{% translate "User" %}</th>
<th>{% translate "Name" %}</th>
<th>{% translate "Organization" %}</th>
<th>{% translate "Location" %}</th>
<th>{% translate "Member Since" %}</th>
</tr>
</thead>
<tbody>
Expand Down
Loading