-
Notifications
You must be signed in to change notification settings - Fork 4.3k
i18n (forums) #1793
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
i18n (forums) #1793
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -25,7 +25,7 @@ if Backbone? | |
| @delegateEvents() | ||
| if window.user.voted(@model) | ||
| @$(".vote-btn").addClass("is-cast") | ||
| @$(".vote-btn span.sr").html("votes (click to remove your vote)") | ||
| @$(".vote-btn span.sr").html(gettext("votes (click to remove your vote)")) | ||
| @renderAttrs() | ||
| @renderFlagged() | ||
| @$el.find(".posted-details").timeago() | ||
|
|
@@ -41,7 +41,7 @@ if Backbone? | |
| markAsStaff: -> | ||
| if DiscussionUtil.isStaff(@model.get("user_id")) | ||
| @$el.addClass("staff") | ||
| @$el.prepend('<div class="staff-banner">staff</div>') | ||
| @$el.prepend('<div class="staff-banner">' + gettext('staff') + '</div>') | ||
| else if DiscussionUtil.isTA(@model.get("user_id")) | ||
| @$el.addClass("community-ta") | ||
| @$el.prepend('<div class="community-ta-banner">Community TA</div>') | ||
|
|
@@ -51,10 +51,10 @@ if Backbone? | |
| @$(".vote-btn").toggleClass("is-cast") | ||
| if @$(".vote-btn").hasClass("is-cast") | ||
| @vote() | ||
| @$(".vote-btn span.sr").html("votes (click to remove your vote)") | ||
| @$(".vote-btn span.sr").html(gettext("votes (click to remove your vote)")) | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Ditto |
||
| else | ||
| @unvote() | ||
| @$(".vote-btn span.sr").html("votes (click to vote)") | ||
| @$(".vote-btn span.sr").html(gettext("votes (click to vote)")) | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Ditto |
||
|
|
||
| vote: -> | ||
| url = @model.urlFor("upvote") | ||
|
|
@@ -107,12 +107,12 @@ if Backbone? | |
| @$("[data-role=thread-flag]").addClass("flagged") | ||
| @$("[data-role=thread-flag]").removeClass("notflagged") | ||
| @$(".discussion-flag-abuse").attr("aria-pressed", "true") | ||
| @$(".discussion-flag-abuse .flag-label").html("Misuse Reported") | ||
| @$(".discussion-flag-abuse .flag-label").html(gettext("Misuse Reported")) | ||
| else | ||
| @$("[data-role=thread-flag]").removeClass("flagged") | ||
| @$("[data-role=thread-flag]").addClass("notflagged") | ||
| @$(".discussion-flag-abuse").attr("aria-pressed", "false") | ||
| @$(".discussion-flag-abuse .flag-label").html("Report Misuse") | ||
| @$(".discussion-flag-abuse .flag-label").html(gettext("Report Misuse")) | ||
|
|
||
| updateModelDetails: => | ||
| @renderFlagged() | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -31,8 +31,8 @@ <h4>${_("Post a response:")}</h4> | |
| <div class="group-visibility-label">${"<%- obj.group_string%>"}</div> | ||
| ${"<% } %>"} | ||
|
|
||
| <a href="#" class="vote-btn discussion-vote discussion-vote-up" data-role="discussion-vote" data-tooltip="vote"> | ||
| <span class="plus-icon">+</span> <span class='votes-count-number'>${'<%- votes["up_count"] %>'}<span class="sr">votes (click to vote)</span></span></a> | ||
| <a href="#" class="vote-btn discussion-vote discussion-vote-up" data-role="discussion-vote" data-tooltip="${_('vote')}"> | ||
| <span class="plus-icon">+</span> <span class='votes-count-number'>${'<%- votes["up_count"] %>'}<span class="sr">${_("votes (click to vote)")}</span></span></a> | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Ditto |
||
| <h1>${'<%- title %>'}</h1> | ||
| <p class="posted-details"> | ||
| ${"<% if (obj.username) { %>"} | ||
|
|
@@ -44,7 +44,7 @@ <h1>${'<%- title %>'}</h1> | |
| ${_("• This thread is closed.")} | ||
| </span> | ||
| </p> | ||
| <a href="javascript:void(0)" class="dogear action-follow" data-tooltip="follow" role="checkbox" aria-checked="false"> | ||
| <a href="javascript:void(0)" class="dogear action-follow" data-tooltip="${_('follow')}" role="checkbox" aria-checked="false"> | ||
| <span class="sr">${_("Follow this post")}</span> | ||
| </a> | ||
| </header> | ||
|
|
@@ -55,20 +55,20 @@ <h1>${'<%- title %>'}</h1> | |
|
|
||
|
|
||
| % if course and has_permission(user, 'openclose_thread', course.id): | ||
| <div class="admin-pin discussion-pin notpinned" data-role="thread-pin" data-tooltip="pin this thread"> | ||
| <div class="admin-pin discussion-pin notpinned" data-role="thread-pin" data-tooltip="${_('pin this thread')}"> | ||
| <i class="icon icon-pushpin"></i><span class="pin-label">${_("Pin Thread")}</span></div> | ||
|
|
||
| %else: | ||
| ${"<% if (pinned) { %>"} | ||
| <div class="discussion-pin notpinned" data-role="thread-pin" data-tooltip="pin this thread"> | ||
| <div class="discussion-pin notpinned" data-role="thread-pin" data-tooltip="${_('pin this thread')}"> | ||
| <i class="icon icon-pushpin"></i><span class="pin-label">${_("Pin Thread")}</span></div> | ||
| ${"<% } %>"} | ||
| % endif | ||
|
|
||
|
|
||
| ${'<% if (obj.courseware_url) { %>'} | ||
| <div class="post-context"> | ||
| (this post is about <a href="${'<%- courseware_url%>'}">${'<%- courseware_title %>'}</a>) | ||
| (${_("this post is about ")}<a href="${'<%- courseware_url%>'}">${'<%- courseware_title %>'}</a>) | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Placeholder should be in the translation string |
||
| </div> | ||
| ${'<% } %>'} | ||
|
|
||
|
|
@@ -86,7 +86,7 @@ <h1>${_("Editing post")}</h1> | |
| <ul class="edit-post-form-errors"></ul> | ||
| <div class="form-row"> | ||
| <label class="sr" for="edit-post-title">${_("Edit post title")}</label> | ||
| <input type="text" id="edit-post-title" class="edit-post-title" name="title" value="${"<%-title %>"}" placeholder="Title"> | ||
| <input type="text" id="edit-post-title" class="edit-post-title" name="title" value="${'<%-title %>'}" placeholder='${_("Title")}'> | ||
| </div> | ||
| <div class="form-row"> | ||
| <div class="edit-post-body" name="body">${"<%- body %>"}</div> | ||
|
|
@@ -97,7 +97,7 @@ <h1>${_("Editing post")}</h1> | |
| ## <label class="sr" for="edit-post-tags">${_("Edit post tags")}</label> | ||
| ## <input type="text" id="edit-post-tags" class="edit-post-tags" name="tags" placeholder="Tags" value="${"<%- tags %>"}"> | ||
| ##</div> | ||
| <input type="submit" id="edit-post-submit" class="post-update" value="${_("Update post")}"> | ||
| <input type="submit" id="edit-post-submit" class="post-update" value="${_('Update post')}"> | ||
| <a href="#" class="post-cancel">${_("Cancel")}</a> | ||
| </div> | ||
| </script> | ||
|
|
@@ -111,7 +111,7 @@ <h1>${_("Editing post")}</h1> | |
| <ul class="discussion-errors"></ul> | ||
| <label class="sr" for="add-new-comment">${_("Add a comment")}</label> | ||
| <div class="comment-body" id="add-new-comment" data-id="${'<%- wmdId %>'}" | ||
| data-placeholder="Add a comment..."></div> | ||
| data-placeholder="${_('Add a comment...')}"></div> | ||
| <div class="comment-post-control"> | ||
| <a class="discussion-submit-comment control-button" href="#">${_("Submit")}</a> | ||
| </div> | ||
|
|
@@ -123,11 +123,11 @@ <h1>${_("Editing post")}</h1> | |
|
|
||
| <script type="text/template" id="thread-response-show-template"> | ||
| <header class="response-local"> | ||
| <a href="javascript:void(0)" class="vote-btn" data-tooltip="vote"><span class="plus-icon"></span><span class="votes-count-number">${"<%- votes['up_count'] %>"}<span class="sr">votes (click to vote)</span></span></a> | ||
| <a href="javascript:void(0)" class="endorse-btn${'<% if (endorsed) { %> is-endorsed<% } %>'} action-endorse" style="cursor: default; display: none;" data-tooltip="endorse"><span class="check-icon" style="pointer-events: none; "></span></a> | ||
| <a href="javascript:void(0)" class="vote-btn" data-tooltip="${_('vote')}"><span class="plus-icon"></span><span class="votes-count-number">${"<%- votes['up_count'] %>"}<span class="sr">${_("votes (click to vote)")}</span></span></a> | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Ditto |
||
| <a href="javascript:void(0)" class="endorse-btn${'<% if (endorsed) { %> is-endorsed<% } %>'} action-endorse" style="cursor: default; display: none;" data-tooltip="${_('endorse')}"><span class="check-icon" style="pointer-events: none; "></span></a> | ||
| ${"<% if (obj.username) { %>"} | ||
| <a href="${'<%- user_url %>'}" class="posted-by">${'<%- username %>'}</a> | ||
| ${"<% } else {print('<span class=\"anonymous\"><em>anonymous</em></span>');} %>"} | ||
| ${"<% } else {print('<span class=\"anonymous\"><em>' + _('anonymous') + '</em></span>');} %>"} | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Use .format here
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This is an Underscore template -- it's Javascript, not Python. :) |
||
| <p class="posted-details" title="${'<%- created_at %>'}">${'<%- created_at %>'}</p> | ||
| </header> | ||
| <div class="response-local"><div class="response-body">${"<%- body %>"}</div> | ||
|
|
@@ -148,7 +148,7 @@ <h1>${_("Editing response")}</h1> | |
| <div class="form-row"> | ||
| <div class="edit-post-body" name="body">${"<%- body %>"}</div> | ||
| </div> | ||
| <input type="submit" id="edit-response-submit"class="post-update" value="${_("Update response")}"> | ||
| <input type="submit" id="edit-response-submit" class="post-update" value="${_('Update response')}"> | ||
| <a href="#" class="post-cancel">${_("Cancel")}</a> | ||
| </div> | ||
| </script> | ||
|
|
@@ -180,7 +180,7 @@ <h1>${_("Editing response")}</h1> | |
| <script type="text/template" id="discussion-home"> | ||
| <div class="discussion-article blank-slate"> | ||
| <section class="home-header"> | ||
| <span class="label">DISCUSSION HOME:</span> | ||
| <span class="label">${_("DISCUSSION HOME")}:</span> | ||
| % if course and course.display_name_with_default: | ||
| <h1 class="home-title">${course.display_name_with_default}</h1> | ||
| </section> | ||
|
|
@@ -189,42 +189,42 @@ <h1 class="home-title">${course.display_name_with_default}</h1> | |
| <span class="label label-settings">HOW TO USE EDX DISCUSSIONS</span> | ||
| <table class="home-helpgrid"> | ||
| <tr class="helpgrid-row helpgrid-row-navigation"> | ||
| <td class="row-title">Find discussions</td> | ||
| <td class="row-title">${_("Find discussions")}</td> | ||
| <td class="row-item"> | ||
| <i class="icon icon-reorder"></i> | ||
| <span class="row-description">Focus in on specific topics</span> | ||
| <span class="row-description">${_("Focus in on specific topics")}</span> | ||
| </td> | ||
| <td class="row-item"> | ||
| <i class="icon icon-search"></i> | ||
| <span class="row-description">Search for specific posts </span> | ||
| <span class="row-description">${_("Search for specific posts")}</span> | ||
| </td> | ||
| <td class="row-item"> | ||
| <i class="icon icon-sort"></i> | ||
| <span class="row-description">Sort by date, vote, or comments </span> | ||
| <span class="row-description">${("Sort by date, vote, or comments")}</span> | ||
| </td> | ||
| </tr> | ||
| <tr class="helpgrid-row helpgrid-row-participation"> | ||
| <td class="row-title">Engage with posts</td> | ||
| <td class="row-title">${_("Engage with posts")}</td> | ||
| <td class="row-item"> | ||
| <i class="icon icon-plus"></i> | ||
| <span class="row-description">Upvote posts and good responses</span> | ||
| <span class="row-description">${_("Upvote posts and good responses")}</span> | ||
| </td> | ||
| <td class="row-item"> | ||
| <i class="icon icon-flag"></i> | ||
| <span class="row-description">Report Forum Misuse</span> | ||
| <span class="row-description">${_("Report Forum Misuse")}</span> | ||
| </td> | ||
| <td class="row-item"> | ||
| <i class="icon icon-star"></i> | ||
| <span class="row-description">Follow posts for updates</span> | ||
| <span class="row-description">${_("Follow posts for updates")}</span> | ||
| </td> | ||
| </tr> | ||
| <tr class="helpgrid-row helpgrid-row-notification"> | ||
| <td class="row-title">Receive updates</td> | ||
| <td class="row-title">${_("Receive updates")}</td> | ||
| <td class="row-item-full" colspan="3"> | ||
| <label class="sr" for="email-setting-checkbox">${_("Toggle Notifications Setting")}</label> | ||
| <input type="checkbox" id="email-setting-checkbox" class="email-setting" name="email-notification"/> | ||
| <i class="icon icon-envelope"></i> | ||
| <span class="row-description"> If enabled, you will receive an email digest once a day notifying you about new, unread activity from posts you are following. </span> | ||
| <span class="row-description">${_("If enabled, you will receive an email digest once a day notifying you about new, unread activity from posts you are following.")}</span> | ||
| </td> | ||
| </tr> | ||
| </table> | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This needs to be refactored so the placeholder for the number of votes is included in the translation string