mirror of
https://github.com/discourse/discourse.git
synced 2026-08-10 04:58:31 -05:00
DEV: Fix "overridden" typos in sidebar code (#34382)
neither prop name seems to be used outside core, so no other code has to be updated
This commit is contained in:
@@ -11,11 +11,11 @@ export default class BaseCommunitySectionLink {
|
||||
@service siteSettings;
|
||||
@service topicTrackingState;
|
||||
|
||||
constructor(owner, { inMoreDrawer, overridenName, overridenIcon } = {}) {
|
||||
constructor(owner, { inMoreDrawer, overriddenName, overriddenIcon } = {}) {
|
||||
setOwner(this, owner);
|
||||
this.inMoreDrawer = inMoreDrawer;
|
||||
this.overridenName = overridenName;
|
||||
this.overridenIcon = overridenIcon;
|
||||
this.overriddenName = overriddenName;
|
||||
this.overriddenIcon = overriddenIcon;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -111,7 +111,7 @@ export default class BaseCommunitySectionLink {
|
||||
* @returns {string} The name of the fontawesome icon to be displayed before the link.
|
||||
*/
|
||||
get prefixValue() {
|
||||
return this.overridenIcon || this.defaultPrefixValue;
|
||||
return this.overriddenIcon || this.defaultPrefixValue;
|
||||
}
|
||||
|
||||
_notImplemented() {
|
||||
|
||||
+2
-2
@@ -16,8 +16,8 @@ export default class AboutSectionLink extends BaseSectionLink {
|
||||
|
||||
get text() {
|
||||
return i18n(
|
||||
`sidebar.sections.community.links.${this.overridenName.toLowerCase()}.content`,
|
||||
{ defaultValue: this.overridenName }
|
||||
`sidebar.sections.community.links.${this.overriddenName.toLowerCase()}.content`,
|
||||
{ defaultValue: this.overriddenName }
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
+2
-2
@@ -16,8 +16,8 @@ export default class BadgesSectionLink extends BaseSectionLink {
|
||||
|
||||
get text() {
|
||||
return i18n(
|
||||
`sidebar.sections.community.links.${this.overridenName.toLowerCase()}.content`,
|
||||
{ defaultValue: this.overridenName }
|
||||
`sidebar.sections.community.links.${this.overriddenName.toLowerCase()}.content`,
|
||||
{ defaultValue: this.overriddenName }
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
+2
-2
@@ -45,8 +45,8 @@ export default class EverythingSectionLink extends BaseSectionLink {
|
||||
|
||||
get text() {
|
||||
return i18n(
|
||||
`sidebar.sections.community.links.${this.overridenName.toLowerCase()}.content`,
|
||||
{ defaultValue: this.overridenName }
|
||||
`sidebar.sections.community.links.${this.overriddenName.toLowerCase()}.content`,
|
||||
{ defaultValue: this.overriddenName }
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
+1
-1
@@ -29,7 +29,7 @@ export default class FAQSectionLink extends BaseSectionLink {
|
||||
}
|
||||
|
||||
get text() {
|
||||
const name = this.renameToGuidelines ? "Guidelines" : this.overridenName;
|
||||
const name = this.renameToGuidelines ? "Guidelines" : this.overriddenName;
|
||||
|
||||
return i18n(
|
||||
`sidebar.sections.community.links.${name.toLowerCase()}.content`,
|
||||
|
||||
+2
-2
@@ -16,8 +16,8 @@ export default class FilterSectionLink extends BaseSectionLink {
|
||||
|
||||
get text() {
|
||||
return i18n(
|
||||
`sidebar.sections.community.links.${this.overridenName.toLowerCase()}.content`,
|
||||
{ defaultValue: this.overridenName }
|
||||
`sidebar.sections.community.links.${this.overriddenName.toLowerCase()}.content`,
|
||||
{ defaultValue: this.overriddenName }
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
+2
-2
@@ -16,8 +16,8 @@ export default class GroupsSectionLink extends BaseSectionLink {
|
||||
|
||||
get text() {
|
||||
return i18n(
|
||||
`sidebar.sections.community.links.${this.overridenName.toLowerCase()}.content`,
|
||||
{ defaultValue: this.overridenName }
|
||||
`sidebar.sections.community.links.${this.overriddenName.toLowerCase()}.content`,
|
||||
{ defaultValue: this.overriddenName }
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
+4
-4
@@ -128,16 +128,16 @@ export default class CommunitySection {
|
||||
#initializeSectionLink(
|
||||
sectionLinkClass,
|
||||
inMoreDrawer,
|
||||
overridenName,
|
||||
overridenIcon
|
||||
overriddenName,
|
||||
overriddenIcon
|
||||
) {
|
||||
if (this.router.isDestroying) {
|
||||
return;
|
||||
}
|
||||
return new sectionLinkClass(getOwner(this), {
|
||||
inMoreDrawer,
|
||||
overridenName,
|
||||
overridenIcon,
|
||||
overriddenName,
|
||||
overriddenIcon,
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
+2
-2
@@ -16,8 +16,8 @@ export default class UsersSectionLink extends BaseSectionLink {
|
||||
|
||||
get text() {
|
||||
return i18n(
|
||||
`sidebar.sections.community.links.${this.overridenName.toLowerCase()}.content`,
|
||||
{ defaultValue: this.overridenName }
|
||||
`sidebar.sections.community.links.${this.overriddenName.toLowerCase()}.content`,
|
||||
{ defaultValue: this.overriddenName }
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
+2
-2
@@ -16,8 +16,8 @@ export default class AdminSectionLink extends BaseSectionLink {
|
||||
|
||||
get text() {
|
||||
return i18n(
|
||||
`sidebar.sections.community.links.${this.overridenName.toLowerCase()}.content`,
|
||||
{ defaultValue: this.overridenName }
|
||||
`sidebar.sections.community.links.${this.overriddenName.toLowerCase()}.content`,
|
||||
{ defaultValue: this.overriddenName }
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
+2
-2
@@ -16,8 +16,8 @@ export default class InviteSectionLink extends BaseSectionLink {
|
||||
|
||||
get text() {
|
||||
return i18n(
|
||||
`sidebar.sections.community.links.${this.overridenName.toLowerCase()}.content`,
|
||||
{ defaultValue: this.overridenName }
|
||||
`sidebar.sections.community.links.${this.overriddenName.toLowerCase()}.content`,
|
||||
{ defaultValue: this.overriddenName }
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
+2
-2
@@ -23,10 +23,10 @@ export default class MyMessagesSectionLink extends BaseSectionLink {
|
||||
|
||||
get text() {
|
||||
return i18n(
|
||||
`sidebar.sections.community.links.${this.overridenName
|
||||
`sidebar.sections.community.links.${this.overriddenName
|
||||
.toLowerCase()
|
||||
.replace(" ", "_")}.content`,
|
||||
{ defaultValue: this.overridenName }
|
||||
{ defaultValue: this.overriddenName }
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
+2
-2
@@ -72,10 +72,10 @@ export default class MyPostsSectionLink extends BaseSectionLink {
|
||||
return i18n("sidebar.sections.community.links.my_posts.content_drafts");
|
||||
} else {
|
||||
return i18n(
|
||||
`sidebar.sections.community.links.${this.overridenName
|
||||
`sidebar.sections.community.links.${this.overriddenName
|
||||
.toLowerCase()
|
||||
.replace(" ", "_")}.content`,
|
||||
{ defaultValue: this.overridenName }
|
||||
{ defaultValue: this.overriddenName }
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
+2
-2
@@ -20,8 +20,8 @@ export default class ReviewSectionLink extends BaseSectionLink {
|
||||
|
||||
get text() {
|
||||
return i18n(
|
||||
`sidebar.sections.community.links.${this.overridenName.toLowerCase()}.content`,
|
||||
{ defaultValue: this.overridenName }
|
||||
`sidebar.sections.community.links.${this.overriddenName.toLowerCase()}.content`,
|
||||
{ defaultValue: this.overriddenName }
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user