jamdesk 1.1.185 → 1.1.186
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/__tests__/unit/vendored-sync.test.js +95 -1
- package/dist/__tests__/unit/vendored-sync.test.js.map +1 -1
- package/dist/commands/deploy.d.ts.map +1 -1
- package/dist/commands/deploy.js +4 -0
- package/dist/commands/deploy.js.map +1 -1
- package/package.json +1 -1
- package/vendored/lib/email-templates/build-failure.tsx +1 -0
- package/vendored/lib/isr-build-executor.ts +4 -0
- package/vendored/lib/locale-fallback.ts +98 -0
- package/vendored/lib/regenerate-screenshot-handler.ts +3 -1
- package/vendored/lib/render-doc-page.tsx +117 -7
- package/vendored/lib/seo.ts +40 -5
- package/vendored/lib/ui-strings.ts +268 -23
- package/vendored/themes/base.css +28 -0
- package/vendored/workspace-package-lock.json +3 -3
|
@@ -10,8 +10,9 @@
|
|
|
10
10
|
* When build-service files change, the vendored copies must be updated too,
|
|
11
11
|
* otherwise `jamdesk dev` will have different behavior than production builds.
|
|
12
12
|
*/
|
|
13
|
-
import { describe, it, expect } from 'vitest';
|
|
13
|
+
import { describe, it, expect, beforeAll, afterAll } from 'vitest';
|
|
14
14
|
import fs from 'fs-extra';
|
|
15
|
+
import os from 'os';
|
|
15
16
|
import path from 'path';
|
|
16
17
|
import { fileURLToPath } from 'url';
|
|
17
18
|
const __dirname = path.dirname(fileURLToPath(import.meta.url));
|
|
@@ -176,6 +177,99 @@ const ISR_ONLY_ROUTES = [
|
|
|
176
177
|
'app/robots.txt',
|
|
177
178
|
'app/llms.txt',
|
|
178
179
|
];
|
|
180
|
+
/**
|
|
181
|
+
* `lib/translation/**` is server-only: it reads the build's repo clone off disk,
|
|
182
|
+
* calls OpenAI with the Cloud Run key, and commits through GitHub App creds. The
|
|
183
|
+
* CLI has none of those. `lib` is in vendor.js's `dirs` list, so without an
|
|
184
|
+
* explicit exclusion the whole subtree would ship in the npm tarball AND fall
|
|
185
|
+
* under the comprehensive vendored/lib drift check above — making every edit to
|
|
186
|
+
* a translation file a CI failure in a package that can never build it.
|
|
187
|
+
*/
|
|
188
|
+
describe('CLI vendored exclusions: lib/translation', () => {
|
|
189
|
+
const VENDORED_LIB = path.join(BUILDER_ROOT, 'cli/vendored/lib');
|
|
190
|
+
it('still vendors ordinary lib files (the exclusion is not over-broad)', () => {
|
|
191
|
+
expect(fs.existsSync(path.join(VENDORED_LIB, 'language-utils.ts'))).toBe(true);
|
|
192
|
+
});
|
|
193
|
+
it('vendors nothing under lib/translation/', () => {
|
|
194
|
+
const stray = walkTsFiles(VENDORED_LIB).filter((rel) => rel.startsWith('translation/'));
|
|
195
|
+
expect(stray, `lib/translation/** must never be vendored — run "npm run vendor" and check ` +
|
|
196
|
+
`EXCLUDED_SUBTREES in scripts/vendor.js`).toEqual([]);
|
|
197
|
+
expect(fs.existsSync(path.join(VENDORED_LIB, 'translation'))).toBe(false);
|
|
198
|
+
});
|
|
199
|
+
// lib/'s only entry point into the excluded subtree (it imports
|
|
200
|
+
// ./translation/run.js). Nothing else pins it: the comprehensive drift check
|
|
201
|
+
// walks vendored -> source, so it reads a NEW vendored file as fine, and
|
|
202
|
+
// deps-sync.test.ts ignores relative specifiers. Drop it from EXCLUDED_FILES
|
|
203
|
+
// and the tarball ships a server-only handler with a dangling import, green.
|
|
204
|
+
it('vendors nothing that reaches into lib/translation/', () => {
|
|
205
|
+
expect(fs.existsSync(path.join(VENDORED_LIB, 'translate-handler.ts'))).toBe(false);
|
|
206
|
+
});
|
|
207
|
+
it('excludes by directory prefix, so files added to lib/translation/ later need no vendor.js change', async () => {
|
|
208
|
+
const { shouldExclude, EXCLUDED_SUBTREES } = await import('../../../scripts/vendor.js');
|
|
209
|
+
const libBase = path.join(BUILDER_ROOT, 'build-service/lib');
|
|
210
|
+
// A file that does not exist today: the prefix rule must already cover it.
|
|
211
|
+
expect(shouldExclude(path.join(libBase, 'translation/not-written-yet.ts'), libBase)).toBe(true);
|
|
212
|
+
expect(shouldExclude(path.join(libBase, 'translation/deeply/nested/new.ts'), libBase)).toBe(true);
|
|
213
|
+
expect(shouldExclude(path.join(libBase, 'translation'), libBase)).toBe(true);
|
|
214
|
+
// Neighbours that merely share the prefix string must NOT be swept up.
|
|
215
|
+
expect(shouldExclude(path.join(libBase, 'translation-utils.ts'), libBase)).toBe(false);
|
|
216
|
+
expect(shouldExclude(path.join(libBase, 'language-utils.ts'), libBase)).toBe(false);
|
|
217
|
+
// The exclusion is keyed to `lib`, so a same-named directory under another
|
|
218
|
+
// copied tree (components/, app/, …) keeps vendoring normally.
|
|
219
|
+
const componentsBase = path.join(BUILDER_ROOT, 'build-service/components');
|
|
220
|
+
expect(shouldExclude(path.join(componentsBase, 'translation/Widget.tsx'), componentsBase)).toBe(false);
|
|
221
|
+
// Guard the entry itself: a bare directory name, not a file path — a value
|
|
222
|
+
// like 'translation/run.ts' would silently degrade to a one-file exclusion.
|
|
223
|
+
expect(EXCLUDED_SUBTREES.lib).toContain('translation');
|
|
224
|
+
for (const entry of EXCLUDED_SUBTREES.lib) {
|
|
225
|
+
expect(entry, `${entry} must be a bare directory name`).not.toMatch(/[/.]/);
|
|
226
|
+
}
|
|
227
|
+
});
|
|
228
|
+
});
|
|
229
|
+
/**
|
|
230
|
+
* vendor.js only sweeps when it is the process entry point, so that importing it
|
|
231
|
+
* (the suite above does) does not wipe vendored/. Get that check wrong and
|
|
232
|
+
* `npm run vendor` becomes a silent exit-0 no-op — and the comprehensive drift
|
|
233
|
+
* check above cannot catch it, because it walks vendored -> source and a file
|
|
234
|
+
* MISSING from vendored is invisible to it. A stale tarball then ships green.
|
|
235
|
+
*
|
|
236
|
+
* The trap is that Node symlink-resolves an ES module's own URL but leaves
|
|
237
|
+
* `process.argv[1]` exactly as invoked, so under a symlinked checkout the naive
|
|
238
|
+
* comparisons disagree. Uses a real symlink rather than a mock: the entire bug
|
|
239
|
+
* lives in filesystem behaviour a mock would define away.
|
|
240
|
+
*/
|
|
241
|
+
describe('vendor.js entry-point detection survives a symlinked checkout', () => {
|
|
242
|
+
const tmpRoot = fs.mkdtempSync(path.join(os.tmpdir(), 'jd-vendor-entry-'));
|
|
243
|
+
const realDir = path.join(tmpRoot, 'real');
|
|
244
|
+
const linkDir = path.join(tmpRoot, 'link');
|
|
245
|
+
const realFile = path.join(realDir, 'vendor.js');
|
|
246
|
+
beforeAll(() => {
|
|
247
|
+
fs.ensureDirSync(realDir);
|
|
248
|
+
fs.writeFileSync(realFile, '// stand-in for scripts/vendor.js\n');
|
|
249
|
+
fs.symlinkSync(realDir, linkDir, 'dir');
|
|
250
|
+
});
|
|
251
|
+
afterAll(() => fs.removeSync(tmpRoot));
|
|
252
|
+
it('recognises the entry point when invoked through a symlinked directory', async () => {
|
|
253
|
+
const { isInvokedAsScript } = await import('../../../scripts/vendor.js');
|
|
254
|
+
// What Node actually hands the script: argv[1] keeps the symlink, while the
|
|
255
|
+
// module's own __filename is already realpath-resolved.
|
|
256
|
+
const argvAsInvoked = path.join(linkDir, 'vendor.js');
|
|
257
|
+
const moduleFilename = fs.realpathSync(realFile);
|
|
258
|
+
expect(argvAsInvoked).not.toBe(moduleFilename); // the symlink is real
|
|
259
|
+
expect(isInvokedAsScript(argvAsInvoked, moduleFilename)).toBe(true);
|
|
260
|
+
});
|
|
261
|
+
it('still recognises the ordinary non-symlinked invocation', async () => {
|
|
262
|
+
const { isInvokedAsScript } = await import('../../../scripts/vendor.js');
|
|
263
|
+
const real = fs.realpathSync(realFile);
|
|
264
|
+
expect(isInvokedAsScript(real, real)).toBe(true);
|
|
265
|
+
expect(isInvokedAsScript(path.relative(process.cwd(), real), real)).toBe(true);
|
|
266
|
+
});
|
|
267
|
+
it('is false when merely imported by another entry point', async () => {
|
|
268
|
+
const { isInvokedAsScript } = await import('../../../scripts/vendor.js');
|
|
269
|
+
expect(isInvokedAsScript(undefined, realFile)).toBe(false);
|
|
270
|
+
expect(isInvokedAsScript(path.join(realDir, 'some-other-entry.js'), realFile)).toBe(false);
|
|
271
|
+
});
|
|
272
|
+
});
|
|
179
273
|
describe('CLI vendored exclusions', () => {
|
|
180
274
|
it.each(ISR_ONLY_ROUTES)('should NOT include ISR-only route: %s', async (routePath) => {
|
|
181
275
|
const vendoredDir = path.join(__dirname, '../../../vendored');
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"vendored-sync.test.js","sourceRoot":"","sources":["../../../src/__tests__/unit/vendored-sync.test.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAEH,OAAO,EAAE,QAAQ,EAAE,EAAE,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAC;AAC9C,OAAO,EAAE,MAAM,UAAU,CAAC;AAC1B,OAAO,IAAI,MAAM,MAAM,CAAC;AACxB,OAAO,EAAE,aAAa,EAAE,MAAM,KAAK,CAAC;AAEpC,MAAM,SAAS,GAAG,IAAI,CAAC,OAAO,CAAC,aAAa,CAAC,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC;AAE/D;;;;;;;;;;;;GAYG;AACH,MAAM,YAAY,GAAuB;IACvC,CAAC,6CAA6C,EAAE,4CAA4C,CAAC;IAC7F,CAAC,yCAAyC,EAAE,wCAAwC,CAAC;IACrF,CAAC,gDAAgD,EAAE,+CAA+C,CAAC;IACnG,CAAC,kDAAkD,EAAE,iDAAiD,CAAC;IACvG,+EAA+E;IAC/E,0EAA0E;IAC1E,sEAAsE;IACtE,+EAA+E;IAC/E,+CAA+C;IAC/C,CAAC,+BAA+B,EAAE,8BAA8B,CAAC;IACjE,CAAC,gDAAgD,EAAE,+CAA+C,CAAC;IACnG;QACE,iDAAiD;QACjD,gDAAgD;KACjD;CACF,CAAC;AAEF,QAAQ,CAAC,yBAAyB,EAAE,GAAG,EAAE;IACvC,EAAE,CAAC,IAAI,CAAC,YAAY,CAAC,CACnB,kCAAkC,EAClC,KAAK,EAAE,gBAAgB,EAAE,YAAY,EAAE,EAAE;QACvC,MAAM,WAAW,GAAG,IAAI,CAAC,I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AAQ,CAAC,yBAAyB,EAAE,GAAG,EAAE;IACvC,EAAE,CAAC,IAAI,CAAC,eAAe,CAAC,CACtB,uCAAuC,EACvC,KAAK,EAAE,SAAS,EAAE,EAAE;QAClB,MAAM,WAAW,GAAG,IAAI,CAAC,IAAI,CAAC,SAAS,EAAE,mBAAmB,CAAC,CAAC;QAC9D,MAAM,QAAQ,GAAG,IAAI,CAAC,IAAI,CAAC,WAAW,EAAE,SAAS,CAAC,CAAC;QAEnD,MAAM,MAAM,GAAG,MAAM,EAAE,CAAC,UAAU,CAAC,QAAQ,CAAC,CAAC;QAE7C,IAAI,MAAM,EAAE,CAAC;YACX,MAAM,IAAI,KAAK,CACb,0CAA0C,SAAS,MAAM;gBACvD,iEAAiE;gBACjE,+BAA+B;gBAC/B,wFAAwF,CAC3F,CAAC;QACJ,CAAC;IACH,CAAC,CACF,CAAC;AACJ,CAAC,CAAC,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"deploy.d.ts","sourceRoot":"","sources":["../../src/commands/deploy.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAYH,MAAM,WAAW,aAAa;IAC5B,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,UAAU,CAAC,EAAE,OAAO,CAAC;CACtB;
|
|
1
|
+
{"version":3,"file":"deploy.d.ts","sourceRoot":"","sources":["../../src/commands/deploy.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAYH,MAAM,WAAW,aAAa;IAC5B,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,UAAU,CAAC,EAAE,OAAO,CAAC;CACtB;AAuCD,wBAAsB,MAAM,CAAC,OAAO,GAAE,aAAkB,GAAG,OAAO,CAAC,IAAI,CAAC,CAgJvE"}
|
package/dist/commands/deploy.js
CHANGED
|
@@ -27,6 +27,10 @@ const BUILD_PHASES = [
|
|
|
27
27
|
{ key: 'embeddings', label: 'Indexing AI search + chat' },
|
|
28
28
|
{ key: 'vercel_purge', label: 'Refreshing cache' },
|
|
29
29
|
{ key: 'cleanup', label: 'Cleaning up' },
|
|
30
|
+
// Terminal phase. A CLI deploy has no connected repository, so this always
|
|
31
|
+
// resolves to "nothing to queue" — but the server still reports the phase,
|
|
32
|
+
// and without an entry here the poll loop prints the raw key `translate`.
|
|
33
|
+
{ key: 'translate', label: 'Queueing translations' },
|
|
30
34
|
];
|
|
31
35
|
export async function deploy(options = {}) {
|
|
32
36
|
const config = await loadConfig();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"deploy.js","sourceRoot":"","sources":["../../src/commands/deploy.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,IAAI,MAAM,MAAM,CAAC;AACxB,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAC9C,OAAO,EAAE,UAAU,EAAE,aAAa,EAAE,OAAO,EAAE,MAAM,gBAAgB,CAAC;AACpE,OAAO,EAAE,aAAa,EAAE,eAAe,EAAE,YAAY,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AAClG,OAAO,EAAE,cAAc,EAAmB,MAAM,uBAAuB,CAAC;AACxE,OAAO,EAAE,wBAAwB,EAAE,MAAM,4BAA4B,CAAC;AACtE,OAAO,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAC5C,OAAO,EAAE,MAAM,EAAY,MAAM,kBAAkB,CAAC;AAepD,MAAM,gBAAgB,GAAG,IAAI,CAAC;AAE9B,uDAAuD;AACvD,gDAAgD;AAChD,MAAM,oBAAoB,GAAG,CAAC,2BAA2B,CAAC,CAAC;AAW3D,MAAM,YAAY,GAAoB;IACpC,EAAE,GAAG,EAAE,QAAQ,EAAE,KAAK,EAA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I,QAAQ,CAChB,kDAAkD,EAClD,mBAAmB,EACnB,CAAC,EACD,+DAA+D,CAChE,CAAC;QACJ;YACE,MAAM,IAAI,QAAQ,CAChB,IAAI,CAAC,KAAK,IAAI,aAAa,MAAM,UAAU,MAAM,IAAI,EACrD,WAAW,EACX,CAAC,EACD,IAAI,CAAC,eAAe,IAAI,oEAAoE,CAC7F,CAAC;IACN,CAAC;AACH,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "jamdesk",
|
|
3
|
-
"version": "1.1.
|
|
3
|
+
"version": "1.1.186",
|
|
4
4
|
"description": "CLI for Jamdesk — build, preview, and deploy documentation sites from MDX. Dev server with hot reload, 50+ components, OpenAPI support, AI search, and Mintlify migration",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"jamdesk",
|
|
@@ -104,6 +104,7 @@ function formatPhase(phase?: string): string {
|
|
|
104
104
|
r2_upload: 'CDN Upload',
|
|
105
105
|
embeddings: 'AI Search Indexing',
|
|
106
106
|
vercel_purge: 'Cache Refresh',
|
|
107
|
+
translate: 'Queueing Translations',
|
|
107
108
|
cleanup: 'Cleanup',
|
|
108
109
|
};
|
|
109
110
|
return phaseLabels[phase] || phase;
|
|
@@ -571,6 +571,10 @@ export const ISR_PHASES = {
|
|
|
571
571
|
embeddings: { label: 'Indexing AI search + chat...', weight: 5 },
|
|
572
572
|
vercel_purge: { label: 'Refreshing cache...', weight: 10 },
|
|
573
573
|
cleanup: { label: 'Cleaning up...', weight: 5 },
|
|
574
|
+
// Terminal and non-fatal: enqueues background translation work. Weight 0 —
|
|
575
|
+
// it does no user-visible work, and the dashboard's progress bar must not
|
|
576
|
+
// stall on it.
|
|
577
|
+
translate: { label: 'Queueing translations...', weight: 0 },
|
|
574
578
|
} as const;
|
|
575
579
|
|
|
576
580
|
export type IsrPhase = keyof typeof ISR_PHASES;
|
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* English fallback for untranslated locale pages.
|
|
3
|
+
*
|
|
4
|
+
* The AI translation pipeline writes locale MDX (`es/quickstart.mdx`,
|
|
5
|
+
* `fr/guides/deploy.mdx`, …) into the customer's repo asynchronously, AFTER
|
|
6
|
+
* their English push has already built and published. Between those two
|
|
7
|
+
* moments — minutes normally, much longer on a first backfill — a locale URL
|
|
8
|
+
* already has a navigation entry (nav is emitted for every configured
|
|
9
|
+
* language, not just the finished pages) but no file behind it. Without this
|
|
10
|
+
* module every such URL 404s.
|
|
11
|
+
*
|
|
12
|
+
* Both Next entry points over a docs URL consume these helpers:
|
|
13
|
+
* - `renderDocPage` → serves the English body plus an inline notice
|
|
14
|
+
* - `buildDocMetadata` → canonicalizes to the English page, `noindex, follow`
|
|
15
|
+
* They must agree; see the wiring in `lib/render-doc-page.tsx`.
|
|
16
|
+
*/
|
|
17
|
+
import { resolveLocaleFromPath } from './language-utils';
|
|
18
|
+
|
|
19
|
+
export interface LocaleFallback {
|
|
20
|
+
/** The locale prefix, in the casing the project declared in docs.json. */
|
|
21
|
+
locale: string;
|
|
22
|
+
/** The same page without the locale prefix, e.g. `guides/deploy`. */
|
|
23
|
+
englishPath: string;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
/**
|
|
27
|
+
* Split a declared locale prefix off a page path.
|
|
28
|
+
*
|
|
29
|
+
* `declaredLocales` is the project's **non-default** locales — the default
|
|
30
|
+
* language's pages live at the root, so its prefix is never a content path (see
|
|
31
|
+
* `fallbackLocales` in `render-doc-page.tsx`).
|
|
32
|
+
*
|
|
33
|
+
* Returns null — meaning "not a locale-prefixed page, leave the 404 alone" —
|
|
34
|
+
* for a bare page, a locale root with no page, a directory that merely looks
|
|
35
|
+
* like a language code (`ai/`, `id/`), and any locale not in that list.
|
|
36
|
+
*
|
|
37
|
+
* The canonical-code test is delegated to `resolveLocaleFromPath` (itself gated
|
|
38
|
+
* on the canonical `LANGUAGE_CODES` list) rather than reimplemented here,
|
|
39
|
+
* because `renderDocPage` calls that same helper to pick localized component
|
|
40
|
+
* chrome. Two independent notions of "declared locale prefix" would drift into
|
|
41
|
+
* chrome localizing on a page this fallback does not fire for, or the reverse —
|
|
42
|
+
* a bug class nobody would trace back to here.
|
|
43
|
+
*
|
|
44
|
+
* The locale is matched case-insensitively (`pt-br/a` resolves against a
|
|
45
|
+
* configured `pt-BR`) but returned in the DECLARED casing, so callers can key
|
|
46
|
+
* straight back into `navigation.languages`.
|
|
47
|
+
*/
|
|
48
|
+
export function parseLocalePath(
|
|
49
|
+
path: string,
|
|
50
|
+
declaredLocales: string[],
|
|
51
|
+
): LocaleFallback | null {
|
|
52
|
+
const trimmed = String(path ?? '').replace(/^\/+/, '');
|
|
53
|
+
|
|
54
|
+
// Gate 1 (unchanged, delegated): is this a canonical language code the
|
|
55
|
+
// project declared? Keeps the yes/no answer aligned with the chrome resolver.
|
|
56
|
+
if (!resolveLocaleFromPath(`/${trimmed}`, declaredLocales)) return null;
|
|
57
|
+
|
|
58
|
+
// Gate 2 (authoritative): the segment we DROP must be the segment that
|
|
59
|
+
// MATCHED. `resolveLocaleFromPath` reaches `extractLanguageFromPath`, which
|
|
60
|
+
// strips a leading `/docs/` because it is written for URL pathnames — but
|
|
61
|
+
// this function is given a CONTENT path (a hostAtDocs tenant's `/docs` prefix
|
|
62
|
+
// is already gone, removed upstream by `normalizeSlugForContent`). Mirroring
|
|
63
|
+
// that strip would drop a real path component and serve `/quickstart`'s body
|
|
64
|
+
// at `/docs/es/quickstart`. So re-match the first segment here: that makes
|
|
65
|
+
// this function strictly narrower than the chrome resolver, never wider.
|
|
66
|
+
const segments = trimmed.split('/').filter(Boolean);
|
|
67
|
+
const first = segments[0]?.toLowerCase();
|
|
68
|
+
const declared = declaredLocales.find((l) => l.toLowerCase() === first);
|
|
69
|
+
if (!declared) return null;
|
|
70
|
+
|
|
71
|
+
const englishPath = segments.slice(1).join('/');
|
|
72
|
+
if (!englishPath) return null;
|
|
73
|
+
|
|
74
|
+
return { locale: declared, englishPath };
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
/**
|
|
78
|
+
* SEO for a locale URL that is currently serving the English body.
|
|
79
|
+
*
|
|
80
|
+
* `noindex` keeps the untranslated duplicate out of the index (it is the same
|
|
81
|
+
* text as the English page, under a second URL), while the canonical points at
|
|
82
|
+
* the English original. `follow`, not `nofollow`: the page's links are real, so
|
|
83
|
+
* link equity should still flow through it.
|
|
84
|
+
*
|
|
85
|
+
* @param englishPath - Page path without the locale prefix (`guides/deploy`).
|
|
86
|
+
* @param siteUrl - Base URL for the site, with or without a trailing slash.
|
|
87
|
+
*/
|
|
88
|
+
export function fallbackSeo(
|
|
89
|
+
englishPath: string,
|
|
90
|
+
siteUrl: string,
|
|
91
|
+
): { canonical: string; robots: 'noindex, follow' } {
|
|
92
|
+
const base = siteUrl.replace(/\/+$/, '');
|
|
93
|
+
const clean = englishPath.replace(/^\/+|\/+$/g, '');
|
|
94
|
+
return {
|
|
95
|
+
canonical: clean ? `${base}/${clean}` : base,
|
|
96
|
+
robots: 'noindex, follow',
|
|
97
|
+
};
|
|
98
|
+
}
|
|
@@ -25,7 +25,9 @@ const SLUG_RE = /^[A-Za-z0-9_-]{1,128}$/;
|
|
|
25
25
|
*/
|
|
26
26
|
export async function handleRegenerateScreenshot(req: Request, res: Response): Promise<void> {
|
|
27
27
|
const buildSecret = req.headers['x-build-service-secret'] as string | undefined;
|
|
28
|
-
|
|
28
|
+
// Trimmed: an untrimmed compare can only reject the legitimate caller, since
|
|
29
|
+
// header values carry no surrounding whitespace on the wire. See server.ts.
|
|
30
|
+
const expectedSecret = process.env.BUILD_SERVICE_SECRET?.trim();
|
|
29
31
|
if (!expectedSecret) {
|
|
30
32
|
console.log(JSON.stringify({severity: 'ERROR', message: 'BUILD_SERVICE_SECRET not configured - rejecting /regenerate-screenshot'}));
|
|
31
33
|
res.status(500).json({error: 'Server misconfiguration'});
|
|
@@ -88,6 +88,7 @@ import {
|
|
|
88
88
|
import { classifyOpenApiLoadError } from '@/lib/openapi/classify-load-error';
|
|
89
89
|
import { findOperation, deriveOperationDescription, collectLocalSpecPaths } from '@/lib/openapi/operation-description';
|
|
90
90
|
import { extractLanguageFromPath, isValidLanguageCode, resolveLocaleFromPath } from '@/lib/language-utils';
|
|
91
|
+
import { parseLocalePath } from '@/lib/locale-fallback';
|
|
91
92
|
import { DocsLocaleProvider } from '@/components/mdx/docs-locale-context';
|
|
92
93
|
import { findFirstNavPage } from '@/lib/find-first-nav-page';
|
|
93
94
|
import { candidateSpecPaths } from '@/lib/openapi/lang-spec-path';
|
|
@@ -212,6 +213,64 @@ function findFirstPage(config: DocsConfig, lang?: string): string {
|
|
|
212
213
|
return result ? result.replace(/^\//, '') : 'introduction';
|
|
213
214
|
}
|
|
214
215
|
|
|
216
|
+
/**
|
|
217
|
+
* Every locale this project declared in docs.json — the whitelist the localized
|
|
218
|
+
* component chrome (`resolveLocaleFromPath`) gates on. Empty for a project with
|
|
219
|
+
* translations off.
|
|
220
|
+
*/
|
|
221
|
+
function declaredLocales(config: DocsConfig): string[] {
|
|
222
|
+
return config.navigation?.languages?.map((l) => l.language) ?? [];
|
|
223
|
+
}
|
|
224
|
+
|
|
225
|
+
/**
|
|
226
|
+
* The subset of those that actually live under a URL prefix — the whitelist the
|
|
227
|
+
* untranslated-page fallback gates on.
|
|
228
|
+
*
|
|
229
|
+
* The default language's pages are at the ROOT (`transformLanguagePath` drops
|
|
230
|
+
* the prefix when `toLang === defaultLang`), so `<default>/…` is never a real
|
|
231
|
+
* content path. Letting the fallback claim it would put "this page hasn't been
|
|
232
|
+
* translated yet" on the page that IS the default-language page — and on a
|
|
233
|
+
* project whose default is not English, serve that language's body under a
|
|
234
|
+
* "showing the English version" notice.
|
|
235
|
+
*
|
|
236
|
+
* The default is resolved the way the rest of the codebase does it
|
|
237
|
+
* (`buildHreflangAlternates`, `resolveLanguageWithFallback`): explicit
|
|
238
|
+
* `default: true`, else the first entry. Excluding a locale here can only ever
|
|
239
|
+
* mean "404 instead of English fallback" — the fallback is consulted solely
|
|
240
|
+
* when the requested file is already missing — so erring narrow is safe.
|
|
241
|
+
*
|
|
242
|
+
* Excluding the default's prefix closes only HALF the hazard the paragraph
|
|
243
|
+
* above names, because the fallback's DESTINATION is "strip the prefix and
|
|
244
|
+
* serve the root page" — and the root page is the DEFAULT language's page, not
|
|
245
|
+
* English. Those coincide on an English-default project and diverge on every
|
|
246
|
+
* other one, where `/en/quickstart` would 200 with the Spanish body under the
|
|
247
|
+
* hardcoded "Showing the English version" notice, canonical → the Spanish root.
|
|
248
|
+
* So the whole fallback is inert unless the default language IS English.
|
|
249
|
+
*
|
|
250
|
+
* Inert rather than reworded, for three reasons:
|
|
251
|
+
* - This module is English-by-contract end to end (`LocaleFallback.englishPath`,
|
|
252
|
+
* `fallbackSeo`'s doc, the notice copy, the `[translation-fallback] serving
|
|
253
|
+
* English body` log line). Naming the actual language served means
|
|
254
|
+
* generalising all of it — for a population the feature never reaches.
|
|
255
|
+
* - `lib/translation/nav.ts` (`unwrapLanguagesNav`) THROWS on a non-English
|
|
256
|
+
* default, so the AI pipeline that creates the untranslated window can never
|
|
257
|
+
* produce this state. Same exact `!== 'en'` test, deliberately: the set where
|
|
258
|
+
* the fallback is inert is exactly the set the pipeline refuses.
|
|
259
|
+
* - It restores the pre-feature 404 on precisely the configurations where no
|
|
260
|
+
* correct answer exists, and changes nothing for English-default projects.
|
|
261
|
+
*
|
|
262
|
+
* The `'en'` is a literal, not `SOURCE_LANGUAGE`: that constant lives under
|
|
263
|
+
* `lib/translation/`, which is server-only and excluded from CLI vendoring
|
|
264
|
+
* (`vendor.js` EXCLUDED_SUBTREES), and this file IS vendored.
|
|
265
|
+
*/
|
|
266
|
+
function fallbackLocales(config: DocsConfig): string[] {
|
|
267
|
+
const languages = config.navigation?.languages;
|
|
268
|
+
if (!languages || languages.length === 0) return [];
|
|
269
|
+
const defaultLang = languages.find((l) => l.default)?.language ?? languages[0].language;
|
|
270
|
+
if (defaultLang !== 'en') return [];
|
|
271
|
+
return languages.filter((l) => l.language !== defaultLang).map((l) => l.language);
|
|
272
|
+
}
|
|
273
|
+
|
|
215
274
|
function needsSlugRewrite(slug: string[]): boolean {
|
|
216
275
|
return slug.length === 0 || (slug.length === 1 && isValidLanguageCode(slug[0]));
|
|
217
276
|
}
|
|
@@ -296,12 +355,34 @@ export async function buildDocMetadata(input: RenderInput): Promise<Metadata> {
|
|
|
296
355
|
: normalizedSlug;
|
|
297
356
|
const pagePath = slug.join('/');
|
|
298
357
|
|
|
299
|
-
const [
|
|
358
|
+
const [pageContents, config] = await Promise.all([
|
|
300
359
|
loader.getContent(pagePath).catch(() => null),
|
|
301
360
|
configP,
|
|
302
361
|
]);
|
|
303
362
|
|
|
363
|
+
// Untranslated locale page → serve the English page's metadata for it (see
|
|
364
|
+
// lib/locale-fallback). This block MUST stay in lockstep with the identical
|
|
365
|
+
// one in renderDocPage: they are two Next entry points over ONE URL, and a
|
|
366
|
+
// fallback known to only one of them either serves the English body under an
|
|
367
|
+
// indexable locale canonical (the duplicate-content problem the noindex
|
|
368
|
+
// exists to prevent, on every untranslated page) or claims `noindex, follow`
|
|
369
|
+
// on a page that 404s.
|
|
370
|
+
//
|
|
371
|
+
// The two halves read R2 independently, so a translation landing between them
|
|
372
|
+
// is served with the metadata of the state its own read saw — self-healing on
|
|
373
|
+
// the next request, and inherent to two reads. Note this changed the severity
|
|
374
|
+
// of a transient R2 miss on a translated page: it used to cost a `<title>`,
|
|
375
|
+
// it now costs a `noindex` for one request.
|
|
376
|
+
const localeFallback = pageContents
|
|
377
|
+
? null
|
|
378
|
+
: parseLocalePath(pagePath, fallbackLocales(config));
|
|
379
|
+
const fileContents = pageContents ?? (localeFallback
|
|
380
|
+
? await loader.getContent(localeFallback.englishPath).catch(() => null)
|
|
381
|
+
: null);
|
|
382
|
+
|
|
304
383
|
if (!fileContents) {
|
|
384
|
+
// Includes the case where the locale prefix matched but the English page
|
|
385
|
+
// is missing too — nothing to fall back to.
|
|
305
386
|
return { title: 'Not Found' };
|
|
306
387
|
}
|
|
307
388
|
|
|
@@ -352,7 +433,10 @@ export async function buildDocMetadata(input: RenderInput): Promise<Metadata> {
|
|
|
352
433
|
const baseUrl = resolveBaseUrl(requestHeaders, projectSlug, hostAtDocs);
|
|
353
434
|
const languages = config.navigation?.languages;
|
|
354
435
|
|
|
355
|
-
const seoMetadata = buildSeoMetadata(
|
|
436
|
+
const seoMetadata = buildSeoMetadata(
|
|
437
|
+
config, data, pagePath, baseUrl, languages, isRootAlias, linkPrefix,
|
|
438
|
+
localeFallback?.englishPath,
|
|
439
|
+
);
|
|
356
440
|
|
|
357
441
|
const titleValue = data.title
|
|
358
442
|
? (data.title === config.name ? { absolute: data.title } : data.title)
|
|
@@ -419,15 +503,33 @@ export async function renderDocPage(input: RenderInput): Promise<ReactElement> {
|
|
|
419
503
|
: normalizedSlug;
|
|
420
504
|
const pagePath = slug.join('/');
|
|
421
505
|
const currentLang = extractLanguageFromPath(`/${pagePath}`);
|
|
422
|
-
const [
|
|
506
|
+
const [pageContents, config, highlighter] = await Promise.all([
|
|
423
507
|
loader.getContent(pagePath).catch(() => null),
|
|
424
508
|
configP,
|
|
425
509
|
highlighterP,
|
|
426
510
|
]);
|
|
427
511
|
|
|
512
|
+
// Untranslated locale page → serve the English body with a notice instead of
|
|
513
|
+
// 404ing. Mirror of the block in buildDocMetadata — see the comment there for
|
|
514
|
+
// why both entry points must reach the same verdict on the same URL.
|
|
515
|
+
const localeFallback = pageContents
|
|
516
|
+
? null
|
|
517
|
+
: parseLocalePath(pagePath, fallbackLocales(config));
|
|
518
|
+
const fileContents = pageContents ?? (localeFallback
|
|
519
|
+
? await loader.getContent(localeFallback.englishPath).catch(() => null)
|
|
520
|
+
: null);
|
|
521
|
+
|
|
428
522
|
if (!fileContents) {
|
|
523
|
+
// Includes the case where the locale prefix matched but the English page
|
|
524
|
+
// is missing too — nothing to fall back to.
|
|
429
525
|
notFound();
|
|
430
526
|
}
|
|
527
|
+
if (localeFallback) {
|
|
528
|
+
logger.info('[translation-fallback] serving English body for untranslated locale page', {
|
|
529
|
+
locale: localeFallback.locale,
|
|
530
|
+
pagePath,
|
|
531
|
+
});
|
|
532
|
+
}
|
|
431
533
|
|
|
432
534
|
const parsed = parseFrontmatter(fileContents);
|
|
433
535
|
const data = parsed.data as FrontmatterData;
|
|
@@ -436,10 +538,16 @@ export async function renderDocPage(input: RenderInput): Promise<ReactElement> {
|
|
|
436
538
|
// Whitelisted page locale for localized component chrome (Prompt action
|
|
437
539
|
// labels). Unlike `currentLang` above, this only counts a path prefix that
|
|
438
540
|
// is actually declared in navigation.languages — '' otherwise.
|
|
439
|
-
const docsLocale = resolveLocaleFromPath(
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
541
|
+
const docsLocale = resolveLocaleFromPath(`/${pagePath}`, declaredLocales(config));
|
|
542
|
+
|
|
543
|
+
// Plain server-rendered element — no client component, no dependency. On the
|
|
544
|
+
// fallback the chrome above stays localized (docsLocale is the same declared
|
|
545
|
+
// prefix parseLocalePath matched); only the body is English.
|
|
546
|
+
const translationNotice = localeFallback ? (
|
|
547
|
+
<div role="status" className="jd-translation-pending">
|
|
548
|
+
This page hasn’t been translated yet. Showing the English version.
|
|
549
|
+
</div>
|
|
550
|
+
) : null;
|
|
443
551
|
|
|
444
552
|
const baseUrl = resolveBaseUrl(requestHeaders, projectSlug, hostAtDocs);
|
|
445
553
|
const faqPairs = extractFaqPairs(rawContent);
|
|
@@ -810,6 +918,7 @@ export async function renderDocPage(input: RenderInput): Promise<ReactElement> {
|
|
|
810
918
|
{wrap(
|
|
811
919
|
<article className="px-4 sm:px-6 lg:px-8 py-6 sm:py-10 flex-1 min-w-0">
|
|
812
920
|
<Breadcrumb slug={slug} config={config} hidden={embed} />
|
|
921
|
+
{translationNotice}
|
|
813
922
|
|
|
814
923
|
{data.title && (
|
|
815
924
|
<header className="mb-4 sm:mb-6">
|
|
@@ -929,6 +1038,7 @@ export async function renderDocPage(input: RenderInput): Promise<ReactElement> {
|
|
|
929
1038
|
const articleContent = wrap(
|
|
930
1039
|
<article className="px-4 sm:px-6 lg:px-8 py-6 sm:py-10">
|
|
931
1040
|
<Breadcrumb slug={slug} config={config} hidden={embed} />
|
|
1041
|
+
{translationNotice}
|
|
932
1042
|
|
|
933
1043
|
{data.title && (
|
|
934
1044
|
<header className="mb-6 sm:mb-10">
|
package/vendored/lib/seo.ts
CHANGED
|
@@ -12,6 +12,7 @@ import type { Metadata } from 'next';
|
|
|
12
12
|
import type { DocsConfig, Logo, LogoConfig, Favicon, LanguageConfig, LanguageCode } from './docs-types';
|
|
13
13
|
import { normalizeLogo } from './docs-types';
|
|
14
14
|
import { findHreflangAliasCollisions, transformLanguagePath, toHreflang, resolveLocaleFromPath } from './language-utils';
|
|
15
|
+
import { fallbackSeo } from './locale-fallback';
|
|
15
16
|
import { logger } from '../shared/logger';
|
|
16
17
|
|
|
17
18
|
// Dedupe per-process: same docs.json shape produces the same collision
|
|
@@ -674,6 +675,16 @@ function derivePageLocale(pagePath: string, languages?: LanguageConfig[]): strin
|
|
|
674
675
|
* `/_jd/og` vs direct `/api/og`) and to strip the prefix off baseUrl for
|
|
675
676
|
* metadataBase/rootUrl. Falls back to the legacy `baseUrl.endsWith('/docs')`
|
|
676
677
|
* sniff when omitted, so callers that predate this param are unaffected.
|
|
678
|
+
* @param englishFallbackPath - Set ONLY when this URL is an untranslated locale
|
|
679
|
+
* variant serving the English page's body (`parseLocalePath` matched and the
|
|
680
|
+
* locale MDX is not in R2 yet — see lib/locale-fallback). Its value is the
|
|
681
|
+
* English page path. The variant then canonicalizes to the English page,
|
|
682
|
+
* emits `noindex, follow`, and drops hreflang: advertising an alternate for a
|
|
683
|
+
* URL that is serving English is the same "translation that isn't there"
|
|
684
|
+
* defect buildHreflangAlternates exists to prevent, and pairing hreflang with
|
|
685
|
+
* a cross-URL canonical is the Semrush "Conflicting hreflang and
|
|
686
|
+
* rel=canonical" finding. The canonical target emits the full cluster, so
|
|
687
|
+
* language discovery is preserved — same reasoning as isRootAlias.
|
|
677
688
|
* @returns Partial<Metadata> to spread into generateMetadata return
|
|
678
689
|
*/
|
|
679
690
|
|
|
@@ -696,12 +707,19 @@ export function buildSeoMetadata(
|
|
|
696
707
|
languages?: LanguageConfig[],
|
|
697
708
|
isRootAlias = false,
|
|
698
709
|
docsPrefix?: string,
|
|
710
|
+
englishFallbackPath?: string,
|
|
699
711
|
): Partial<Metadata> {
|
|
700
712
|
const globalMeta = config.seo?.metatags || {};
|
|
701
713
|
const pageMeta = normalizePageMetatags(frontmatter as Record<string, unknown>);
|
|
702
714
|
// Merge: page (flat-wins, already resolved inside normalizePageMetatags) over global
|
|
703
715
|
const metatags: Record<string, string> = { ...globalMeta, ...pageMeta };
|
|
704
716
|
const metadata: Partial<Metadata> = {};
|
|
717
|
+
// Non-null only for the untranslated-locale variant — see englishFallbackPath.
|
|
718
|
+
// An empty string is treated as "no fallback": it is unreachable today
|
|
719
|
+
// (parseLocalePath returns null on an empty englishPath) but would otherwise
|
|
720
|
+
// canonicalize the page to the bare site root and noindex it.
|
|
721
|
+
const fallbackPath = englishFallbackPath || null;
|
|
722
|
+
const fallback = fallbackPath ? fallbackSeo(fallbackPath, baseUrl) : null;
|
|
705
723
|
|
|
706
724
|
// 1. Generator - always add
|
|
707
725
|
metadata.generator = 'Jamdesk';
|
|
@@ -716,7 +734,11 @@ export function buildSeoMetadata(
|
|
|
716
734
|
const hiddenImpliesNoindex = frontmatter.hidden === true && !projectIndexesHidden;
|
|
717
735
|
const effectiveNoindex = explicitPageNoindex ?? (hiddenImpliesNoindex ? true : undefined);
|
|
718
736
|
|
|
719
|
-
if (
|
|
737
|
+
if (fallback) {
|
|
738
|
+
// The untranslated variant duplicates the English body under a second URL,
|
|
739
|
+
// so it stays out of the index no matter what the page or project declares.
|
|
740
|
+
metadata.robots = fallback.robots;
|
|
741
|
+
} else if (effectiveNoindex === true) {
|
|
720
742
|
// noindex does NOT imply nofollow - use follow: true
|
|
721
743
|
metadata.robots = { index: false, follow: true };
|
|
722
744
|
} else if (effectiveNoindex !== false && metatags.robots) {
|
|
@@ -755,6 +777,12 @@ export function buildSeoMetadata(
|
|
|
755
777
|
// 7. Canonical
|
|
756
778
|
const cleanPath = pagePath.replace(/^\/+|\/+$/g, '');
|
|
757
779
|
const pageUrl = cleanPath ? `${baseUrl}/${cleanPath}` : baseUrl;
|
|
780
|
+
// Every canonical form below is computed from the ENGLISH path on the
|
|
781
|
+
// fallback variant — the served body is the English page's, so claiming the
|
|
782
|
+
// locale URL as canonical is exactly the duplicate-content problem to avoid.
|
|
783
|
+
const canonicalPath = fallbackPath
|
|
784
|
+
? fallbackPath.replace(/^\/+|\/+$/g, '')
|
|
785
|
+
: cleanPath;
|
|
758
786
|
let canonical: string;
|
|
759
787
|
if (pageMeta.canonical) {
|
|
760
788
|
// Per-page canonical: use exactly as authored.
|
|
@@ -763,14 +791,17 @@ export function buildSeoMetadata(
|
|
|
763
791
|
// Global canonical is a BASE — append the page path so every page does not
|
|
764
792
|
// report the same URL (which would de-index the whole site). Matches Mintlify.
|
|
765
793
|
const base = globalMeta.canonical.replace(/\/+$/, '');
|
|
766
|
-
canonical =
|
|
794
|
+
canonical = canonicalPath ? `${base}/${canonicalPath}` : base;
|
|
795
|
+
} else if (fallback) {
|
|
796
|
+
canonical = fallback.canonical;
|
|
767
797
|
} else {
|
|
768
798
|
canonical = pageUrl;
|
|
769
799
|
}
|
|
770
800
|
|
|
771
801
|
// 7b. Hreflang alternates for multi-language support. Suppressed on root-alias
|
|
772
|
-
// pages
|
|
773
|
-
|
|
802
|
+
// pages and on the untranslated-locale fallback — see the isRootAlias and
|
|
803
|
+
// englishFallbackPath param docs above for why.
|
|
804
|
+
const hreflangLanguages = isRootAlias || fallback
|
|
774
805
|
? undefined
|
|
775
806
|
: buildHreflangAlternates(baseUrl, pagePath, languages || []);
|
|
776
807
|
|
|
@@ -806,7 +837,11 @@ export function buildSeoMetadata(
|
|
|
806
837
|
url: pageUrl,
|
|
807
838
|
siteName: config.name,
|
|
808
839
|
ogImageUrl,
|
|
809
|
-
locale
|
|
840
|
+
// og:locale describes the language of the CONTENT, so on the fallback it
|
|
841
|
+
// must follow the English body, not the locale URL. (og:url deliberately
|
|
842
|
+
// still points at the locale URL — that is the page's real address, and
|
|
843
|
+
// it is not an indexing directive.)
|
|
844
|
+
locale: derivePageLocale(fallbackPath ?? pagePath, languages),
|
|
810
845
|
});
|
|
811
846
|
}
|
|
812
847
|
|
|
@@ -19,7 +19,29 @@ const EN: UiStrings = {
|
|
|
19
19
|
breadcrumbHome: 'Home',
|
|
20
20
|
};
|
|
21
21
|
|
|
22
|
-
|
|
22
|
+
// Aliased locales share one object: `fr-CA`/`fr-ca` are the same chrome as
|
|
23
|
+
// `fr`, `jp`/`ja-jp` the same as `ja`, `pt-BR` the same as `pt`. Only the
|
|
24
|
+
// Chinese pair is genuinely two tables — Traditional is a distinct script,
|
|
25
|
+
// not a `zh` alias, so it gets its own strings rather than a reference.
|
|
26
|
+
const FR: UiStrings = {
|
|
27
|
+
search: 'Rechercher',
|
|
28
|
+
askAi: "Demander à l'IA",
|
|
29
|
+
more: 'Plus',
|
|
30
|
+
toggleMenu: 'Basculer le menu',
|
|
31
|
+
selectLanguage: 'Choisir la langue',
|
|
32
|
+
breadcrumbHome: 'Accueil',
|
|
33
|
+
};
|
|
34
|
+
|
|
35
|
+
const ES: UiStrings = {
|
|
36
|
+
search: 'Buscar',
|
|
37
|
+
askAi: 'Preguntar a la IA',
|
|
38
|
+
more: 'Más',
|
|
39
|
+
toggleMenu: 'Alternar menú',
|
|
40
|
+
selectLanguage: 'Elegir idioma',
|
|
41
|
+
breadcrumbHome: 'Inicio',
|
|
42
|
+
};
|
|
43
|
+
|
|
44
|
+
const ZH_HANS: UiStrings = {
|
|
23
45
|
search: '搜索',
|
|
24
46
|
askAi: '询问 AI',
|
|
25
47
|
more: '更多',
|
|
@@ -28,33 +50,256 @@ const ZH: Partial<UiStrings> = {
|
|
|
28
50
|
breadcrumbHome: '首页',
|
|
29
51
|
};
|
|
30
52
|
|
|
31
|
-
const
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
53
|
+
const ZH_HANT: UiStrings = {
|
|
54
|
+
search: '搜尋',
|
|
55
|
+
askAi: '詢問 AI',
|
|
56
|
+
more: '更多',
|
|
57
|
+
toggleMenu: '切換選單',
|
|
58
|
+
selectLanguage: '選擇語言',
|
|
59
|
+
breadcrumbHome: '首頁',
|
|
60
|
+
};
|
|
61
|
+
|
|
62
|
+
const JA: UiStrings = {
|
|
63
|
+
search: '検索',
|
|
64
|
+
askAi: 'AI に質問',
|
|
65
|
+
more: 'その他',
|
|
66
|
+
toggleMenu: 'メニューを切り替え',
|
|
67
|
+
selectLanguage: '言語を選択',
|
|
68
|
+
breadcrumbHome: 'ホーム',
|
|
69
|
+
};
|
|
70
|
+
|
|
71
|
+
const PT: UiStrings = {
|
|
72
|
+
search: 'Pesquisar',
|
|
73
|
+
askAi: 'Perguntar à IA',
|
|
74
|
+
more: 'Mais',
|
|
75
|
+
toggleMenu: 'Alternar menu',
|
|
76
|
+
selectLanguage: 'Selecionar idioma',
|
|
77
|
+
breadcrumbHome: 'Início',
|
|
78
|
+
};
|
|
79
|
+
|
|
80
|
+
/**
|
|
81
|
+
* Chrome strings for every locale the platform offers.
|
|
82
|
+
*
|
|
83
|
+
* The type is a REQUIRED `Record` over every `LanguageCode` except `en`, and
|
|
84
|
+
* each value is a complete `UiStrings` — both deliberate. Until 2026-08-08
|
|
85
|
+
* this was a `Partial` map holding only `fr`, `es`, `zh` and `cn`, so the
|
|
86
|
+
* other 28 offered locales silently fell back to English: a reader on a fully
|
|
87
|
+
* translated German page still got a "Search" / "Ask AI" header. Nothing
|
|
88
|
+
* failed and no test noticed, because falling back to English is exactly what
|
|
89
|
+
* `getUiStrings` is written to do. Making the record total moves that from a
|
|
90
|
+
* silent runtime gap to a compile error the moment a locale is added to
|
|
91
|
+
* `LanguageCode` without its chrome.
|
|
92
|
+
*
|
|
93
|
+
* These are NOT AI-pipeline output — the pipeline never sees them. They are
|
|
94
|
+
* hand-written and have had no native-speaker review, the same caveat that
|
|
95
|
+
* applies to `PLATFORM_SCREENSHOT_NOTES` in `lib/translation/nav.ts`. Six
|
|
96
|
+
* short, highly conventional UI labels are a much lower-risk surface than a
|
|
97
|
+
* full sentence, but they are also the most-seen text on every page, so get
|
|
98
|
+
* them reviewed before leaning on any of these locales commercially.
|
|
99
|
+
*/
|
|
100
|
+
const OVERRIDES: Record<Exclude<LanguageCode, 'en'>, UiStrings> = {
|
|
101
|
+
fr: FR,
|
|
102
|
+
'fr-CA': FR,
|
|
103
|
+
'fr-ca': FR,
|
|
104
|
+
es: ES,
|
|
105
|
+
zh: ZH_HANS,
|
|
106
|
+
cn: ZH_HANS,
|
|
107
|
+
'zh-Hans': ZH_HANS,
|
|
108
|
+
'zh-Hant': ZH_HANT,
|
|
109
|
+
ja: JA,
|
|
110
|
+
jp: JA,
|
|
111
|
+
'ja-jp': JA,
|
|
112
|
+
pt: PT,
|
|
113
|
+
'pt-BR': PT,
|
|
114
|
+
de: {
|
|
115
|
+
search: 'Suchen',
|
|
116
|
+
askAi: 'KI fragen',
|
|
117
|
+
more: 'Mehr',
|
|
118
|
+
toggleMenu: 'Menü umschalten',
|
|
119
|
+
selectLanguage: 'Sprache wählen',
|
|
120
|
+
breadcrumbHome: 'Startseite',
|
|
121
|
+
},
|
|
122
|
+
ko: {
|
|
123
|
+
search: '검색',
|
|
124
|
+
askAi: 'AI에게 질문',
|
|
125
|
+
more: '더 보기',
|
|
126
|
+
toggleMenu: '메뉴 전환',
|
|
127
|
+
selectLanguage: '언어 선택',
|
|
128
|
+
breadcrumbHome: '홈',
|
|
129
|
+
},
|
|
130
|
+
it: {
|
|
131
|
+
search: 'Cerca',
|
|
132
|
+
askAi: "Chiedi all'IA",
|
|
133
|
+
more: 'Altro',
|
|
134
|
+
toggleMenu: 'Attiva/disattiva menu',
|
|
135
|
+
selectLanguage: 'Scegli la lingua',
|
|
136
|
+
breadcrumbHome: 'Home',
|
|
137
|
+
},
|
|
138
|
+
ru: {
|
|
139
|
+
search: 'Поиск',
|
|
140
|
+
askAi: 'Спросить ИИ',
|
|
141
|
+
more: 'Ещё',
|
|
142
|
+
toggleMenu: 'Переключить меню',
|
|
143
|
+
selectLanguage: 'Выбрать язык',
|
|
144
|
+
breadcrumbHome: 'Главная',
|
|
145
|
+
},
|
|
146
|
+
ro: {
|
|
147
|
+
search: 'Caută',
|
|
148
|
+
askAi: 'Întreabă AI',
|
|
149
|
+
more: 'Mai multe',
|
|
150
|
+
toggleMenu: 'Comută meniul',
|
|
151
|
+
selectLanguage: 'Alege limba',
|
|
152
|
+
breadcrumbHome: 'Acasă',
|
|
153
|
+
},
|
|
154
|
+
cs: {
|
|
155
|
+
search: 'Hledat',
|
|
156
|
+
askAi: 'Zeptat se AI',
|
|
157
|
+
more: 'Více',
|
|
158
|
+
toggleMenu: 'Přepnout nabídku',
|
|
159
|
+
selectLanguage: 'Vybrat jazyk',
|
|
160
|
+
breadcrumbHome: 'Domů',
|
|
161
|
+
},
|
|
162
|
+
id: {
|
|
163
|
+
search: 'Cari',
|
|
164
|
+
askAi: 'Tanya AI',
|
|
165
|
+
more: 'Lainnya',
|
|
166
|
+
toggleMenu: 'Alihkan menu',
|
|
167
|
+
selectLanguage: 'Pilih bahasa',
|
|
168
|
+
breadcrumbHome: 'Beranda',
|
|
169
|
+
},
|
|
170
|
+
ar: {
|
|
171
|
+
search: 'بحث',
|
|
172
|
+
askAi: 'اسأل الذكاء الاصطناعي',
|
|
173
|
+
more: 'المزيد',
|
|
174
|
+
toggleMenu: 'تبديل القائمة',
|
|
175
|
+
selectLanguage: 'اختر اللغة',
|
|
176
|
+
breadcrumbHome: 'الرئيسية',
|
|
177
|
+
},
|
|
178
|
+
tr: {
|
|
179
|
+
search: 'Ara',
|
|
180
|
+
askAi: 'Yapay zekâya sor',
|
|
181
|
+
more: 'Daha fazla',
|
|
182
|
+
toggleMenu: 'Menüyü aç/kapat',
|
|
183
|
+
selectLanguage: 'Dil seçin',
|
|
184
|
+
breadcrumbHome: 'Ana sayfa',
|
|
185
|
+
},
|
|
186
|
+
hi: {
|
|
187
|
+
search: 'खोजें',
|
|
188
|
+
askAi: 'AI से पूछें',
|
|
189
|
+
more: 'और',
|
|
190
|
+
toggleMenu: 'मेन्यू टॉगल करें',
|
|
191
|
+
selectLanguage: 'भाषा चुनें',
|
|
192
|
+
breadcrumbHome: 'होम',
|
|
193
|
+
},
|
|
194
|
+
sv: {
|
|
195
|
+
search: 'Sök',
|
|
196
|
+
askAi: 'Fråga AI',
|
|
197
|
+
more: 'Mer',
|
|
198
|
+
toggleMenu: 'Växla meny',
|
|
199
|
+
selectLanguage: 'Välj språk',
|
|
200
|
+
breadcrumbHome: 'Hem',
|
|
201
|
+
},
|
|
202
|
+
no: {
|
|
203
|
+
search: 'Søk',
|
|
204
|
+
askAi: 'Spør AI',
|
|
205
|
+
more: 'Mer',
|
|
206
|
+
toggleMenu: 'Veksle meny',
|
|
207
|
+
selectLanguage: 'Velg språk',
|
|
208
|
+
breadcrumbHome: 'Hjem',
|
|
209
|
+
},
|
|
210
|
+
lv: {
|
|
211
|
+
search: 'Meklēt',
|
|
212
|
+
askAi: 'Jautāt MI',
|
|
213
|
+
more: 'Vairāk',
|
|
214
|
+
toggleMenu: 'Pārslēgt izvēlni',
|
|
215
|
+
selectLanguage: 'Izvēlēties valodu',
|
|
216
|
+
breadcrumbHome: 'Sākums',
|
|
217
|
+
},
|
|
218
|
+
nl: {
|
|
219
|
+
search: 'Zoeken',
|
|
220
|
+
askAi: 'AI vragen',
|
|
221
|
+
more: 'Meer',
|
|
222
|
+
toggleMenu: 'Menu schakelen',
|
|
223
|
+
selectLanguage: 'Taal kiezen',
|
|
224
|
+
breadcrumbHome: 'Home',
|
|
225
|
+
},
|
|
226
|
+
uk: {
|
|
227
|
+
search: 'Пошук',
|
|
228
|
+
askAi: 'Запитати ШІ',
|
|
229
|
+
more: 'Більше',
|
|
230
|
+
toggleMenu: 'Перемкнути меню',
|
|
231
|
+
selectLanguage: 'Вибрати мову',
|
|
232
|
+
breadcrumbHome: 'Головна',
|
|
233
|
+
},
|
|
234
|
+
vi: {
|
|
235
|
+
search: 'Tìm kiếm',
|
|
236
|
+
askAi: 'Hỏi AI',
|
|
237
|
+
more: 'Thêm',
|
|
238
|
+
toggleMenu: 'Bật/tắt menu',
|
|
239
|
+
selectLanguage: 'Chọn ngôn ngữ',
|
|
240
|
+
breadcrumbHome: 'Trang chủ',
|
|
241
|
+
},
|
|
242
|
+
pl: {
|
|
243
|
+
search: 'Szukaj',
|
|
244
|
+
askAi: 'Zapytaj AI',
|
|
245
|
+
more: 'Więcej',
|
|
246
|
+
toggleMenu: 'Przełącz menu',
|
|
247
|
+
selectLanguage: 'Wybierz język',
|
|
248
|
+
breadcrumbHome: 'Strona główna',
|
|
249
|
+
},
|
|
250
|
+
uz: {
|
|
251
|
+
search: 'Qidirish',
|
|
252
|
+
askAi: 'AI dan soʻrash',
|
|
253
|
+
more: 'Koʻproq',
|
|
254
|
+
toggleMenu: 'Menyuni almashtirish',
|
|
255
|
+
selectLanguage: 'Tilni tanlash',
|
|
256
|
+
breadcrumbHome: 'Bosh sahifa',
|
|
39
257
|
},
|
|
40
|
-
|
|
41
|
-
search: '
|
|
42
|
-
askAi: '
|
|
43
|
-
more: '
|
|
44
|
-
toggleMenu: '
|
|
45
|
-
selectLanguage: '
|
|
46
|
-
breadcrumbHome: '
|
|
258
|
+
he: {
|
|
259
|
+
search: 'חיפוש',
|
|
260
|
+
askAi: 'שאל את ה-AI',
|
|
261
|
+
more: 'עוד',
|
|
262
|
+
toggleMenu: 'החלף תפריט',
|
|
263
|
+
selectLanguage: 'בחר שפה',
|
|
264
|
+
breadcrumbHome: 'דף הבית',
|
|
47
265
|
},
|
|
48
|
-
zh: ZH,
|
|
49
|
-
cn: ZH,
|
|
50
266
|
};
|
|
51
267
|
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
268
|
+
/**
|
|
269
|
+
* Pre-merged so repeated calls return a stable object reference.
|
|
270
|
+
*
|
|
271
|
+
* Keyed by LOWERCASED code, and looked up the same way. Canonical casing is
|
|
272
|
+
* not what every caller has: `buildJsonLd` (`lib/json-ld.ts`) resolves its
|
|
273
|
+
* locale through `normalizeLanguageList` (`lib/locale-helpers.ts`), which
|
|
274
|
+
* lowercases every code it reads out of docs.json. An exact-key map therefore
|
|
275
|
+
* missed `pt-BR` -> `pt-br`, `zh-Hans` -> `zh-hans` and `zh-Hant` -> `zh-hant`,
|
|
276
|
+
* and those tenants got an English "Home" in the JSON-LD BreadcrumbList on
|
|
277
|
+
* every page while their visible header was correctly translated. `fr-CA` hid
|
|
278
|
+
* the bug, because `fr-ca` happens to be a `LanguageCode` in its own right.
|
|
279
|
+
*
|
|
280
|
+
* Folded here rather than at the call site because the other two callers
|
|
281
|
+
* (`Header.tsx`, `LanguageSelector.tsx`) arrive canonically cased via
|
|
282
|
+
* `extractLanguageFromPath` — so the asymmetry is invisible from any single
|
|
283
|
+
* call site, which is exactly the shape of bug that comes back.
|
|
284
|
+
*
|
|
285
|
+
* Aliases differing only in case (`fr-CA`/`fr-ca`) collapse onto one entry;
|
|
286
|
+
* they already resolve to the same `UiStrings`, so no table loses content.
|
|
287
|
+
*
|
|
288
|
+
* `...EN` is retained deliberately even though `OVERRIDES`' required-Record
|
|
289
|
+
* typing makes it currently redundant. It is the runtime backstop if that type
|
|
290
|
+
* is ever loosened or an entry arrives through a cast: with it, a missing key
|
|
291
|
+
* renders the English word; without it, the UI renders `undefined` on every
|
|
292
|
+
* page. That asymmetry is worth one spread.
|
|
293
|
+
*/
|
|
294
|
+
const MERGED: Record<string, UiStrings> = {};
|
|
295
|
+
for (const [code, overrides] of Object.entries(OVERRIDES) as [LanguageCode, UiStrings][]) {
|
|
296
|
+
MERGED[code.toLowerCase()] = { ...EN, ...overrides };
|
|
56
297
|
}
|
|
57
298
|
|
|
58
299
|
export function getUiStrings(lang: LanguageCode | undefined): UiStrings {
|
|
59
|
-
|
|
300
|
+
// `typeof` rather than a bare truthiness check: this value can originate in
|
|
301
|
+
// a customer-written docs.json, so a non-string must fall back to English
|
|
302
|
+
// rather than throw inside `.toLowerCase()` on every rendered page.
|
|
303
|
+
if (typeof lang !== 'string') return EN;
|
|
304
|
+
return MERGED[lang.toLowerCase()] ?? EN;
|
|
60
305
|
}
|
package/vendored/themes/base.css
CHANGED
|
@@ -1204,6 +1204,34 @@ iframe {
|
|
|
1204
1204
|
width: 100%;
|
|
1205
1205
|
}
|
|
1206
1206
|
|
|
1207
|
+
/* ===== UNTRANSLATED-LOCALE NOTICE =====
|
|
1208
|
+
* Emitted by lib/render-doc-page.tsx while a locale page has a nav entry but
|
|
1209
|
+
* no MDX file yet (see lib/locale-fallback.ts). Rendered inside <article>,
|
|
1210
|
+
* above the <h1> and OUTSIDE .prose, so it inherits no prose typography and
|
|
1211
|
+
* has to carry all of its own.
|
|
1212
|
+
*
|
|
1213
|
+
* Deliberately reuses the Note callout's tokens rather than inventing a
|
|
1214
|
+
* palette: every theme defines --color-note-* for light AND dark (the :root
|
|
1215
|
+
* and .dark blocks at the top of this file, overridden per theme in
|
|
1216
|
+
* themes/<name>/variables.css), so one rule follows all four themes in both
|
|
1217
|
+
* modes with no per-theme addition. Shape matches components/mdx/Callouts.tsx
|
|
1218
|
+
* (rounded-lg / px-4 py-3 / text-sm) so it reads as the same family.
|
|
1219
|
+
*
|
|
1220
|
+
* No media query: the only width-sensitive value is the horizontal padding,
|
|
1221
|
+
* which matches the <article>'s own px-4 at the 375px breakpoint, and the text
|
|
1222
|
+
* wraps rather than overflowing.
|
|
1223
|
+
*/
|
|
1224
|
+
.jd-translation-pending {
|
|
1225
|
+
margin: 0 0 1.5rem 0;
|
|
1226
|
+
padding: 0.75rem 1rem;
|
|
1227
|
+
border: 1px solid var(--color-note-border);
|
|
1228
|
+
border-radius: var(--radius-md, 0.5rem);
|
|
1229
|
+
background-color: var(--color-note-bg);
|
|
1230
|
+
color: var(--color-note-text);
|
|
1231
|
+
font-size: 0.875rem;
|
|
1232
|
+
line-height: var(--callout-line-height, 1.6);
|
|
1233
|
+
}
|
|
1234
|
+
|
|
1207
1235
|
/* ===== CALLOUT TYPOGRAPHY ===== */
|
|
1208
1236
|
.callout-content {
|
|
1209
1237
|
line-height: var(--callout-line-height, 1.6) !important;
|
|
@@ -2326,9 +2326,9 @@
|
|
|
2326
2326
|
"license": "MIT"
|
|
2327
2327
|
},
|
|
2328
2328
|
"node_modules/cytoscape": {
|
|
2329
|
-
"version": "3.34.
|
|
2330
|
-
"resolved": "https://registry.npmjs.org/cytoscape/-/cytoscape-3.34.
|
|
2331
|
-
"integrity": "sha512-
|
|
2329
|
+
"version": "3.34.1",
|
|
2330
|
+
"resolved": "https://registry.npmjs.org/cytoscape/-/cytoscape-3.34.1.tgz",
|
|
2331
|
+
"integrity": "sha512-Lr0RvH9H75y9ar8h9Toy6u4lxRSCcxUq+hHcQ26sVWo6BnaQp1gwEZOYqwuYTZhyW7npyKnNLP8oJ2p1/3OZ7g==",
|
|
2332
2332
|
"license": "MIT",
|
|
2333
2333
|
"engines": {
|
|
2334
2334
|
"node": ">=0.10"
|