Commit 2157b4d8 by Ned Batchelder

Miscellaneous fixes to strings found during i18n work.

parent 5dccff51
<%! from django.utils.translation import ugettext as _ %> <%! from django.utils.translation import ugettext as _ %>
<h1>Check your email</h1> <h1>Check your email</h1>
<p>${_("An activation link has been sent to {emaiL}, along with instructions for activating your account.").format(email=email)}</p> <p>${_("An activation link has been sent to {email}, along with instructions for activating your account.").format(email=email)}</p>
...@@ -217,14 +217,14 @@ def get_processor_decline_html(params): ...@@ -217,14 +217,14 @@ def get_processor_decline_html(params):
"""Have to parse through the error codes to return a helpful message""" """Have to parse through the error codes to return a helpful message"""
payment_support_email = settings.PAYMENT_SUPPORT_EMAIL payment_support_email = settings.PAYMENT_SUPPORT_EMAIL
msg = _(dedent( msg = dedent(_(
""" """
<p class="error_msg"> <p class="error_msg">
Sorry! Our payment processor did not accept your payment. Sorry! Our payment processor did not accept your payment.
The decision in they returned was <span class="decision">{decision}</span>, The decision they returned was <span class="decision">{decision}</span>,
and the reason was <span class="reason">{reason_code}:{reason_msg}</span>. and the reason was <span class="reason">{reason_code}:{reason_msg}</span>.
You were not charged. Please try a different form of payment. You were not charged. Please try a different form of payment.
Contact us with payment-specific questions at {email}. Contact us with payment-related questions at {email}.
</p> </p>
""")) """))
...@@ -240,7 +240,7 @@ def get_processor_exception_html(exception): ...@@ -240,7 +240,7 @@ def get_processor_exception_html(exception):
payment_support_email = settings.PAYMENT_SUPPORT_EMAIL payment_support_email = settings.PAYMENT_SUPPORT_EMAIL
if isinstance(exception, CCProcessorDataException): if isinstance(exception, CCProcessorDataException):
msg = _(dedent( msg = dedent(_(
""" """
<p class="error_msg"> <p class="error_msg">
Sorry! Our payment processor sent us back a payment confirmation that had inconsistent data! Sorry! Our payment processor sent us back a payment confirmation that had inconsistent data!
...@@ -251,7 +251,7 @@ def get_processor_exception_html(exception): ...@@ -251,7 +251,7 @@ def get_processor_exception_html(exception):
""".format(msg=exception.message, email=payment_support_email))) """.format(msg=exception.message, email=payment_support_email)))
return msg return msg
elif isinstance(exception, CCProcessorWrongAmountException): elif isinstance(exception, CCProcessorWrongAmountException):
msg = _(dedent( msg = dedent(_(
""" """
<p class="error_msg"> <p class="error_msg">
Sorry! Due to an error your purchase was charged for a different amount than the order total! Sorry! Due to an error your purchase was charged for a different amount than the order total!
...@@ -261,7 +261,7 @@ def get_processor_exception_html(exception): ...@@ -261,7 +261,7 @@ def get_processor_exception_html(exception):
""".format(msg=exception.message, email=payment_support_email))) """.format(msg=exception.message, email=payment_support_email)))
return msg return msg
elif isinstance(exception, CCProcessorSignatureException): elif isinstance(exception, CCProcessorSignatureException):
msg = _(dedent( msg = dedent(_(
""" """
<p class="error_msg"> <p class="error_msg">
Sorry! Our payment processor sent us back a corrupted message regarding your charge, so we are Sorry! Our payment processor sent us back a corrupted message regarding your charge, so we are
...@@ -307,32 +307,32 @@ REASONCODE_MAP.update( ...@@ -307,32 +307,32 @@ REASONCODE_MAP.update(
'100': _('Successful transaction.'), '100': _('Successful transaction.'),
'101': _('The request is missing one or more required fields.'), '101': _('The request is missing one or more required fields.'),
'102': _('One or more fields in the request contains invalid data.'), '102': _('One or more fields in the request contains invalid data.'),
'104': _(dedent( '104': dedent(_(
""" """
The merchantReferenceCode sent with this authorization request matches the The merchantReferenceCode sent with this authorization request matches the
merchantReferenceCode of another authorization request that you sent in the last 15 minutes. merchantReferenceCode of another authorization request that you sent in the last 15 minutes.
Possible fix: retry the payment after 15 minutes. Possible fix: retry the payment after 15 minutes.
""")), """)),
'150': _('Error: General system failure. Possible fix: retry the payment after a few minutes.'), '150': _('Error: General system failure. Possible fix: retry the payment after a few minutes.'),
'151': _(dedent( '151': dedent(_(
""" """
Error: The request was received but there was a server timeout. Error: The request was received but there was a server timeout.
This error does not include timeouts between the client and the server. This error does not include timeouts between the client and the server.
Possible fix: retry the payment after some time. Possible fix: retry the payment after some time.
""")), """)),
'152': _(dedent( '152': dedent(_(
""" """
Error: The request was received, but a service did not finish running in time Error: The request was received, but a service did not finish running in time
Possible fix: retry the payment after some time. Possible fix: retry the payment after some time.
""")), """)),
'201': _('The issuing bank has questions about the request. Possible fix: retry with another form of payment'), '201': _('The issuing bank has questions about the request. Possible fix: retry with another form of payment'),
'202': _(dedent( '202': dedent(_(
""" """
Expired card. You might also receive this if the expiration date you Expired card. You might also receive this if the expiration date you
provided does not match the date the issuing bank has on file. provided does not match the date the issuing bank has on file.
Possible fix: retry with another form of payment Possible fix: retry with another form of payment
""")), """)),
'203': _(dedent( '203': dedent(_(
""" """
General decline of the card. No other information provided by the issuing bank. General decline of the card. No other information provided by the issuing bank.
Possible fix: retry with another form of payment Possible fix: retry with another form of payment
...@@ -341,7 +341,7 @@ REASONCODE_MAP.update( ...@@ -341,7 +341,7 @@ REASONCODE_MAP.update(
# 205 was Stolen or lost card. Might as well not show this message to the person using such a card. # 205 was Stolen or lost card. Might as well not show this message to the person using such a card.
'205': _('Unknown reason'), '205': _('Unknown reason'),
'207': _('Issuing bank unavailable. Possible fix: retry again after a few minutes'), '207': _('Issuing bank unavailable. Possible fix: retry again after a few minutes'),
'208': _(dedent( '208': dedent(_(
""" """
Inactive card or card not authorized for card-not-present transactions. Inactive card or card not authorized for card-not-present transactions.
Possible fix: retry with another form of payment Possible fix: retry with another form of payment
...@@ -352,13 +352,13 @@ REASONCODE_MAP.update( ...@@ -352,13 +352,13 @@ REASONCODE_MAP.update(
# Might as well not show this message to the person using such a card. # Might as well not show this message to the person using such a card.
'221': _('Unknown reason'), '221': _('Unknown reason'),
'231': _('Invalid account number. Possible fix: retry with another form of payment'), '231': _('Invalid account number. Possible fix: retry with another form of payment'),
'232': _(dedent( '232': dedent(_(
""" """
The card type is not accepted by the payment processor. The card type is not accepted by the payment processor.
Possible fix: retry with another form of payment Possible fix: retry with another form of payment
""")), """)),
'233': _('General decline by the processor. Possible fix: retry with another form of payment'), '233': _('General decline by the processor. Possible fix: retry with another form of payment'),
'234': _(dedent( '234': dedent(_(
""" """
There is a problem with our CyberSource merchant configuration. Please let us know at {0} There is a problem with our CyberSource merchant configuration. Please let us know at {0}
""".format(settings.PAYMENT_SUPPORT_EMAIL))), """.format(settings.PAYMENT_SUPPORT_EMAIL))),
...@@ -370,7 +370,7 @@ REASONCODE_MAP.update( ...@@ -370,7 +370,7 @@ REASONCODE_MAP.update(
# reason code 239 only applies if we are processing a capture or credit through the API, # reason code 239 only applies if we are processing a capture or credit through the API,
# so we should never see it # so we should never see it
'239': _('The requested transaction amount must match the previous transaction amount.'), '239': _('The requested transaction amount must match the previous transaction amount.'),
'240': _(dedent( '240': dedent(_(
""" """
The card type sent is invalid or does not correlate with the credit card number. The card type sent is invalid or does not correlate with the credit card number.
Possible fix: retry with the same card or another form of payment Possible fix: retry with the same card or another form of payment
...@@ -382,26 +382,26 @@ REASONCODE_MAP.update( ...@@ -382,26 +382,26 @@ REASONCODE_MAP.update(
# if the previously successful authorization has already been used by another capture request. # if the previously successful authorization has already been used by another capture request.
# This reason code only applies when we are processing a capture through the API # This reason code only applies when we are processing a capture through the API
# so we should never see it # so we should never see it
'242': _(dedent( '242': dedent(_(
""" """
You requested a capture through the API, but there is no corresponding, unused authorization record. You requested a capture through the API, but there is no corresponding, unused authorization record.
""")), """)),
# we should never see 243 # we should never see 243
'243': _('The transaction has already been settled or reversed.'), '243': _('The transaction has already been settled or reversed.'),
# reason code 246 applies only if we are processing a void through the API. so we should never see it # reason code 246 applies only if we are processing a void through the API. so we should never see it
'246': _(dedent( '246': dedent(_(
""" """
The capture or credit is not voidable because the capture or credit information has already been The capture or credit is not voidable because the capture or credit information has already been
submitted to your processor. Or, you requested a void for a type of transaction that cannot be voided. submitted to your processor. Or, you requested a void for a type of transaction that cannot be voided.
""")), """)),
# reason code 247 applies only if we are processing a void through the API. so we should never see it # reason code 247 applies only if we are processing a void through the API. so we should never see it
'247': _('You requested a credit for a capture that was previously voided'), '247': _('You requested a credit for a capture that was previously voided'),
'250': _(dedent( '250': dedent(_(
""" """
Error: The request was received, but there was a timeout at the payment processor. Error: The request was received, but there was a timeout at the payment processor.
Possible fix: retry the payment. Possible fix: retry the payment.
""")), """)),
'520': _(dedent( '520': dedent(_(
""" """
The authorization request was approved by the issuing bank but declined by CyberSource.' The authorization request was approved by the issuing bank but declined by CyberSource.'
Possible fix: retry with a different form of payment. Possible fix: retry with a different form of payment.
......
...@@ -23,8 +23,10 @@ function quickElement() { ...@@ -23,8 +23,10 @@ function quickElement() {
// CalendarNamespace -- Provides a collection of HTML calendar-related helper functions // CalendarNamespace -- Provides a collection of HTML calendar-related helper functions
var CalendarNamespace = { var CalendarNamespace = {
monthsOfYear: gettext('January February March April May June July August September October November December').split(' '), // Translators: the names of months, keep the pipe (|) separators.
daysOfWeek: gettext('S M T W T F S').split(' '), monthsOfYear: gettext('January|February|March|April|May|June|July|August|September|October|November|December').split('|'),
// Translators: abbreviations for days of the week, keep the pipe (|) separators.
daysOfWeek: gettext('S|M|T|W|T|F|S').split('|'),
firstDayOfWeek: parseInt(get_format('FIRST_DAY_OF_WEEK')), firstDayOfWeek: parseInt(get_format('FIRST_DAY_OF_WEEK')),
isLeapYear: function(year) { isLeapYear: function(year) {
return (((year % 4)==0) && ((year % 100)!=0) || ((year % 400)==0)); return (((year % 4)==0) && ((year % 100)!=0) || ((year % 400)==0));
......
...@@ -29,8 +29,10 @@ if (typeof Array.prototype.filter == 'undefined') { ...@@ -29,8 +29,10 @@ if (typeof Array.prototype.filter == 'undefined') {
}; };
} }
var monthNames = gettext("January February March April May June July August September October November December").split(" "); // Translators: the names of months, keep the pipe (|) separators.
var weekdayNames = gettext("Sunday Monday Tuesday Wednesday Thursday Friday Saturday").split(" "); var monthNames = gettext("January|February|March|April|May|June|July|August|September|October|November|December").split("|");
// Translators: the names of days, keep the pipe (|) separators.
var weekdayNames = gettext("Sunday|Monday|Tuesday|Wednesday|Thursday|Friday|Saturday").split("|");
/* Takes a string, returns the index of the month matching that string, throws /* Takes a string, returns the index of the month matching that string, throws
an error if 0 or more than 1 matches an error if 0 or more than 1 matches
......
...@@ -3,5 +3,5 @@ ...@@ -3,5 +3,5 @@
<section class="outside-app"> <section class="outside-app">
<h1>${_("Currently the <em>{platform_name}</em> servers are overloaded").format(platform_name=settings.PLATFORM_NAME)}</h1> <h1>${_("Currently the <em>{platform_name}</em> servers are overloaded").format(platform_name=settings.PLATFORM_NAME)}</h1>
<p>${_("Our staff is currently working to get the site back up as soon as possible. Please email us at <a href=\"mailto:\{tech_support_email}\">{tech_support_email}</a> to report any problems or downtime.").format(tech_support_email=settings.TECH_SUPPORT_EMAIL)}</p> <p>${_("Our staff is currently working to get the site back up as soon as possible. Please email us at <a href=\"mailto:{tech_support_email}\">{tech_support_email}</a> to report any problems or downtime.").format(tech_support_email=settings.TECH_SUPPORT_EMAIL)}</p>
</section> </section>
...@@ -18,7 +18,7 @@ ...@@ -18,7 +18,7 @@
<li class="help-item help-item-technical"> <li class="help-item help-item-technical">
<h3 class="title">${_("Having Technical Trouble?")}</h3> <h3 class="title">${_("Having Technical Trouble?")}</h3>
<div class="copy"> <div class="copy">
<p>${_("Please make sure your browser is updated to the {strong_start}{a_start}most recent version possible{a_end}{strong_end}. Also, please make sure your {strong_start}web cam is plugged in, turned on, and allowed to function in your web browser (commonly adjustable in your browser settings).{strong_end}").format(a_start='<a rel="external" href="http://browsehappy.com/">', a_end="</a>", strong_start="<strong>", strong_end="</strong>")}</p> <p>${_("Please make sure your browser is updated to the <strong>{a_start}most recent version possible{a_end}</strong>. Also, please make sure your <strong>web cam is plugged in, turned on, and allowed to function in your web browser (commonly adjustable in your browser settings)</strong>").format(a_start='<a rel="external" href="http://browsehappy.com/">', a_end="</a>")}</p>
</div> </div>
</li> </li>
......
...@@ -27,7 +27,7 @@ ...@@ -27,7 +27,7 @@
<li class="help-item help-item-technical"> <li class="help-item help-item-technical">
<h3 class="title">${_("Technical Requirements")}</h3> <h3 class="title">${_("Technical Requirements")}</h3>
<div class="copy"> <div class="copy">
<p>${_("Please make sure your browser is updated to the {strong_start}{a_start}most recent version possible{a_end}{strong_end}. Also, please make sure your {strong_start}web cam is plugged in, turned on, and allowed to function in your web browser (commonly adjustable in your browser settings).{strong_end}").format(a_start='<a rel="external" href="http://browsehappy.com/">', a_end="</a>", strong_start="<strong>", strong_end="</strong>")}</p> <p>${_("Please make sure your browser is updated to the <strong>{a_start}most recent version possible{a_end}</strong>. Also, please make sure your <strong>web cam is plugged in, turned on, and allowed to function in your web browser (commonly adjustable in your browser settings).</strong>").format(a_start='<a rel="external" href="http://browsehappy.com/">', a_end="</a>")}</p>
</div> </div>
</li> </li>
</ul> </ul>
......
...@@ -169,7 +169,7 @@ ...@@ -169,7 +169,7 @@
%if upgrade: %if upgrade:
<span class="help help-inline">${_("Missing something? You can always continue to audit this course instead.")}</span> <span class="help help-inline">${_("Missing something? You can always continue to audit this course instead.")}</span>
%else: %else:
<span class="help help-inline">${_("Missing something? You can always {a_start} audit this course instead {a_end}").format(a_start='<a href="/course_modes/choose/' + course_id + '">', a_end="</a>")}</span> <span class="help help-inline">${_("Missing something? You can always {a_start}audit this course instead{a_end}").format(a_start='<a href="/course_modes/choose/' + course_id + '">', a_end="</a>")}</span>
%endif %endif
<ol class="wizard-steps"> <ol class="wizard-steps">
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment