Skip to content

Commit

Permalink
Remove translations infrastructure
Browse files Browse the repository at this point in the history
  • Loading branch information
Eric-Arellano committed Dec 20, 2024
1 parent 9385fc9 commit 4a7230c
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 19 deletions.
10 changes: 0 additions & 10 deletions scripts/js/commands/checkMetadata.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@ const ALLOWED_VIOLATIONS: Set<string> = new Set([...qiskitLegacyIgnores()]);
interface Arguments {
[x: string]: unknown;
apis: boolean;
translations: boolean;
}

const readArgs = (): Arguments => {
Expand All @@ -33,11 +32,6 @@ const readArgs = (): Arguments => {
default: false,
description: "Check the API docs?",
})
.option("translations", {
type: "boolean",
default: false,
description: "Check the translations?",
})
.parseSync();
};

Expand Down Expand Up @@ -100,10 +94,6 @@ async function determineFiles(args: Arguments): Promise<[string[], string[]]> {
mdGlobs.push(apiIgnore);
notebookGlobs.push(apiIgnore);
}
if (args.translations) {
mdGlobs.push("translations/**/*.{md,mdx}");
notebookGlobs.push("translations/**/*.ipynb");
}
return [await globby(mdGlobs), await globby(notebookGlobs)];
}

Expand Down
8 changes: 0 additions & 8 deletions scripts/js/commands/checkPagesRender.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@ interface Arguments {
devApis?: boolean;
historicalApis?: boolean;
qiskitReleaseNotes?: boolean;
translations?: boolean;
}

const readArgs = (): Arguments => {
Expand All @@ -44,7 +43,6 @@ const readArgs = (): Arguments => {
"dev-apis",
"historical-apis",
"qiskit-release-notes",
"translations",
],
description:
"Read the file path for file paths and globs to check, like `docs/start/index.md`. " +
Expand Down Expand Up @@ -73,10 +71,6 @@ const readArgs = (): Arguments => {
type: "boolean",
description: "Check the pages in the `api/qiskit/release-notes` folder.",
})
.option("translations", {
type: "boolean",
description: "Check the pages in the `translations/` subfolders.",
})
.parseSync();
};

Expand Down Expand Up @@ -145,7 +139,6 @@ async function canRender(fp: string): Promise<RenderSuccess | RenderFailure> {
function pathToUrl(path: string): string {
const strippedPath = path
.replace("docs/", "")
.replace("translations/", "")
.replace(/\.(?:md|mdx|ipynb)$/g, "");
return `http://localhost:${PORT}/${strippedPath}`;
}
Expand Down Expand Up @@ -186,7 +179,6 @@ async function determineFilePaths(args: Arguments): Promise<string[]> {
[args.historicalApis, "docs/api/*/[0-9]*/*.mdx"],
[args.devApis, "docs/api/*/dev/*.mdx"],
[args.qiskitReleaseNotes, "docs/api/qiskit/release-notes/*.mdx"],
[args.translations, "translations/**/*.{ipynb,mdx}"],
]) {
const prefix = isIncluded ? "" : "!";
globs.push(`${prefix}${glob}`);
Expand Down
1 change: 0 additions & 1 deletion translations/.gitkeep

This file was deleted.

0 comments on commit 4a7230c

Please sign in to comment.