Use American English spelling throughout
This commit is contained in:
+10
-10
@@ -13,7 +13,7 @@ import { loadLanguage } from "@/lib/i18n";
|
||||
/**
|
||||
* "ihasmail" is a dark theme carrying the palette from ihasmail.org. It is a
|
||||
* theme rather than an accent because it changes the backgrounds, borders and
|
||||
* text as well as the highlight colour — an accent could not.
|
||||
* text as well as the highlight color — an accent could not.
|
||||
*/
|
||||
export type Theme = "system" | "light" | "dark" | "ihasmail";
|
||||
export type Density = "comfortable" | "cozy" | "compact";
|
||||
@@ -83,7 +83,7 @@ export interface Settings {
|
||||
* which is the half that stops an older device showing a theme nobody chose.
|
||||
*/
|
||||
theme: Theme;
|
||||
/** The colours. */
|
||||
/** The colors. */
|
||||
palette: PaletteId;
|
||||
/** Light, dark, or whatever the system says. */
|
||||
mode: Mode;
|
||||
@@ -131,7 +131,7 @@ export interface Settings {
|
||||
/** Let messages follow the app's light/dark theme instead of always sitting on white. */
|
||||
themeMessageBody: boolean;
|
||||
/**
|
||||
* Extend that to mail which brings colours of its own.
|
||||
* Extend that to mail which brings colors of its own.
|
||||
*
|
||||
* Only meaningful with `themeMessageBody` on. Off by default because it
|
||||
* cannot be done perfectly: see `markKeptSurfaces` in lib/html.ts for the
|
||||
@@ -225,8 +225,8 @@ export interface Settings {
|
||||
templates: Template[];
|
||||
labels: Label[];
|
||||
/**
|
||||
* Folder colours, by mailbox id. Local to this browser, like every other
|
||||
* colour here: JMAP has nowhere on a Mailbox to keep one.
|
||||
* Folder colors, by mailbox id. Local to this browser, like every other
|
||||
* color here: JMAP has nowhere on a Mailbox to keep one.
|
||||
*/
|
||||
folderColors: Record<string, string>;
|
||||
sidebarCollapsed: boolean;
|
||||
@@ -265,7 +265,7 @@ export interface Settings {
|
||||
* sidebar with their own CSS keeps what they had until they choose otherwise.
|
||||
*/
|
||||
sidebarWidth: number | null;
|
||||
/** Outlook-style colour categories for calendar events. */
|
||||
/** Outlook-style color categories for calendar events. */
|
||||
eventCategories: Array<{ name: string; color: string }>;
|
||||
/** Default sending identity per account (JMAP has no such flag). */
|
||||
defaultIdentityByAccount: Record<string, string>;
|
||||
@@ -645,7 +645,7 @@ export function applyLang(s: Settings = useSettings.getState().settings): void {
|
||||
const tag = resolveUiLanguage(s.uiLanguage);
|
||||
document.documentElement.lang = tag;
|
||||
/*
|
||||
* The catalogue is fetched, so it lands a beat after the attribute. That
|
||||
* The catalog is fetched, so it lands a beat after the attribute. That
|
||||
* order is deliberate: `lang` is what stops Chrome offering to translate,
|
||||
* and it should not wait on a network request to say something it already
|
||||
* knows. English needs no fetch at all and resolves immediately.
|
||||
@@ -663,7 +663,7 @@ export function applyTheme(s: Settings = useSettings.getState().settings): void
|
||||
/*
|
||||
* Two attributes, because they answer two questions. `data-theme` is the
|
||||
* mode, and every dark-only rule in the stylesheet keys off it without
|
||||
* knowing any palette exists; `data-palette` layers the colours on top. The
|
||||
* knowing any palette exists; `data-palette` layers the colors on top. The
|
||||
* accent variants out-specify both, which is what lets an accent still apply
|
||||
* over any palette.
|
||||
*/
|
||||
@@ -678,7 +678,7 @@ export function applyTheme(s: Settings = useSettings.getState().settings): void
|
||||
}
|
||||
|
||||
/**
|
||||
* The browser chrome colour, read from the palette's own background so it does
|
||||
* The browser chrome color, read from the palette's own background so it does
|
||||
* not have to be listed twice and cannot drift from it.
|
||||
*/
|
||||
function paletteThemeColor(palette: PaletteId, mode: "light" | "dark"): string {
|
||||
@@ -724,7 +724,7 @@ export function useEffectiveTheme(): "light" | "dark" {
|
||||
export const settings = () => useSettings.getState().settings;
|
||||
|
||||
/**
|
||||
* Primitive that changes whenever a date/time preference does, so memoised
|
||||
* Primitive that changes whenever a date/time preference does, so memoized
|
||||
* components that render dates re-render when the format is switched.
|
||||
*/
|
||||
export const dateTimeKey = (s: Settings): string => `${s.locale}|${s.dateFormat}|${s.timeFormat}`;
|
||||
|
||||
Reference in New Issue
Block a user