mirror of
https://github.com/discourse/discourse.git
synced 2025-01-18 16:52:45 +08: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:
parent
eb12daa7f8
commit
7f198bd975
|
@ -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"
|
||||
);
|
||||
});
|
||||
|
|
|
@ -4120,9 +4120,17 @@ en:
|
|||
header_link_text: "Community"
|
||||
header_action_title: "create a new topic"
|
||||
links:
|
||||
about:
|
||||
content: "About"
|
||||
admin:
|
||||
content: "Admin"
|
||||
badges:
|
||||
content: "Badges"
|
||||
everything:
|
||||
content: "Everything"
|
||||
title: "All topics"
|
||||
faq:
|
||||
content: "FAQ"
|
||||
tracked:
|
||||
content: "Tracked"
|
||||
title: "All tracked topics"
|
||||
|
|
Loading…
Reference in New Issue
Block a user