Avoid svg xml in locale strings

This commit is contained in:
Penar Musaraj 2018-11-12 13:26:28 -05:00
parent fa14f1dee6
commit 02db4c1340
3 changed files with 6 additions and 4 deletions

View File

@ -1,3 +1,3 @@
{{#link-to 'userActivity.solved'}} {{#link-to 'userActivity.solved'}}
{{user-stat value=model.solved_count label="solved.solution_summary"}} {{user-stat value=model.solved_count label="solved.solution_summary" icon="check-square"}}
{{/link-to}} {{/link-to}}

View File

@ -6,6 +6,7 @@ import { withPluginApi } from "discourse/lib/plugin-api";
import { ajax } from "discourse/lib/ajax"; import { ajax } from "discourse/lib/ajax";
import PostCooked from "discourse/widgets/post-cooked"; import PostCooked from "discourse/widgets/post-cooked";
import { formatUsername } from "discourse/lib/utilities"; import { formatUsername } from "discourse/lib/utilities";
import { iconHTML } from "discourse-common/lib/icon-library";
function clearAccepted(topic) { function clearAccepted(topic) {
const posts = topic.get("postStream.posts"); const posts = topic.get("postStream.posts");
@ -201,6 +202,7 @@ export default {
} }
return I18n.t("solved.accepted_html", { return I18n.t("solved.accepted_html", {
icon: iconHTML('check-square'),
username_lower: username.toLowerCase(), username_lower: username.toLowerCase(),
username: formatUsername(username), username: formatUsername(username),
post_path: this.get("url") + "/" + postNumber, post_path: this.get("url") + "/" + postNumber,

View File

@ -15,7 +15,7 @@ en:
accepted_answer: "Solution" accepted_answer: "Solution"
solution: "Solution" solution: "Solution"
solution_summary: solution_summary:
one: "solution <svg class='fa d-icon d-icon-check-square svg-icon' aria-hidden='true'><use xlink:href='#check-square'></use></svg>" one: "solution"
other: "solutions <svg class='fa d-icon d-icon-check-square svg-icon' aria-hidden='true'><use xlink:href='#check-square'></use></svg>" other: "solutions"
accepted_html: "<svg class='fa d-icon d-icon-check-square svg-icon' aria-hidden='true'><use xlink:href='#check-square'></use></svg> Solved <span class='by'>by <a href data-user-card='{{username_lower}}'>{{username}}</a></span> in <a href='{{post_path}}' class='back'>post #{{post_number}}</a>" accepted_html: "{{icon}} Solved <span class='by'>by <a href data-user-card='{{username_lower}}'>{{username}}</a></span> in <a href='{{post_path}}' class='back'>post #{{post_number}}</a>"
accepted_notification: "<p><span>{{username}}</span> {{description}}</p>" accepted_notification: "<p><span>{{username}}</span> {{description}}</p>"