Skip to content

Commit e12e01e

Browse files
committed
test(desktop): simplify locale packaging coverage
1 parent e1d5af1 commit e12e01e

2 files changed

Lines changed: 17 additions & 27 deletions

File tree

‎scripts/build-desktop-artifact.test.ts‎

Lines changed: 16 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -523,31 +523,23 @@ it.layer(NodeServices.layer)("build-desktop-artifact", (it) => {
523523
),
524524
);
525525

526-
it.effect("leaves electronLanguages unset so every Chromium locale pak ships", () =>
526+
it.effect.each([
527+
["mac", "dmg"],
528+
["linux", "AppImage"],
529+
["win", "nsis"],
530+
] as const)("ships every Chromium locale for %s", ([platform, target]) =>
527531
Effect.gen(function* () {
528-
for (const [platform, target] of [
529-
["mac", "dmg"],
530-
["linux", "AppImage"],
531-
["win", "nsis"],
532-
] as const) {
533-
const config = yield* createBuildConfig(
534-
platform,
535-
target,
536-
"0.0.33",
537-
false,
538-
false,
539-
undefined,
540-
undefined,
541-
);
542-
assert.notProperty(config, "electronLanguages");
543-
}
544-
}).pipe(
545-
Effect.provide(
546-
ConfigProvider.layer(
547-
ConfigProvider.fromEnv({ env: { GITHUB_REPOSITORY: "pingdotgg/t3code" } }),
548-
),
549-
),
550-
),
532+
const config = yield* createBuildConfig(
533+
platform,
534+
target,
535+
"0.0.33-pr.23736.1",
536+
false,
537+
false,
538+
undefined,
539+
undefined,
540+
);
541+
assert.notProperty(config, "electronLanguages");
542+
}),
551543
);
552544

553545
// pnpm writes "set this to true or false" placeholders into allowBuilds when a

‎scripts/build-desktop-artifact.ts‎

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2775,9 +2775,7 @@ export const createBuildConfig = Effect.fn("createBuildConfig")(function* (
27752775
appId: DESKTOP_APP_ID,
27762776
productName: resolveDesktopProductName(version),
27772777
artifactName: "T3-Code-${version}-${arch}.${ext}",
2778-
// Leave electronLanguages unset. Chromium takes navigator.language, the
2779-
// default Intl locale and date input formats from the shipped locale paks,
2780-
// so trimming them pins every page in the built-in browser to en-US.
2778+
// Keep every Chromium locale so browser language and date inputs follow the OS language.
27812779
files: [
27822780
...DESKTOP_FILE_EXCLUSIONS,
27832781
...(platform === "mac"

0 commit comments

Comments
 (0)