Skip to content

Commit 8e1508d

Browse files
author
Peter Bengtsson
authored
remove crowdin-support hack (#23231)
1 parent d98af05 commit 8e1508d

File tree

3 files changed

+2
-20
lines changed

3 files changed

+2
-20
lines changed

lib/page.js

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -37,11 +37,7 @@ class Page {
3737
// Per https://nodejs.org/api/fs.html#fs_fs_exists_path_callback
3838
// its better to read and handle errors than to check access/stats first
3939
try {
40-
const {
41-
data,
42-
content,
43-
errors: frontmatterErrors,
44-
} = await readFileContents(fullPath, opts.languageCode)
40+
const { data, content, errors: frontmatterErrors } = await readFileContents(fullPath)
4541

4642
return {
4743
...opts,

lib/read-file-contents.js

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,15 +5,10 @@ import fm from './frontmatter.js'
55
/**
66
* Read only the frontmatter from file
77
*/
8-
export default async function fmfromf(filepath, languageCode) {
8+
export default async function fmfromf(filepath) {
99
let fileContent = await readFileAsync(filepath, 'utf8')
1010

1111
fileContent = encodeBracketedParentheses(fileContent)
1212

13-
// TODO remove this when crowdin-support issue 66 has been resolved
14-
if (languageCode !== 'en' && fileContent.includes(': verdadero')) {
15-
fileContent = fileContent.replace(': verdadero', ': true')
16-
}
17-
1813
return fm(fileContent, { filepath })
1914
}

tests/unit/page.js

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -566,15 +566,6 @@ describe('Page class', () => {
566566
})
567567
})
568568

569-
test('fixes translated frontmatter that includes verdadero', async () => {
570-
const page = await Page.init({
571-
relativePath: 'article-with-mislocalized-frontmatter.md',
572-
basePath: path.join(__dirname, '../fixtures'),
573-
languageCode: 'ja',
574-
})
575-
expect(page.mapTopic).toBe(true)
576-
})
577-
578569
describe('page.versions frontmatter', () => {
579570
// Docs Engineering issue: 972
580571
test.skip('pages that apply to older enterprise versions', async () => {

0 commit comments

Comments
 (0)