Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/components/VoiceDownload.astro
Original file line number Diff line number Diff line change
Expand Up @@ -242,7 +242,7 @@ const allCls =
</summary>
<div class={panelCls}>
{entries.map((e) => (
<VoiceDownloadRow group={e.group} row={e.row} ui={ui} context="menu" hidden={isDefaultPrimary(e)} />
<VoiceDownloadRow group={e.group} row={e.row} context="menu" hidden={isDefaultPrimary(e)} />
))}

{/* The last line, and the only one that isn't a download: every
Expand Down
2 changes: 1 addition & 1 deletion src/components/VoiceDownloadAll.astro
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ const groups = buildGroups(
</h3>
<div class="flex flex-col gap-1">
{group.rows.map((row) => (
<VoiceDownloadRow group={group} row={row} ui={ui} context="grid" />
<VoiceDownloadRow group={group} row={row} context="grid" />
))}
</div>
{/* Only Windows has a note, and it is about the two direct .exe rows
Expand Down
24 changes: 3 additions & 21 deletions src/components/VoiceDownloadRow.astro
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
// of component imports.
import { Apple, Package, AppWindow } from '@lucide/astro';
import StoreBadge from './StoreBadge.astro';
import type { UIStrings } from '../lib/i18n';
import { resolveLocale } from '../lib/i18n';
import { badgeStoreFor } from '../lib/badges';
import type { DownloadGroup, DownloadRow, PlatformGroupKey } from '../lib/voice-download-groups';
Expand All @@ -19,7 +18,6 @@ import { rowAvailable } from '../lib/voice-download-groups';
interface Props {
group: DownloadGroup;
row: DownloadRow;
ui: UIStrings;
/**
* `menu` rows carry `data-dl-alt*`, which the promotion script uses to
* hide whichever row the button is already offering. Grid rows carry
Expand All @@ -30,7 +28,7 @@ interface Props {
/** Menu only: whether this row starts hidden because it is the SSR primary. */
hidden?: boolean;
}
const { group, row, ui, context, hidden = false } = Astro.props;
const { group, row, context, hidden = false } = Astro.props;

// The icon earns its place in the menu, where rows from all three systems
// sit in one list and it is what tells them apart at a glance. In the grid
Expand Down Expand Up @@ -85,17 +83,6 @@ const avail = rowAvailable(row);

const rowCls =
'w-full cursor-pointer items-center gap-2.5 rounded border-0 bg-transparent px-3 py-2 text-left transition-colors hover:bg-gray-100 dark:hover:bg-white/5';

// `shrink-0 whitespace-nowrap` — the label beside it wraps in several
// languages, and a two-line pill looks broken.
// Inline rather than a flex sibling of the label. As a sibling it was laid
// out beside the whole label, so a label that wrapped to two lines pushed
// the pill out to the row's right edge with a gap in between; inline, it
// simply follows the last word wherever that lands. `align-middle` because
// its font is smaller than the label's, and `whitespace-nowrap` so the pill
// itself is never the thing that breaks.
const tagCls =
'ml-1.5 inline-block rounded-full bg-gray-100 px-1.5 py-0.5 align-middle text-[10px] font-semibold whitespace-nowrap uppercase tracking-wide text-gray-500 dark:bg-white/10 dark:text-gray-400';
---

{/* Each row is WRAPPED so promoting a platform toggles the wrapper while
Expand All @@ -122,7 +109,7 @@ const tagCls =
<StoreBadge store={badgeStore} locale={badgeLocale} alt={row.label} class="mb-1" />
) : (
<span class="text-sm font-bold text-gray-900 dark:text-white">
{row.label}{group.windows && <span class={tagCls}>{ui.dlEarly}</span>}
{row.label}
</span>
)}
{/* The size is ours to state only for a file we publish. A store row
Expand All @@ -144,12 +131,7 @@ const tagCls =
context === 'menu' && 'sm:whitespace-nowrap',
]}
>
{row.arch}{row.dl && <span class="whitespace-nowrap"> · <span data-dl-size={row.key}>{row.dl.size}</span></span>}{/*
The Early tag rides the label on a normal row, but a badge row has
no label — the artwork is fixed and may not be annotated. So on
those rows it moves down here, which keeps the claim on the page
for the Microsoft Store row instead of quietly dropping it. */}
{badgeStore && group.windows && <span class={tagCls}>{ui.dlEarly}</span>}
{row.arch}{row.dl && <span class="whitespace-nowrap"> · <span data-dl-size={row.key}>{row.dl.size}</span></span>}
</span>
</span>
</Tag>
Expand Down
4 changes: 0 additions & 4 deletions src/lib/i18n.ts
Original file line number Diff line number Diff line change
Expand Up @@ -246,8 +246,6 @@ export interface UIStrings {
dlArchMsStore: string;
dlArchWindowsX64: string;
dlArchWindowsArm64: string;
/** Tag on the Windows choices: shipped, but younger than the others. */
dlEarly: string;
/**
* Caveat on the two direct .exe rows — NOT on Windows as a whole. The
* Microsoft Store package is signed, so the sentence has to say which
Expand Down Expand Up @@ -342,7 +340,6 @@ const strings: Record<string, UIStrings> = {
dlArchMsStore: 'Windows 10 & 11, Intel, AMD & ARM',
dlArchWindowsX64: 'Windows 10 & 11, Intel & AMD (x64)',
dlArchWindowsArm64: 'Windows 11, Snapdragon (ARM64)',
dlEarly: 'Early',
dlWindowsUnsigned:
"The direct Windows downloads aren't code-signed, so Windows warns on first launch. The Microsoft Store version is signed.",
dlWindowsUnsignedLink: 'How to get past it',
Expand Down Expand Up @@ -397,7 +394,6 @@ const strings: Record<string, UIStrings> = {
dlArchMsStore: 'Windows 10 与 11,Intel、AMD 与 ARM',
dlArchWindowsX64: 'Windows 10 与 11,Intel 与 AMD(x64)',
dlArchWindowsArm64: 'Windows 11,骁龙(ARM64)',
dlEarly: '早期版本',
dlWindowsUnsigned:
'直接下载的 Windows 版尚未进行代码签名,首次启动时系统会弹出提醒;Microsoft Store 版本已签名。',
dlWindowsUnsignedLink: '如何继续安装',
Expand Down
1 change: 0 additions & 1 deletion src/lib/ui/de.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@ export const ui: UIStrings = {
dlArchMsStore: 'Windows 10 & 11, Intel, AMD & ARM',
dlArchWindowsX64: 'Windows 10 & 11, Intel & AMD (x64)',
dlArchWindowsArm64: 'Windows 11, Snapdragon (ARM64)',
dlEarly: 'Früh',
dlWindowsUnsigned:
'Die direkten Windows-Downloads sind nicht signiert, deshalb warnt Windows beim ersten Start. Die Version aus dem Microsoft Store ist signiert.',
dlWindowsUnsignedLink: 'So kommen Sie daran vorbei',
Expand Down
1 change: 0 additions & 1 deletion src/lib/ui/es.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@ export const ui: UIStrings = {
dlArchMsStore: 'Windows 10 y 11, Intel, AMD y ARM',
dlArchWindowsX64: 'Windows 10 y 11, Intel y AMD (x64)',
dlArchWindowsArm64: 'Windows 11, Snapdragon (ARM64)',
dlEarly: 'Inicial',
dlWindowsUnsigned:
'Las descargas directas para Windows no están firmadas, así que Windows avisa al abrirlas por primera vez. La versión de Microsoft Store sí está firmada.',
dlWindowsUnsignedLink: 'Cómo continuar',
Expand Down
1 change: 0 additions & 1 deletion src/lib/ui/fr.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@ export const ui: UIStrings = {
dlArchMsStore: 'Windows 10 et 11, Intel, AMD et ARM',
dlArchWindowsX64: 'Windows 10 et 11, Intel et AMD (x64)',
dlArchWindowsArm64: 'Windows 11, Snapdragon (ARM64)',
dlEarly: 'Débuts',
dlWindowsUnsigned:
"Les téléchargements directs pour Windows ne sont pas signés : Windows affiche un avertissement au premier lancement. La version du Microsoft Store, elle, est signée.",
dlWindowsUnsignedLink: 'Comment passer outre',
Expand Down
1 change: 0 additions & 1 deletion src/lib/ui/it.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@ export const ui: UIStrings = {
dlArchMsStore: 'Windows 10 e 11, Intel, AMD e ARM',
dlArchWindowsX64: 'Windows 10 e 11, Intel e AMD (x64)',
dlArchWindowsArm64: 'Windows 11, Snapdragon (ARM64)',
dlEarly: 'Iniziale',
dlWindowsUnsigned:
'I download diretti per Windows non sono firmati, quindi Windows avvisa al primo avvio. La versione di Microsoft Store è firmata.',
dlWindowsUnsignedLink: 'Come procedere',
Expand Down
1 change: 0 additions & 1 deletion src/lib/ui/ja.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@ export const ui: UIStrings = {
dlArchMsStore: 'Windows 10・11(Intel・AMD・ARM)',
dlArchWindowsX64: 'Windows 10・11(Intel・AMD、x64)',
dlArchWindowsArm64: 'Windows 11(Snapdragon、ARM64)',
dlEarly: '早期版',
dlWindowsUnsigned:
'直接ダウンロードした Windows 版はコード署名されていないため、初回起動時に警告が表示されます。Microsoft Store 版は署名済みです。',
dlWindowsUnsignedLink: '進める方法',
Expand Down
1 change: 0 additions & 1 deletion src/lib/ui/ko.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@ export const ui: UIStrings = {
dlArchMsStore: 'Windows 10 및 11, Intel · AMD · ARM',
dlArchWindowsX64: 'Windows 10 및 11, Intel 및 AMD(x64)',
dlArchWindowsArm64: 'Windows 11, Snapdragon(ARM64)',
dlEarly: '초기 버전',
dlWindowsUnsigned:
'직접 내려받은 Windows 빌드는 코드 서명이 되어 있지 않아 첫 실행 시 경고가 표시됩니다. Microsoft Store 버전은 서명되어 있습니다.',
dlWindowsUnsignedLink: '넘어가는 방법',
Expand Down
1 change: 0 additions & 1 deletion src/lib/ui/zh-hant.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@ export const ui: UIStrings = {
dlArchMsStore: 'Windows 10 與 11,Intel、AMD 與 ARM',
dlArchWindowsX64: 'Windows 10 與 11,Intel 與 AMD(x64)',
dlArchWindowsArm64: 'Windows 11,Snapdragon(ARM64)',
dlEarly: '早期版本',
dlWindowsUnsigned:
'直接下載的 Windows 版尚未進行程式碼簽章,首次啟動時系統會跳出提醒;Microsoft Store 版本已簽章。',
dlWindowsUnsignedLink: '如何繼續安裝',
Expand Down
2 changes: 1 addition & 1 deletion src/lib/voice-download-groups.ts
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ export interface DownloadGroup {
key: PlatformGroupKey;
/** Column heading on the grid. A product name, so it isn't translated. */
title: string;
/** Windows rows carry the Early tag, and only Windows has an unsigned note. */
/** Only Windows carries the unsigned-download note under its column. */
windows: boolean;
rows: DownloadRow[];
}
Expand Down
Loading