Skip to content

Commit

Permalink
Wrap strings for translation
Browse files Browse the repository at this point in the history
  • Loading branch information
kluo committed Jul 22, 2014
1 parent e89abd4 commit d2f0e70
Show file tree
Hide file tree
Showing 13 changed files with 333 additions and 277 deletions.
7 changes: 4 additions & 3 deletions maintenance/index.html
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
<%! from django.utils.translation import ugettext as _ %>
<!DOCTYPE html>
<html>
<head>
<title>Down for Maintenance</title>
<title>${_('Down for Maintenance')}</title>

<link href="https://www.stanford.edu/su-identity/css/su-identity.css" rel="stylesheet">
<link href="https://fonts.googleapis.com/css?family=Source+Sans+Pro:300,400,700" rel="stylesheet" type="text/css">
Expand Down Expand Up @@ -75,9 +76,9 @@
<!-- Brandbar snippet end -->

<div class="maintenance-message">
<h1>Down for Maintenance</h1>
<h1>${_('Down for Maintenance')}</h1>

<p>We are currently performing system maintenance, please try again in a little while.</p>
<p>${_('We are currently performing system maintenance, please try again in a little while.')}</p>

</div>

Expand Down
8 changes: 4 additions & 4 deletions templates/courseware/theme-course_about_research.html
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@

<%! from django.utils.translation import ugettext as _ %>
<section class="research-info">
<h2>Our Research Community</h2>
<p>Stanford University pursues the science of learning. Online learners are important participants in that pursuit. The information we gather from your engagement with our instructional offerings makes it possible for faculty, researchers, designers and engineers to continuously improve their work and, in that process, build learning science.</p>
<p>By registering as an online learner, you are also participating in research... <br /><a href="/tos">Read Terms of Service and Privacy Policy.</a></p>
<h2>${_('Our Research Community')}</h2>
<p>${_('Stanford University pursues the science of learning. Online learners are important participants in that pursuit. The information we gather from your engagement with our instructional offerings makes it possible for faculty, researchers, designers and engineers to continuously improve their work and, in that process, build learning science.')}</p>
<p>${_('By registering as an online learner, you are also participating in research...')} <br /><a href="/tos">${_('Read Terms of Service and Privacy Policy.')}</a></p>
</section>
8 changes: 7 additions & 1 deletion templates/courseware/theme-info_research.html
Original file line number Diff line number Diff line change
@@ -1 +1,7 @@
<p>We encourage you to review our <a href="/tos"><strong>Terms of Service</strong></a> and <a href="/tos#privacy"><strong>Privacy Policy</strong></a> before beginning the course.</p>
<%! from django.utils.translation import ugettext as _ %>
<p>${_('We encourage you to review our {tos_link_start}Terms of Service{link_end} and {privacy_link_start}Privacy Policy{link_end} before beginning the course.').format(
tos_link_start='<a href="/tos"><strong>',
privacy_link_start='<a href="/tos#privacy"><strong>',
link_end='</strong></a>'
)}
</p>
67 changes: 46 additions & 21 deletions templates/registration/password_reset_confirm.html
Original file line number Diff line number Diff line change
@@ -1,6 +1,13 @@
{% extends "main_django.html" %}
{% load i18n %}
{% load staticfiles %}
{% block title %}<title>Reset Your {{ PLATFORM_NAME }} Password</title>{% endblock %}
{% block title %}
<title>
{% blocktrans with PLATFORM_NAME=PLATFORM_NAME %}
Reset Your {{ PLATFORM_NAME }} Password
{% endblocktrans %}
</title>
{% endblock %}
{% block main_vendor_js %}{% endblock %}
{% block headextra %}
<!--[if lt IE 9]>
Expand Down Expand Up @@ -38,79 +45,97 @@
<section class="passwordreset container">
<section class="introduction">
<header>
<h1>Reset Your {{ PLATFORM_NAME }} Password</h1>
<h1>
{% blocktrans with PLATFORM_NAME=PLATFORM_NAME %}
Reset Your {{ PLATFORM_NAME }} Password
{% endblocktrans %}
</h1>
</header>
</section>

<section role="main" class="content">
{% if validlink %}
<header>
<h2 class="sr">Password Reset Form</h2>
<h2 class="sr">{% trans "Password Reset Form" %}</h2>
</header>

<form role="form" id="passwordreset-form" method="post" data-remote="true" action="">{% csrf_token %}
<!-- status messages -->
<div role="alert" class="status message">
<h3 class="message-title">We're sorry, {{ PLATFORM_NAME }} enrollment is not available in your region</h3>
<p class="message-copy">Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Lorem ipsum dolor sit amet, consectetuer adipiscing elit.</p>
<h3 class="message-title">
{% blocktrans with PLATFORM_NAME=PLATFORM_NAME %}
We're sorry, {{ PLATFORM_NAME }} enrollment is not available in your region
{% endblocktrans %}
</h3>
</div>

<div role="alert" class="status message submission-error">
<h3 class="message-title">The following errors occured while processing your registration: </h3>
<h3 class="message-title">{% trans "The following errors occured while processing your registration: " %}</h3>
<ul class="message-copy">
<li>You must complete all fields.</li>
<li>The two password fields didn't match.</li>
<li>{% trans "You must complete all fields." %}</li>
<li>{% trans "The two password fields didn't match." %}</li>
</ul>
</div>

<div role="alert" class="status message system-error">
<h3 class="message-title">We're sorry, our systems seem to be having trouble processing your password reset</h3>
<p class="message-copy">Someone has been made aware of this issue. Please try again shortly. Please <a href="{{MKTG_URL_CONTACT}}">contact us</a> about any concerns you have.</p>
<h3 class="message-title">{% trans "We're sorry, our systems seem to be having trouble processing your password reset" %}</h3>
<p class="message-copy">
{% blocktrans with start_link='<a href="{{MKTG_URL_CONTACT}}">' end_link='</a>' %}
Someone has been made aware of this issue. Please try again shortly. Please {{ start_link }}contact us{{ end_link }} about any concerns you have.
{% endblocktrans %}
</p>
</div>

<p class="instructions">
Please enter your new password twice so we can verify you typed it in correctly. <br />
Required fields are noted by <strong class="indicator">bold text and an asterisk (*)</strong>.
{% trans 'Please enter your new password twice so we can verify you typed it in correctly. <br /> Required fields are noted by <strong class="indicator">bold text and an asterisk (*)</strong>.' %}
</p>

<fieldset class="group group-form group-form-requiredinformation">
<legend class="sr">Required Information</legend>
<legend class="sr">{% trans "Required Information" %}</legend>

<ol class="list-input">
<li class="field required password" id="field-new_password1">
<label for="new_password1">Your New Password</label>
<label for="new_password1">{% trans "Your New Password" %}</label>
<input id="new_password1" type="password" name="new_password1" placeholder="*****" />
</li>
<li class="field required password" id="field-new_password2">
<label for="new_password2">Your New Password Again</label>
<label for="new_password2">{% trans "Your New Password Again" %}</label>
<input id="new_password2" type="password" name="new_password2" placeholder="*****" />
</li>
</ol>
</fieldset>

<div class="form-actions">
<button name="submit" type="submit" id="submit" class="action action-primary action-update">Change My Password</button>
<button name="submit" type="submit" id="submit" class="action action-primary action-update">{% trans "Change My Password" %}</button>
</div>
</form>

{% else %}

<header>
<h2 class="sr">Your Password Reset Was Unsuccessful</h2>
<h2 class="sr">{% trans "Your Password Reset Was Unsuccessful" %}</h2>
</header>
<p>The password reset link was invalid, possibly because the link has already been used. Please return to the <a href="/login">login page</a> and start the password reset process again.</p>
<p>
{% blocktrans with start_link='<a href="/login">' end_link='</a>' %}
The password reset link was invalid, possibly because the link has already been used. Please return to the {{ start_link }}login page{{ end_link }} and start the password reset process again.
{% endblocktrans %}
</p>

{% endif %}
</section>

<aside role="complementary">
<header>
<h3 class="sr">Password Reset Help</h3>
<h3 class="sr">{% trans "Password Reset Help" %}</h3>
</header>

<div class="cta cta-help">
<h3>Need Help?</h3>
<p>View our <a href="https://stanfordonline.zendesk.com/hc">help section for contact information and answers to commonly asked questions</a></p>
<h3>{% trans "Need Help?" %}</h3>
<p>
{% blocktrans with start_link='<a href="https://stanfordonline.zendesk.com/hc">' end_link='</a>' %}
View our {{ start_link }}help section for contact information and answers to commonly asked questions{{ end_link }}
{% endblocktrans %}
</p>
</div>
</aside>
</section>
Expand Down
6 changes: 3 additions & 3 deletions templates/registration/password_reset_email.html
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
{% load i18n %}{% load url from future %}{% autoescape off %}
{% blocktrans %}You're receiving this e-mail because you requested a password reset for your user account at Stanford Online.{% endblocktrans %}
{% blocktrans with platform_name='Stanford Online' %}You're receiving this e-mail because you requested a password reset for your user account at {{ platform_name }}.{% endblocktrans %}

{% trans "Please go to the following page and choose a new password:" %}
{% block reset_link %}
https://{{domain}}{% url 'student.views.password_reset_confirm_wrapper' uidb36=uid token=token %}
{% endblock %}

If you didn't request this change, you can disregard this email - we have not yet reset your password.
{% trans "If you didn't request this change, you can disregard this email - we have not yet reset your password." %}

{% trans "Thanks for using our site!" %}

{% blocktrans %}The Stanford Online Team{% endblocktrans %}
{% blocktrans with platform_name='Stanford Online' %}The {{ platform_name }} Team{% endblocktrans %}

{% endautoescape %}
Loading

0 comments on commit d2f0e70

Please sign in to comment.