-
Notifications
You must be signed in to change notification settings - Fork 4.3k
added some i18n #1785
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
added some i18n #1785
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 |
|---|---|---|
|
|
@@ -24,7 +24,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)")) | ||
|
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 (and similar ones below) should really include the placeholder for the number of vote in the translation string
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. Can you suggest a way to do that? I don't know how this code works, and it sounds like changing it to include the number of votes in this string will require more understanding. |
||
| @renderAttrs() | ||
| @renderFlagged() | ||
| @$el.find(".posted-details").timeago() | ||
|
|
@@ -40,7 +40,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>') | ||
|
|
@@ -50,10 +50,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)")) | ||
| else | ||
| @unvote() | ||
| @$(".vote-btn span.sr").html("votes (click to vote)") | ||
| @$(".vote-btn span.sr").html(gettext("votes (click to vote)")) | ||
|
|
||
| vote: -> | ||
| url = @model.urlFor("upvote") | ||
|
|
@@ -106,12 +106,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() | ||
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 context to be properly translatable
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.
Do you have a suggestion for how to provide that context?
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.
I didn't see anything to that effect in the django docs. :-(