Skip to content
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
2 changes: 1 addition & 1 deletion cms/templates/component.html
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,6 @@
<a href="#" class="edit-button standard"><span class="edit-icon"></span>${_("Edit")}</a>
<a href="#" class="delete-button standard"><span class="delete-icon"></span>${_("Delete")}</a>
</div>
<span data-tooltip='${_("Drag to reorder")}' class="drag-handle"></span>
<span data-tooltip="${_("Drag to reorder")}" class="drag-handle"></span>
${preview}

16 changes: 8 additions & 8 deletions cms/templates/import.html
Original file line number Diff line number Diff line change
Expand Up @@ -163,10 +163,10 @@ <h3 class="title-3">${_("Warning: Importing while a course is running")}</h3>
var feedbackUrl = "${import_status_url}";

var defaults = [
'${_("There was an error during the upload process.")}\n',
'${_("There was an error while unpacking the file.")}\n',
'${_("There was an error while verifying the file you submitted.")}\n',
'${_("There was an error while importing the new course to our database.")}\n'
"${_("There was an error during the upload process.")}\n",
"${_("There was an error while unpacking the file.")}\n",
"${_("There was an error while verifying the file you submitted.")}\n",
"${_("There was an error while importing the new course to our database.")}\n"
];

$('#fileupload').fileupload({
Expand Down Expand Up @@ -201,12 +201,12 @@ <h3 class="title-3">${_("Warning: Importing while a course is running")}</h3>
CourseImport.stageError(stage, defaults[stage] + errMsg);
}
else {
alert('${_("Your import has failed.")}\n\n' + errMsg);
alert("${_("Your import has failed.")}\n\n" + errMsg);
}
chooseBtn.html('${_("Choose new file")}').show();
chooseBtn.html("${_("Choose new file")}").show();
bar.hide();
}
chooseBtn.html('${_("Choose new file")}').show();
chooseBtn.html("${_("Choose new file")}").show();
bar.hide();
});
});
Expand Down Expand Up @@ -243,7 +243,7 @@ <h3 class="title-3">${_("Warning: Importing while a course is running")}</h3>
},
start: function(e) {
window.onbeforeunload = function() {
return '${_("Your import is in progress; navigating away will abort it.")}';
return "${_("Your import is in progress; navigating away will abort it.")}";
}
},
sequentialUploads: true,
Expand Down
16 changes: 8 additions & 8 deletions cms/templates/widgets/problem-edit.html
Original file line number Diff line number Diff line change
Expand Up @@ -7,24 +7,24 @@
%if enable_markdown:
<div class="editor-bar">
<ul class="format-buttons">
<li><a href="#" class="header-button" data-tooltip='${_("Heading 1")}'><span
<li><a href="#" class="header-button" data-tooltip="${_("Heading 1")}"><span
class="problem-editor-icon heading1"></span></a></li>
<li><a href="#" class="multiple-choice-button" data-tooltip='${_("Multiple Choice")}'><span
<li><a href="#" class="multiple-choice-button" data-tooltip="${_("Multiple Choice")}"><span
class="problem-editor-icon multiple-choice"></span></a></li>
<li><a href="#" class="checks-button" data-tooltip='${_("Checkboxes")}'><span
<li><a href="#" class="checks-button" data-tooltip="${_("Checkboxes")}"><span
class="problem-editor-icon checks"></span></a></li>
<li><a href="#" class="string-button" data-tooltip='${_("Text Input")}'><span
<li><a href="#" class="string-button" data-tooltip="${_("Text Input")}"><span
class="problem-editor-icon string"></span></a></li>
<li><a href="#" class="number-button" data-tooltip='${_("Numerical Input")}'><span
<li><a href="#" class="number-button" data-tooltip="${_("Numerical Input")}"><span
class="problem-editor-icon number"></span></a></li>
<li><a href="#" class="dropdown-button" data-tooltip='${_("Dropdown")}'><span
<li><a href="#" class="dropdown-button" data-tooltip="${_("Dropdown")}"><span
class="problem-editor-icon dropdown"></span></a></li>
<li><a href="#" class="explanation-button" data-tooltip='${_("Explanation")}'><span
<li><a href="#" class="explanation-button" data-tooltip="${_("Explanation")}"><span
class="problem-editor-icon explanation"></span></a></li>
</ul>
<ul class="editor-tabs">
<li><a href="#" class="xml-tab advanced-toggle" data-tab="xml">${_("Advanced Editor")}</a></li>
<li><a href="#" class="cheatsheet-toggle" data-tooltip='${_("Toggle Cheatsheet")}'>?</a></li>
<li><a href="#" class="cheatsheet-toggle" data-tooltip="${_("Toggle Cheatsheet")}">?</a></li>
</ul>
</div>
<textarea class="markdown-box">${markdown | h}</textarea>
Expand Down
4 changes: 2 additions & 2 deletions cms/templates/widgets/sock.html
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ <h3 class="title">${_("Studio Support")}</h3>

<ul class="list-actions">
<li class="action-item">
<a href="http://files.edx.org/Getting_Started_with_Studio.pdf" class="action action-primary" title='${_("This is a PDF Document")}'>${_("Download Studio Documentation")}</a>
<a href="http://files.edx.org/Getting_Started_with_Studio.pdf" class="action action-primary" title="${_("This is a PDF Document")}">${_("Download Studio Documentation")}</a>
<span class="tip">${_("How to use Studio to build your course")}</span>
</li>
<li class="action-item">
Expand All @@ -46,7 +46,7 @@ <h3 class="title">${_("Contact us about Studio")}</h3>
<ul class="list-actions">
<li class="action-item">

<a href="http://help.edge.edx.org/discussion/new" class="action action-primary show-tender" title='${_("Use our feedback tool, Tender, to share your feedback")}'><i class="icon-comments"></i>${_("Contact Us")}</a>
<a href="http://help.edge.edx.org/discussion/new" class="action action-primary show-tender" title="${_("Use our feedback tool, Tender, to share your feedback")}"><i class="icon-comments"></i>${_("Contact Us")}</a>
</li>
</ul>
</div>
Expand Down
8 changes: 5 additions & 3 deletions i18n/dummy.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,10 +53,12 @@

# The print industry's standard dummy text, in use since the 1500s
# see http://www.lipsum.com/, then fed through a "fancy-text" converter.
# The string should start with a space.
# The string should start with a space, so that it joins nicely with the text
# that precedes it. The Lorem contains an apostrophe since French often does,
# and translated strings get put into single-quoted strings, which then break.
LOREM = " " + " ".join( # join and split just make the string easier here.
u"""
Ⱡσяєм ιρѕυм ∂σłσя ѕιт αмєт, ¢σηѕє¢тєтυя α∂ιριѕι¢ιηg єłιт, ѕє∂ ∂σ єιυѕмσ∂
Ⱡ'σяєм ιρѕυм ∂σłσя ѕιт αмєт, ¢σηѕє¢тєтυя α∂ιριѕι¢ιηg єłιт, ѕє∂ ∂σ єιυѕмσ∂
тємρσя ιη¢ι∂ι∂υηт υт łαвσяє єт ∂σłσяє мαgηα αłιqυα. υт єηιм α∂ мιηιм
νєηιαм, qυιѕ ησѕтяυ∂ єχєя¢ιтαтιση υłłαм¢σ łαвσяιѕ ηιѕι υт αłιqυιρ єχ єα
¢σммσ∂σ ¢σηѕєqυαт. ∂υιѕ αυтє ιяυяє ∂σłσя ιη яєρяєнєη∂єяιт ιη νσłυρтαтє
Expand All @@ -68,7 +70,7 @@

# To simulate more verbose languages (like German), pad the length of a string
# by a multiple of PAD_FACTOR
PAD_FACTOR = 1.3
PAD_FACTOR = 1.33
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is this enough to make sure that at least L' ## makes it into the string? Probably not for the shortest strings eg "Submit"



class Dummy(Converter):
Expand Down
18 changes: 9 additions & 9 deletions i18n/tests/test_dummy.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,13 +34,13 @@ def assertUnicodeEquals(self, str1, str2):

@ddt.data(
(u"hello my name is Bond, James Bond",
u"héllø mý nämé ïs Bønd, Jämés Bønd Ⱡσяєм ι#"),
u"héllø mý nämé ïs Bønd, Jämés Bønd Ⱡ'σяєм ι#"),

(u"don't convert <a href='href'>tag ids</a>",
u"døn't çønvért <a href='href'>täg ïds</a> Ⱡσяєм ιρѕυ#"),
u"døn't çønvért <a href='href'>täg ïds</a> Ⱡ'σяєм ιρѕυ#"),

(u"don't convert %(name)s tags on %(date)s",
u"døn't çønvért %(name)s tägs øn %(date)s Ⱡσяєм ιρѕ#"),
u"døn't çønvért %(name)s tägs øn %(date)s Ⱡ'σяєм ιρѕ#"),
)
def test_dummy(self, data):
"""
Expand All @@ -53,17 +53,17 @@ def test_dummy(self, data):

def test_singular(self):
entry = POEntry()
entry.msgid = 'A lovely day for a cup of tea.'
expected = u'À løvélý däý før ä çüp øf téä. Ⱡσяєм ι#'
entry.msgid = "A lovely day for a cup of tea."
expected = u"À løvélý däý før ä çüp øf téä. Ⱡ'σяєм #"
self.converter.convert_msg(entry)
self.assertUnicodeEquals(entry.msgstr, expected)

def test_plural(self):
entry = POEntry()
entry.msgid = 'A lovely day for a cup of tea.'
entry.msgid_plural = 'A lovely day for some cups of tea.'
expected_s = u'À løvélý däý før ä çüp øf téä. Ⱡσяєм ι#'
expected_p = u'À løvélý däý før sømé çüps øf téä. Ⱡσяєм ιρ#'
entry.msgid = "A lovely day for a cup of tea."
entry.msgid_plural = "A lovely day for some cups of tea."
expected_s = u"À løvélý däý før ä çüp øf téä. Ⱡ'σяєм #"
expected_p = u"À løvélý däý før sømé çüps øf téä. Ⱡ'σяєм ιρ#"
self.converter.convert_msg(entry)
result = entry.msgstr_plural
self.assertUnicodeEquals(result['0'], expected_s)
Expand Down
2 changes: 1 addition & 1 deletion lms/templates/courseware/instructor_dashboard.html
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@ <h2 class="navbar">[ <a href="#" onclick="goto('Grades');" class="${modeflag.get
%if offline_grade_log:
<p>
<span class="copy-warning">Pre-computed grades ${offline_grade_log} available: Use?
<input type='checkbox' name='use_offline_grades' value='${_("yes")}'>
<input type='checkbox' name='use_offline_grades' value="${_("yes")}">
</span>
</p>
%endif
Expand Down
2 changes: 1 addition & 1 deletion lms/templates/courseware/mktg_course_about.html
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
window.top.location.href = "${reverse('register_user')}?course_id=${course.id}&enrollment_action=enroll";
} else {
$('#register_error').html(
(xhr.responseText ? xhr.responseText : '${_("An error occurred. Please try again later.")}')
(xhr.responseText ? xhr.responseText : "${_("An error occurred. Please try again later.")}")
).css("display", "block");
}
});
Expand Down
2 changes: 1 addition & 1 deletion lms/templates/help_modal.html
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
<a href="#help-modal" rel="leanModal" role="button">${_("Help")}</a>
</div>

<section id="help-modal" class="modal" aria-hidden="true" role="dialog" aria-label='${_("{platform_name} Help").format(platform_name=settings.PLATFORM_NAME)}'>
<section id="help-modal" class="modal" aria-hidden="true" role="dialog" aria-label="${_("{platform_name} Help").format(platform_name=settings.PLATFORM_NAME)}">
<div class="inner-wrapper" id="help_wrapper">
## TODO: find a way to refactor this
<button class="close-modal "tabindex="0">&#10005; <span class="sr">${_('Close Modal')}</span></button>
Expand Down