mirror of
https://github.com/discourse/discourse.git
synced 2025-02-25 18:55:32 -06:00
DEV: Add dedicated translations for links in sidebar
We do not want to depend on existing translations which are used elsewhere and can break the sidebar experience when changed.
This commit is contained in:
@@ -12,10 +12,10 @@ export default class AboutSectionLink extends BaseSectionLink {
|
|||||||
}
|
}
|
||||||
|
|
||||||
get title() {
|
get title() {
|
||||||
return I18n.t("about.simple_title");
|
return I18n.t("sidebar.sections.community.links.about.content");
|
||||||
}
|
}
|
||||||
|
|
||||||
get text() {
|
get text() {
|
||||||
return I18n.t("about.simple_title");
|
return I18n.t("sidebar.sections.community.links.about.content");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -12,10 +12,10 @@ export default class BadgesSectionLink extends BaseSectionLink {
|
|||||||
}
|
}
|
||||||
|
|
||||||
get title() {
|
get title() {
|
||||||
return I18n.t("badges.title");
|
return I18n.t("sidebar.sections.community.links.badges.content");
|
||||||
}
|
}
|
||||||
|
|
||||||
get text() {
|
get text() {
|
||||||
return I18n.t("badges.title");
|
return I18n.t("sidebar.sections.community.links.badges.content");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -16,10 +16,10 @@ export default class FAQSectionLink extends BaseSectionLink {
|
|||||||
}
|
}
|
||||||
|
|
||||||
get title() {
|
get title() {
|
||||||
return I18n.t("faq");
|
return I18n.t("sidebar.sections.community.links.faq.content");
|
||||||
}
|
}
|
||||||
|
|
||||||
get text() {
|
get text() {
|
||||||
return I18n.t("faq");
|
return I18n.t("sidebar.sections.community.links.faq.content");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -12,10 +12,10 @@ export default class AdminSectionLink extends BaseSectionLink {
|
|||||||
}
|
}
|
||||||
|
|
||||||
get title() {
|
get title() {
|
||||||
return I18n.t("admin_title");
|
return I18n.t("sidebar.sections.community.links.admin.content");
|
||||||
}
|
}
|
||||||
|
|
||||||
get text() {
|
get text() {
|
||||||
return I18n.t("admin_title");
|
return I18n.t("sidebar.sections.community.links.admin.content");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -32,13 +32,13 @@ acceptance("Sidebar - Anonymous user - Community Section", function (needs) {
|
|||||||
|
|
||||||
assert.strictEqual(
|
assert.strictEqual(
|
||||||
sectionLinks[2].textContent.trim(),
|
sectionLinks[2].textContent.trim(),
|
||||||
I18n.t("about.simple_title"),
|
I18n.t("sidebar.sections.community.links.about.content"),
|
||||||
"displays the about section link third"
|
"displays the about section link third"
|
||||||
);
|
);
|
||||||
|
|
||||||
assert.strictEqual(
|
assert.strictEqual(
|
||||||
sectionLinks[3].textContent.trim(),
|
sectionLinks[3].textContent.trim(),
|
||||||
I18n.t("faq"),
|
I18n.t("sidebar.sections.community.links.faq.content"),
|
||||||
"displays the FAQ section link last"
|
"displays the FAQ section link last"
|
||||||
);
|
);
|
||||||
});
|
});
|
||||||
@@ -62,7 +62,7 @@ acceptance("Sidebar - Anonymous user - Community Section", function (needs) {
|
|||||||
|
|
||||||
assert.strictEqual(
|
assert.strictEqual(
|
||||||
sectionLinks[1].textContent.trim(),
|
sectionLinks[1].textContent.trim(),
|
||||||
I18n.t("badges.title"),
|
I18n.t("sidebar.sections.community.links.badges.content"),
|
||||||
"displays the badges section link second"
|
"displays the badges section link second"
|
||||||
);
|
);
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -4120,9 +4120,17 @@ en:
|
|||||||
header_link_text: "Community"
|
header_link_text: "Community"
|
||||||
header_action_title: "create a new topic"
|
header_action_title: "create a new topic"
|
||||||
links:
|
links:
|
||||||
|
about:
|
||||||
|
content: "About"
|
||||||
|
admin:
|
||||||
|
content: "Admin"
|
||||||
|
badges:
|
||||||
|
content: "Badges"
|
||||||
everything:
|
everything:
|
||||||
content: "Everything"
|
content: "Everything"
|
||||||
title: "All topics"
|
title: "All topics"
|
||||||
|
faq:
|
||||||
|
content: "FAQ"
|
||||||
tracked:
|
tracked:
|
||||||
content: "Tracked"
|
content: "Tracked"
|
||||||
title: "All tracked topics"
|
title: "All tracked topics"
|
||||||
|
|||||||
Reference in New Issue
Block a user