Skip to content

Commit 3652bbc

Browse files
authored
Merge pull request #10368 from ethereum/fix-outdated-check-english-pages
Fix Translation Banner appearing on English pages
2 parents e4d376b + f08fa7f commit 3652bbc

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

gatsby-node.ts

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -98,12 +98,15 @@ const checkIsPageOutdated = async (
9898

9999
const joinedFilepath = filePath.join("-")
100100
const srcPath = path.resolve(`src/intl/${lang}/page-${joinedFilepath}.json`)
101-
const englishPath = path.resolve(`src/intl/en/page-${joinedFilepath}.json`)
101+
const englishPath = path.resolve(
102+
`src/intl/${defaultLanguage}/page-${joinedFilepath}.json`
103+
)
102104

103105
// If no file exists, default to english
104106
if (!fs.existsSync(srcPath)) {
105107
return {
106-
isOutdated: true,
108+
// Consider always defaultLanguage paths as updated
109+
isOutdated: lang !== defaultLanguage,
107110
isContentEnglish: true,
108111
}
109112
} else {

0 commit comments

Comments
 (0)