UX: make sidebar title static (#25040)

* UX: make sidebar title static

* tests
This commit is contained in:
chapoi 2023-12-26 14:37:32 +02:00 committed by GitHub
parent 3a20718526
commit 32c438387b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 4 additions and 7 deletions

View File

@ -7,9 +7,7 @@ export default createWidget("sidebar-toggle", {
const attrs = this.attrs;
return [
this.attach("button", {
title: attrs.showSidebar
? "sidebar.hide_sidebar"
: "sidebar.show_sidebar",
title: "sidebar.title",
icon: "bars",
action: this.site.narrowDesktopView
? "toggleHamburger"

View File

@ -218,7 +218,7 @@ acceptance(
assert.strictEqual(
query(".btn-sidebar-toggle").title,
I18n.t("sidebar.hide_sidebar"),
I18n.t("sidebar.title"),
"has the right title attribute when sidebar is expanded"
);
@ -233,7 +233,7 @@ acceptance(
assert.strictEqual(
query(".btn-sidebar-toggle").title,
I18n.t("sidebar.show_sidebar"),
I18n.t("sidebar.title"),
"has the right title attribute when sidebar is collapsed"
);
});

View File

@ -4475,8 +4475,7 @@ en:
redirect_after_success: "Second factor authentication is successful. Redirecting to the previous page…"
sidebar:
show_sidebar: "Show sidebar"
hide_sidebar: "Hide sidebar"
title: "Sidebar"
unread_count:
one: "%{count} unread"
other: "%{count} unread"