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:
Generated
+12
-1
@@ -7239,6 +7239,17 @@
|
|||||||
"node": ">= 0.4"
|
"node": ">= 0.4"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"node_modules/hono": {
|
||||||
|
"version": "4.11.9",
|
||||||
|
"resolved": "https://registry.npmjs.org/hono/-/hono-4.11.9.tgz",
|
||||||
|
"integrity": "sha512-Eaw2YTGM6WOxA6CXbckaEvslr2Ne4NFsKrvc0v97JD5awbmeBLO5w9Ho9L9kmKonrwF9RJlW6BxT1PVv/agBHQ==",
|
||||||
|
"dev": true,
|
||||||
|
"license": "MIT",
|
||||||
|
"peer": true,
|
||||||
|
"engines": {
|
||||||
|
"node": ">=16.9.0"
|
||||||
|
}
|
||||||
|
},
|
||||||
"node_modules/hosted-git-info": {
|
"node_modules/hosted-git-info": {
|
||||||
"version": "9.0.2",
|
"version": "9.0.2",
|
||||||
"resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-9.0.2.tgz",
|
"resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-9.0.2.tgz",
|
||||||
@@ -10528,7 +10539,7 @@
|
|||||||
"version": "5.9.3",
|
"version": "5.9.3",
|
||||||
"resolved": "https://registry.npmjs.org/typescript/-/typescript-5.9.3.tgz",
|
"resolved": "https://registry.npmjs.org/typescript/-/typescript-5.9.3.tgz",
|
||||||
"integrity": "sha512-jl1vZzPDinLr9eUt3J/t7V6FgNEw9QjvBPdysz9KfQDD41fQrC2Y4vKQdiaUpFT4bXlb1RHhLpp8wtm6M5TgSw==",
|
"integrity": "sha512-jl1vZzPDinLr9eUt3J/t7V6FgNEw9QjvBPdysz9KfQDD41fQrC2Y4vKQdiaUpFT4bXlb1RHhLpp8wtm6M5TgSw==",
|
||||||
"dev": true,
|
"devOptional": true,
|
||||||
"license": "Apache-2.0",
|
"license": "Apache-2.0",
|
||||||
"bin": {
|
"bin": {
|
||||||
"tsc": "bin/tsc",
|
"tsc": "bin/tsc",
|
||||||
|
|||||||
+3
-3
@@ -153,7 +153,7 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
.auth-method-status {
|
.auth-method-status {
|
||||||
font-size: 0.8125rem;
|
font-size: 0.875rem;
|
||||||
font-weight: 600;
|
font-weight: 600;
|
||||||
color: var(--p-text-muted-color);
|
color: var(--p-text-muted-color);
|
||||||
|
|
||||||
@@ -213,7 +213,7 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
.field-hint {
|
.field-hint {
|
||||||
font-size: 0.8125rem;
|
font-size: 0.875rem;
|
||||||
color: var(--p-text-muted-color);
|
color: var(--p-text-muted-color);
|
||||||
line-height: 1.4;
|
line-height: 1.4;
|
||||||
}
|
}
|
||||||
@@ -290,7 +290,7 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
.toggle-status {
|
.toggle-status {
|
||||||
font-size: 0.8125rem;
|
font-size: 0.875rem;
|
||||||
font-weight: 600;
|
font-weight: 600;
|
||||||
color: var(--p-text-muted-color);
|
color: var(--p-text-muted-color);
|
||||||
|
|
||||||
|
|||||||
+4
-4
@@ -62,7 +62,7 @@
|
|||||||
|
|
||||||
.book-authors {
|
.book-authors {
|
||||||
color: var(--p-text-muted-color);
|
color: var(--p-text-muted-color);
|
||||||
font-size: 0.8125rem;
|
font-size: 0.875rem;
|
||||||
margin-bottom: 0.375rem;
|
margin-bottom: 0.375rem;
|
||||||
white-space: nowrap;
|
white-space: nowrap;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
@@ -74,11 +74,11 @@
|
|||||||
align-items: center;
|
align-items: center;
|
||||||
gap: 0.5rem;
|
gap: 0.5rem;
|
||||||
color: var(--p-primary-color);
|
color: var(--p-primary-color);
|
||||||
font-size: 0.8125rem;
|
font-size: 0.875rem;
|
||||||
font-weight: 500;
|
font-weight: 500;
|
||||||
|
|
||||||
i {
|
i {
|
||||||
font-size: 0.8125rem;
|
font-size: 0.875rem;
|
||||||
}
|
}
|
||||||
|
|
||||||
span {
|
span {
|
||||||
@@ -106,7 +106,7 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
.suggestion-authors {
|
.suggestion-authors {
|
||||||
font-size: 0.8125rem;
|
font-size: 0.875rem;
|
||||||
color: var(--p-text-muted-color);
|
color: var(--p-text-muted-color);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -474,7 +474,7 @@
|
|||||||
min-width: 90px;
|
min-width: 90px;
|
||||||
|
|
||||||
.format-checkbox-label {
|
.format-checkbox-label {
|
||||||
font-size: 0.8125rem;
|
font-size: 0.875rem;
|
||||||
color: var(--text-color);
|
color: var(--text-color);
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
}
|
}
|
||||||
@@ -550,7 +550,7 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
.chip-label {
|
.chip-label {
|
||||||
font-size: 0.8125rem;
|
font-size: 0.875rem;
|
||||||
font-weight: 500;
|
font-weight: 500;
|
||||||
color: var(--text-color);
|
color: var(--text-color);
|
||||||
}
|
}
|
||||||
|
|||||||
+4
-4
@@ -96,7 +96,7 @@ $provider-colors: (
|
|||||||
|
|
||||||
i {
|
i {
|
||||||
color: var(--primary-color);
|
color: var(--primary-color);
|
||||||
font-size: 0.8125rem;
|
font-size: 0.875rem;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -496,7 +496,7 @@ $provider-colors: (
|
|||||||
background: var(--p-surface-900);
|
background: var(--p-surface-900);
|
||||||
color: var(--primary-color);
|
color: var(--primary-color);
|
||||||
border-radius: 2rem;
|
border-radius: 2rem;
|
||||||
font-size: 0.8125rem;
|
font-size: 0.875rem;
|
||||||
font-weight: 600;
|
font-weight: 600;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -517,7 +517,7 @@ $provider-colors: (
|
|||||||
|
|
||||||
i {
|
i {
|
||||||
color: var(--primary-color);
|
color: var(--primary-color);
|
||||||
font-size: 0.8125rem;
|
font-size: 0.875rem;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -672,7 +672,7 @@ $provider-colors: (
|
|||||||
|
|
||||||
i {
|
i {
|
||||||
color: var(--primary-color);
|
color: var(--primary-color);
|
||||||
font-size: 0.8125rem;
|
font-size: 0.875rem;
|
||||||
flex-shrink: 0;
|
flex-shrink: 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
+1
-1
@@ -198,7 +198,7 @@
|
|||||||
|
|
||||||
p {
|
p {
|
||||||
margin: 0;
|
margin: 0;
|
||||||
font-size: 0.8125rem;
|
font-size: 0.875rem;
|
||||||
line-height: 1.45;
|
line-height: 1.45;
|
||||||
|
|
||||||
strong {
|
strong {
|
||||||
|
|||||||
@@ -156,7 +156,7 @@
|
|||||||
background: color-mix(in srgb, var(--p-primary-color) 5%, transparent);
|
background: color-mix(in srgb, var(--p-primary-color) 5%, transparent);
|
||||||
border: 1px solid color-mix(in srgb, var(--p-primary-color) 20%, transparent);
|
border: 1px solid color-mix(in srgb, var(--p-primary-color) 20%, transparent);
|
||||||
border-radius: 6px;
|
border-radius: 6px;
|
||||||
font-size: 0.8125rem;
|
font-size: 0.875rem;
|
||||||
color: var(--p-text-muted-color);
|
color: var(--p-text-muted-color);
|
||||||
max-width: 500px;
|
max-width: 500px;
|
||||||
|
|
||||||
@@ -299,7 +299,7 @@
|
|||||||
|
|
||||||
.preview-paragraph-small {
|
.preview-paragraph-small {
|
||||||
color: var(--p-text-color);
|
color: var(--p-text-color);
|
||||||
font-size: 0.8125rem;
|
font-size: 0.875rem;
|
||||||
line-height: 1.6;
|
line-height: 1.6;
|
||||||
margin: 0;
|
margin: 0;
|
||||||
text-align: justify;
|
text-align: justify;
|
||||||
@@ -353,7 +353,7 @@
|
|||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
gap: 0.5rem;
|
gap: 0.5rem;
|
||||||
font-size: 0.8125rem;
|
font-size: 0.875rem;
|
||||||
color: var(--p-text-muted-color);
|
color: var(--p-text-muted-color);
|
||||||
font-weight: 500;
|
font-weight: 500;
|
||||||
|
|
||||||
@@ -364,7 +364,7 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
.meta-value {
|
.meta-value {
|
||||||
font-size: 0.8125rem;
|
font-size: 0.875rem;
|
||||||
color: var(--p-text-color);
|
color: var(--p-text-color);
|
||||||
font-weight: 500;
|
font-weight: 500;
|
||||||
text-align: right;
|
text-align: right;
|
||||||
|
|||||||
+1
-1
@@ -227,7 +227,7 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
.file-meta {
|
.file-meta {
|
||||||
font-size: 0.8125rem;
|
font-size: 0.875rem;
|
||||||
color: var(--text-secondary-color);
|
color: var(--text-secondary-color);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
+1
-1
@@ -160,7 +160,7 @@
|
|||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
gap: 0.5rem;
|
gap: 0.5rem;
|
||||||
font-size: 0.75rem;
|
font-size: 0.875rem;
|
||||||
color: var(--p-text-muted-color);
|
color: var(--p-text-muted-color);
|
||||||
margin-top: 0.5rem;
|
margin-top: 0.5rem;
|
||||||
|
|
||||||
|
|||||||
+1
-1
@@ -87,7 +87,7 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
.action-description {
|
.action-description {
|
||||||
font-size: 0.8125rem;
|
font-size: 0.875rem;
|
||||||
color: var(--p-text-muted-color);
|
color: var(--p-text-muted-color);
|
||||||
line-height: 1.4;
|
line-height: 1.4;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -154,7 +154,7 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
.toggle-status {
|
.toggle-status {
|
||||||
font-size: 0.75rem;
|
font-size: 0.875rem;
|
||||||
font-weight: 600;
|
font-weight: 600;
|
||||||
color: var(--p-text-muted-color);
|
color: var(--p-text-muted-color);
|
||||||
|
|
||||||
@@ -356,7 +356,7 @@
|
|||||||
color: var(--p-text-muted-color);
|
color: var(--p-text-muted-color);
|
||||||
|
|
||||||
.pi {
|
.pi {
|
||||||
font-size: 0.75rem;
|
font-size: 0.875rem;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -431,7 +431,7 @@
|
|||||||
align-items: flex-start;
|
align-items: flex-start;
|
||||||
gap: 0.375rem;
|
gap: 0.375rem;
|
||||||
color: var(--p-text-muted-color);
|
color: var(--p-text-muted-color);
|
||||||
font-size: 0.75rem;
|
font-size: 0.875rem;
|
||||||
line-height: 1.4;
|
line-height: 1.4;
|
||||||
margin-top: 0.25rem;
|
margin-top: 0.25rem;
|
||||||
|
|
||||||
|
|||||||
+1
-1
@@ -119,7 +119,7 @@
|
|||||||
color: var(--text-color);
|
color: var(--text-color);
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
transition: all 0.2s ease;
|
transition: all 0.2s ease;
|
||||||
font-size: 0.8125rem;
|
font-size: 0.875rem;
|
||||||
font-weight: 500;
|
font-weight: 500;
|
||||||
min-width: 4.5rem;
|
min-width: 4.5rem;
|
||||||
|
|
||||||
|
|||||||
+2
-2
@@ -293,7 +293,7 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
.option-hint {
|
.option-hint {
|
||||||
font-size: 0.8125rem;
|
font-size: 0.875rem;
|
||||||
color: var(--p-text-muted-color);
|
color: var(--p-text-muted-color);
|
||||||
flex: 1;
|
flex: 1;
|
||||||
|
|
||||||
@@ -350,7 +350,7 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
.cron-empty {
|
.cron-empty {
|
||||||
font-size: 0.8125rem;
|
font-size: 0.875rem;
|
||||||
color: var(--p-text-muted-color);
|
color: var(--p-text-muted-color);
|
||||||
font-style: italic;
|
font-style: italic;
|
||||||
white-space: nowrap;
|
white-space: nowrap;
|
||||||
|
|||||||
+1
-1
@@ -118,7 +118,7 @@
|
|||||||
align-items: center;
|
align-items: center;
|
||||||
gap: 0.375rem;
|
gap: 0.375rem;
|
||||||
color: #ef4444;
|
color: #ef4444;
|
||||||
font-size: 0.8125rem;
|
font-size: 0.875rem;
|
||||||
margin-top: -0.25rem;
|
margin-top: -0.25rem;
|
||||||
|
|
||||||
i {
|
i {
|
||||||
|
|||||||
+1
-1
@@ -134,7 +134,7 @@
|
|||||||
align-items: center;
|
align-items: center;
|
||||||
gap: 0.375rem;
|
gap: 0.375rem;
|
||||||
color: #ef4444;
|
color: #ef4444;
|
||||||
font-size: 0.8125rem;
|
font-size: 0.875rem;
|
||||||
margin-top: -0.25rem;
|
margin-top: -0.25rem;
|
||||||
|
|
||||||
i {
|
i {
|
||||||
|
|||||||
+2
-2
@@ -479,13 +479,13 @@
|
|||||||
height: 26px;
|
height: 26px;
|
||||||
|
|
||||||
.directory-icon {
|
.directory-icon {
|
||||||
font-size: 0.8125rem;
|
font-size: 0.875rem;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.directory-info {
|
.directory-info {
|
||||||
.directory-name {
|
.directory-name {
|
||||||
font-size: 0.8125rem;
|
font-size: 0.875rem;
|
||||||
}
|
}
|
||||||
|
|
||||||
.directory-path {
|
.directory-path {
|
||||||
|
|||||||
@@ -340,7 +340,7 @@
|
|||||||
width: 100%;
|
width: 100%;
|
||||||
padding: 0.75rem 1rem;
|
padding: 0.75rem 1rem;
|
||||||
font-family: 'SF Mono', 'Monaco', 'Inconsolata', 'Roboto Mono', monospace;
|
font-family: 'SF Mono', 'Monaco', 'Inconsolata', 'Roboto Mono', monospace;
|
||||||
font-size: 0.8125rem;
|
font-size: 0.875rem;
|
||||||
resize: vertical;
|
resize: vertical;
|
||||||
line-height: 1.5;
|
line-height: 1.5;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -66,7 +66,7 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
.warning-message {
|
.warning-message {
|
||||||
font-size: 0.75rem;
|
font-size: 0.875rem;
|
||||||
color: #fcd34d;
|
color: #fcd34d;
|
||||||
line-height: 1.5;
|
line-height: 1.5;
|
||||||
margin: 0;
|
margin: 0;
|
||||||
|
|||||||
@@ -40,7 +40,7 @@
|
|||||||
|
|
||||||
&-xs {
|
&-xs {
|
||||||
padding: 0.21875rem 0.46875rem;
|
padding: 0.21875rem 0.46875rem;
|
||||||
font-size: 0.8125rem;
|
font-size: 0.875rem;
|
||||||
line-height: 1.125rem;
|
line-height: 1.125rem;
|
||||||
gap: 0.34375rem;
|
gap: 0.34375rem;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -3,7 +3,7 @@ import {AppMenuitemComponent} from './app.menuitem.component';
|
|||||||
import {AsyncPipe} from '@angular/common';
|
import {AsyncPipe} from '@angular/common';
|
||||||
import {MenuModule} from 'primeng/menu';
|
import {MenuModule} from 'primeng/menu';
|
||||||
import {LibraryService} from '../../../../features/book/service/library.service';
|
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 {filter, map} from 'rxjs/operators';
|
||||||
import {ShelfService} from '../../../../features/book/service/shelf.service';
|
import {ShelfService} from '../../../../features/book/service/shelf.service';
|
||||||
import {BookService} from '../../../../features/book/service/book.service';
|
import {BookService} from '../../../../features/book/service/book.service';
|
||||||
@@ -73,8 +73,8 @@ export class AppMenuComponent implements OnInit {
|
|||||||
this.initMenus();
|
this.initMenus();
|
||||||
});
|
});
|
||||||
|
|
||||||
this.homeMenu$ = this.bookService.bookState$.pipe(
|
this.homeMenu$ = combineLatest([this.bookService.bookState$, this.t.langChanges$]).pipe(
|
||||||
map((bookState) => [
|
map(([bookState]) => [
|
||||||
{
|
{
|
||||||
label: this.t.translate('layout.menu.home'),
|
label: this.t.translate('layout.menu.home'),
|
||||||
items: [
|
items: [
|
||||||
@@ -97,8 +97,8 @@ export class AppMenuComponent implements OnInit {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private initMenus(): void {
|
private initMenus(): void {
|
||||||
this.libraryMenu$ = this.libraryService.libraryState$.pipe(
|
this.libraryMenu$ = combineLatest([this.libraryService.libraryState$, this.t.langChanges$]).pipe(
|
||||||
map((state) => {
|
map(([state]) => {
|
||||||
const libraries = state.libraries ?? [];
|
const libraries = state.libraries ?? [];
|
||||||
const sortedLibraries = this.sortArray(libraries, this.librarySortField, this.librarySortOrder);
|
const sortedLibraries = this.sortArray(libraries, this.librarySortField, this.librarySortOrder);
|
||||||
return [
|
return [
|
||||||
@@ -121,8 +121,8 @@ export class AppMenuComponent implements OnInit {
|
|||||||
})
|
})
|
||||||
);
|
);
|
||||||
|
|
||||||
this.magicShelfMenu$ = this.magicShelfService.shelvesState$.pipe(
|
this.magicShelfMenu$ = combineLatest([this.magicShelfService.shelvesState$, this.t.langChanges$]).pipe(
|
||||||
map((state: MagicShelfState) => {
|
map(([state]: [MagicShelfState, string]) => {
|
||||||
const shelves = state.shelves ?? [];
|
const shelves = state.shelves ?? [];
|
||||||
const sortedShelves = this.sortArray(shelves, this.magicShelfSortField, this.magicShelfSortOrder);
|
const sortedShelves = this.sortArray(shelves, this.magicShelfSortField, this.magicShelfSortOrder);
|
||||||
return [
|
return [
|
||||||
@@ -145,8 +145,8 @@ export class AppMenuComponent implements OnInit {
|
|||||||
})
|
})
|
||||||
);
|
);
|
||||||
|
|
||||||
this.shelfMenu$ = this.shelfService.shelfState$.pipe(
|
this.shelfMenu$ = combineLatest([this.shelfService.shelfState$, this.t.langChanges$]).pipe(
|
||||||
map((state) => {
|
map(([state]) => {
|
||||||
const shelves = state.shelves ?? [];
|
const shelves = state.shelves ?? [];
|
||||||
const sortedShelves = this.sortArray(shelves, this.shelfSortField, this.shelfSortOrder);
|
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-size: 0.9375rem;
|
||||||
$settings-label-weight: 500;
|
$settings-label-weight: 500;
|
||||||
$settings-description-size: 0.8125rem;
|
$settings-description-size: 0.875rem;
|
||||||
|
|
||||||
// ============================================================================
|
// ============================================================================
|
||||||
// SPACING VARIABLES
|
// SPACING VARIABLES
|
||||||
|
|||||||
Reference in New Issue
Block a user