Skip to content

Commit 8861b51

Browse files
authored
Merge branch 'main' into issue-watch/24191
2 parents c5fb8a9 + 257e407 commit 8861b51

92 files changed

Lines changed: 4302 additions & 451 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

‎apps/desktop/src/app/DesktopAppIdentity.test.ts‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@ const layerElectronApp = (calls: ElectronAppCalls) =>
4242
metadata: Effect.die("unexpected metadata read"),
4343
name: Effect.succeed("T3 Code"),
4444
systemLocale: Effect.succeed("en-US"),
45+
preferredSystemLanguages: Effect.succeed(["en-US"]),
4546
whenReady: Effect.void,
4647
requestSingleInstanceLock: Effect.succeed(true),
4748
quit: Effect.void,

‎apps/desktop/src/app/DesktopLifecycle.test.ts‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@ function layerElectronApp(
3939
metadata: Effect.die("unexpected metadata read"),
4040
name: Effect.succeed("T3 Code"),
4141
systemLocale: Effect.succeed("en-US"),
42+
preferredSystemLanguages: Effect.succeed(["en-US"]),
4243
whenReady: Effect.void,
4344
requestSingleInstanceLock: Effect.succeed(true),
4445
quit,

‎apps/desktop/src/electron/ElectronApp.ts‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,7 @@ export class ElectronApp extends Context.Service<
4646
readonly name: Effect.Effect<string>;
4747
/** Packaged builds ship only en-US; app.getLocale() and Intl defaults do not reflect the OS locale. */
4848
readonly systemLocale: Effect.Effect<string>;
49+
readonly preferredSystemLanguages: Effect.Effect<ReadonlyArray<string>>;
4950
readonly whenReady: Effect.Effect<void, ElectronAppWhenReadyError>;
5051
readonly requestSingleInstanceLock: Effect.Effect<boolean>;
5152
readonly quit: Effect.Effect<void>;
@@ -155,6 +156,7 @@ export const make = ElectronApp.of({
155156
}
156157
return toSystemLocaleTag(identifier, hourCycle);
157158
}),
159+
preferredSystemLanguages: Effect.sync(() => Electron.app.getPreferredSystemLanguages()),
158160
whenReady: Effect.gen(function* () {
159161
const isPackaged = Electron.app.isPackaged;
160162
yield* Effect.tryPromise({

‎apps/desktop/src/ipc/DesktopIpcHandlers.ts‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@ import {
3838
getLocalEnvironmentBearerToken,
3939
installRelayTelemetryEnabled,
4040
getSystemLocale,
41+
getPreferredSystemLanguages,
4142
getWindowFullscreenState,
4243
openExternal,
4344
readMedia,
@@ -94,6 +95,7 @@ export const installDesktopIpcHandlers = Effect.fn("desktop.ipc.installHandlers"
9495
yield* ipc.handleSync(getAppBranding);
9596
yield* installRelayTelemetryEnabled();
9697
yield* ipc.handleSync(getSystemLocale);
98+
yield* ipc.handleSync(getPreferredSystemLanguages);
9799
yield* ipc.handleSync(getWindowFullscreenState);
98100
yield* ipc.handleSync(getLocalEnvironmentBootstraps);
99101
yield* ipc.handleSync(getLocalEnvironmentEnabled);

‎apps/desktop/src/ipc/channels.ts‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@ export const CLI_COMMAND_UNINSTALL_CHANNEL = "desktop:cli-command-uninstall";
3434
export const GET_APP_BRANDING_CHANNEL = "desktop:get-app-branding";
3535
export const GET_RELAY_TELEMETRY_ENABLED_CHANNEL = "desktop:get-relay-telemetry-enabled";
3636
export const GET_SYSTEM_LOCALE_CHANNEL = "desktop:get-system-locale";
37+
export const GET_PREFERRED_SYSTEM_LANGUAGES_CHANNEL = "desktop:get-preferred-system-languages";
3738
export const GET_LOCAL_ENVIRONMENT_BOOTSTRAPS_CHANNEL = "desktop:get-local-environment-bootstraps";
3839
export const GET_LOCAL_ENVIRONMENT_ENABLED_CHANNEL = "desktop:get-local-environment-enabled";
3940
export const SET_LOCAL_ENVIRONMENT_ENABLED_CHANNEL = "desktop:set-local-environment-enabled";

‎apps/desktop/src/ipc/methods/window.ts‎

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -106,6 +106,15 @@ export const getSystemLocale = DesktopIpc.makeSyncIpcMethod({
106106
}),
107107
});
108108

109+
export const getPreferredSystemLanguages = DesktopIpc.makeSyncIpcMethod({
110+
channel: IpcChannels.GET_PREFERRED_SYSTEM_LANGUAGES_CHANNEL,
111+
result: Schema.Array(Schema.String),
112+
handler: Effect.fn("desktop.ipc.window.getPreferredSystemLanguages")(function* () {
113+
const electronApp = yield* ElectronApp.ElectronApp;
114+
return yield* electronApp.preferredSystemLanguages;
115+
}),
116+
});
117+
109118
export const getWindowFullscreenState = DesktopIpc.makeSyncIpcMethod({
110119
channel: IpcChannels.GET_WINDOW_FULLSCREEN_STATE_CHANNEL,
111120
result: Schema.Boolean,

‎apps/desktop/src/preload.ts‎

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -107,6 +107,12 @@ contextBridge.exposeInMainWorld("desktopBridge", {
107107
const result = ipcRenderer.sendSync(IpcChannels.GET_SYSTEM_LOCALE_CHANNEL);
108108
return typeof result === "string" ? result : null;
109109
},
110+
getPreferredSystemLanguages: () => {
111+
const result: unknown = ipcRenderer.sendSync(
112+
IpcChannels.GET_PREFERRED_SYSTEM_LANGUAGES_CHANNEL,
113+
);
114+
return Array.isArray(result) ? result.filter((tag) => typeof tag === "string") : [];
115+
},
110116
getLocalEnvironmentBootstraps: () => {
111117
const result = ipcRenderer.sendSync(IpcChannels.GET_LOCAL_ENVIRONMENT_BOOTSTRAPS_CHANNEL);
112118
if (!Array.isArray(result)) {

‎apps/desktop/src/telemetry/DesktopTelemetryPublisher.test.ts‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@ function layerElectronApp(
3737
metadata: Effect.die("unexpected metadata read"),
3838
name: Effect.succeed("T3 Code"),
3939
systemLocale: Effect.succeed("en-US"),
40+
preferredSystemLanguages: Effect.succeed(["en-US"]),
4041
whenReady: Effect.void,
4142
requestSingleInstanceLock: Effect.succeed(true),
4243
quit: Effect.void,

‎apps/desktop/src/window/DesktopApplicationMenu.test.ts‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ const layerElectronApp = Layer.succeed(ElectronApp.ElectronApp, {
3131
metadata: Effect.die("unexpected metadata read"),
3232
name: Effect.succeed("T3 Code"),
3333
systemLocale: Effect.succeed("en-US"),
34+
preferredSystemLanguages: Effect.succeed(["en-US"]),
3435
whenReady: Effect.void,
3536
requestSingleInstanceLock: Effect.succeed(true),
3637
quit: Effect.void,

‎apps/marketing/src/pages/index.astro‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1191,6 +1191,10 @@ const mobileEndorsementRows = [
11911191
.cta-title {
11921192
font-size: clamp(40px, 6vw, 72px);
11931193
}
1194+
.open-head h2,
1195+
.cta-title {
1196+
text-wrap: balance;
1197+
}
11941198
.cta-sub {
11951199
color: var(--fg-muted);
11961200
font-size: 18px;

0 commit comments

Comments
 (0)