393 files

This commit is contained in:
Home Assistant Version Control
2026-09-27 17:16:54 +00:00
parent b05b7a897e
commit 39d97ac2db
404 changed files with 54006 additions and 11034 deletions
@@ -300,6 +300,15 @@ export function formatCost(amount: number, symbol?: string, lang?: string, digit
return symbol ? `${num} ${symbol}` : num;
}
/** A quantity with its optional unit ("6 pcs", "1,5 l" under a decimal-comma
* profile) — spare-part stock and quantities everywhere. Four surfaces had
* interpolated the raw number (`${stock} ${unit}`), bypassing the profile
* number format (DRY audit 2026-09-26; tripwired in dry-round4.test.ts). */
export function formatQty(n: number, unit?: string | null, lang?: string): string {
const num = formatNumber(n, lang);
return unit ? `${num} ${unit}` : num;
}
/** BCP-47 locale for the "language" default: the UI language regionalized
* by the server country when Intl knows the combination (#140). Explicit
* profile formats (DMY/MDY/YMD/system) never reach this path. */
@@ -547,6 +556,8 @@ export const refStyles = css`
font-variant-numeric: tabular-nums; letter-spacing: .02em; vertical-align: middle; white-space: nowrap;
user-select: all;
}
/* #189: "· Residual waste, Paper" after a calendar-driven task's name. */
.event-titles { color: var(--secondary-text-color); font-weight: 400; }
`;
export const sharedStyles = css`