Skip to content

Commit

Permalink
chore(test-de): use mdn/translated-content-de
Browse files Browse the repository at this point in the history
  • Loading branch information
caugner committed Sep 24, 2024
1 parent da1d442 commit 3fad7b0
Show file tree
Hide file tree
Showing 7 changed files with 8 additions and 14 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/test-de-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ jobs:
if: ${{ ! vars.SKIP_BUILD || ! vars.SKIP_FUNCTION }}
with:
repository: mdn/translated-content-de
path: mdn/translated-content
path: mdn/translated-content-de
# See matching warning for mdn/content checkout step
fetch-depth: 0
token: ${{ secrets.MDN_MTC_PAT }}
Expand Down Expand Up @@ -120,7 +120,7 @@ jobs:
# Remember, the mdn/content repo got cloned into `pwd` into a
# sub-folder called "mdn/content"
CONTENT_ROOT: ${{ github.workspace }}/mdn/content/files
CONTENT_TRANSLATED_ROOT: ${{ github.workspace }}/mdn/translated-content/files
CONTENT_TRANSLATED_ROOT: ${{ github.workspace }}/mdn/translated-content-de/files
CONTRIBUTOR_SPOTLIGHT_ROOT: ${{ github.workspace }}/mdn/mdn-contributor-spotlight/contributors
BLOG_ROOT: ${{ github.workspace }}/mdn/mdn-studio/content/posts
CURRICULUM_ROOT: ${{ github.workspace }}/mdn/curriculum
Expand Down Expand Up @@ -249,7 +249,7 @@ jobs:
working-directory: cloud-function
env:
CONTENT_ROOT: ${{ github.workspace }}/mdn/content/files
CONTENT_TRANSLATED_ROOT: ${{ github.workspace }}/mdn/translated-content/files
CONTENT_TRANSLATED_ROOT: ${{ github.workspace }}/mdn/translated-content-de/files
run: |
npm ci
npm run build-redirects
Expand Down
6 changes: 0 additions & 6 deletions build/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -158,12 +158,6 @@ function injectSource(doc, document, metadata) {
last_commit_url: getLastCommitURL(root, metadata.hash),
filename,
};
if (doc.locale === "de") {
doc.source.github_url = doc.source.github_url.replace(
"translated-content",
"translated-content-de"
);
}
}

export interface BuiltDocument {
Expand Down
2 changes: 1 addition & 1 deletion build/spas.ts
Original file line number Diff line number Diff line change
Expand Up @@ -507,7 +507,7 @@ async function fetchGitHubPRs(repo, count = 5) {
}

async function fetchRecentContributions() {
const repos = ["mdn/content", "mdn/translated-content"];
const repos = ["mdn/content", "mdn/translated-content-de"];
const countPerRepo = 5;
const pullRequests = (
await Promise.all(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ export function LocalizedContentNote({
const url = isActive
? activeLocaleNoteContent[locale]?.url ||
activeLocaleNoteContent["en-US"].url
: "https://github.com/mdn/translated-content/blob/main/PEERS_GUIDELINES.md#activating-a-locale";
: "https://github.com/mdn/translated-content-de/blob/main/PEERS_GUIDELINES.md#activating-a-locale";

const type = isActive ? "neutral" : "warning";
return <NoteBanner linkText={linkText} url={url} type={type} />;
Expand Down
2 changes: 1 addition & 1 deletion client/src/document/on-github.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ function NewIssueOnGitHubLink({

url.pathname =
locale !== "en-US"
? "/mdn/translated-content/issues/new"
? "/mdn/translated-content-de/issues/new"
: "/mdn/content/issues/new";
sp.set(
"template",
Expand Down
2 changes: 1 addition & 1 deletion docs/envvars.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ Path to the content files, cloned from https://github.com/mdn/content.
**Default: `../translated-content/files`**

Path to the translated content files, cloned from
https://github.com/mdn/translated-content.
https://github.com/mdn/translated-content-de.

### `CONTRIBUTOR_SPOTLIGHT_ROOT`

Expand Down
2 changes: 1 addition & 1 deletion libs/env/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ export const REPOSITORY_URLS = {
export const ROOTS = [CONTENT_ROOT];
if (CONTENT_TRANSLATED_ROOT) {
ROOTS.push(CONTENT_TRANSLATED_ROOT);
REPOSITORY_URLS[CONTENT_TRANSLATED_ROOT] = "mdn/translated-content";
REPOSITORY_URLS[CONTENT_TRANSLATED_ROOT] = "mdn/translated-content-de";
}

function correctPathFromEnv(envVarName) {
Expand Down

0 comments on commit 3fad7b0

Please sign in to comment.