fix(i18n): dynamic sidebar translations and UI font normalization (#2683)

* fix(i18n): make sidebar menu labels translate dynamically on language change

* fix: sync package-lock.json with missing hono dependency

* style: normalize small font sizes to 0.875rem across UI components
This commit is contained in:
ACX
2026-02-10 09:27:00 -07:00
committed by GitHub
parent d133a8767e
commit 53403c168d
21 changed files with 56 additions and 45 deletions
@@ -479,13 +479,13 @@
height: 26px;
.directory-icon {
font-size: 0.8125rem;
font-size: 0.875rem;
}
}
.directory-info {
.directory-name {
font-size: 0.8125rem;
font-size: 0.875rem;
}
.directory-path {
@@ -340,7 +340,7 @@
width: 100%;
padding: 0.75rem 1rem;
font-family: 'SF Mono', 'Monaco', 'Inconsolata', 'Roboto Mono', monospace;
font-size: 0.8125rem;
font-size: 0.875rem;
resize: vertical;
line-height: 1.5;
}
@@ -66,7 +66,7 @@
}
.warning-message {
font-size: 0.75rem;
font-size: 0.875rem;
color: #fcd34d;
line-height: 1.5;
margin: 0;
@@ -40,7 +40,7 @@
&-xs {
padding: 0.21875rem 0.46875rem;
font-size: 0.8125rem;
font-size: 0.875rem;
line-height: 1.125rem;
gap: 0.34375rem;
}
@@ -3,7 +3,7 @@ import {AppMenuitemComponent} from './app.menuitem.component';
import {AsyncPipe} from '@angular/common';
import {MenuModule} from 'primeng/menu';
import {LibraryService} from '../../../../features/book/service/library.service';
import {Observable, of} from 'rxjs';
import {combineLatest, Observable, of} from 'rxjs';
import {filter, map} from 'rxjs/operators';
import {ShelfService} from '../../../../features/book/service/shelf.service';
import {BookService} from '../../../../features/book/service/book.service';
@@ -73,8 +73,8 @@ export class AppMenuComponent implements OnInit {
this.initMenus();
});
this.homeMenu$ = this.bookService.bookState$.pipe(
map((bookState) => [
this.homeMenu$ = combineLatest([this.bookService.bookState$, this.t.langChanges$]).pipe(
map(([bookState]) => [
{
label: this.t.translate('layout.menu.home'),
items: [
@@ -97,8 +97,8 @@ export class AppMenuComponent implements OnInit {
}
private initMenus(): void {
this.libraryMenu$ = this.libraryService.libraryState$.pipe(
map((state) => {
this.libraryMenu$ = combineLatest([this.libraryService.libraryState$, this.t.langChanges$]).pipe(
map(([state]) => {
const libraries = state.libraries ?? [];
const sortedLibraries = this.sortArray(libraries, this.librarySortField, this.librarySortOrder);
return [
@@ -121,8 +121,8 @@ export class AppMenuComponent implements OnInit {
})
);
this.magicShelfMenu$ = this.magicShelfService.shelvesState$.pipe(
map((state: MagicShelfState) => {
this.magicShelfMenu$ = combineLatest([this.magicShelfService.shelvesState$, this.t.langChanges$]).pipe(
map(([state]: [MagicShelfState, string]) => {
const shelves = state.shelves ?? [];
const sortedShelves = this.sortArray(shelves, this.magicShelfSortField, this.magicShelfSortOrder);
return [
@@ -145,8 +145,8 @@ export class AppMenuComponent implements OnInit {
})
);
this.shelfMenu$ = this.shelfService.shelfState$.pipe(
map((state) => {
this.shelfMenu$ = combineLatest([this.shelfService.shelfState$, this.t.langChanges$]).pipe(
map(([state]) => {
const shelves = state.shelves ?? [];
const sortedShelves = this.sortArray(shelves, this.shelfSortField, this.shelfSortOrder);
@@ -16,7 +16,7 @@ $settings-section-description-size: 0.875rem;
$settings-label-size: 0.9375rem;
$settings-label-weight: 500;
$settings-description-size: 0.8125rem;
$settings-description-size: 0.875rem;
// ============================================================================
// SPACING VARIABLES