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() {
|
||||
return I18n.t("about.simple_title");
|
||||
return I18n.t("sidebar.sections.community.links.about.content");
|
||||
}
|
||||
|
||||
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() {
|
||||
return I18n.t("badges.title");
|
||||
return I18n.t("sidebar.sections.community.links.badges.content");
|
||||
}
|
||||
|
||||
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() {
|
||||
return I18n.t("faq");
|
||||
return I18n.t("sidebar.sections.community.links.faq.content");
|
||||
}
|
||||
|
||||
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() {
|
||||
return I18n.t("admin_title");
|
||||
return I18n.t("sidebar.sections.community.links.admin.content");
|
||||
}
|
||||
|
||||
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(
|
||||
sectionLinks[2].textContent.trim(),
|
||||
I18n.t("about.simple_title"),
|
||||
I18n.t("sidebar.sections.community.links.about.content"),
|
||||
"displays the about section link third"
|
||||
);
|
||||
|
||||
assert.strictEqual(
|
||||
sectionLinks[3].textContent.trim(),
|
||||
I18n.t("faq"),
|
||||
I18n.t("sidebar.sections.community.links.faq.content"),
|
||||
"displays the FAQ section link last"
|
||||
);
|
||||
});
|
||||
@@ -62,7 +62,7 @@ acceptance("Sidebar - Anonymous user - Community Section", function (needs) {
|
||||
|
||||
assert.strictEqual(
|
||||
sectionLinks[1].textContent.trim(),
|
||||
I18n.t("badges.title"),
|
||||
I18n.t("sidebar.sections.community.links.badges.content"),
|
||||
"displays the badges section link second"
|
||||
);
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user