Skip to content

Commit 0a2a5f8

Browse files
authored
repo sync
2 parents b22b462 + 43d354c commit 0a2a5f8

2 files changed

Lines changed: 18 additions & 8 deletions

File tree

script/fix-translation-errors.js

100644100755
Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,13 @@
1+
#!/usr/bin/env node
2+
3+
// [start-readme]
4+
//
5+
// Run this script to fix known frontmatter errors by copying values from english file
6+
// Currently only fixing errors in: 'type', 'changelog'
7+
// Please double check the changes created by this script before committing.
8+
//
9+
// [end-readme]
10+
111
const { execSync } = require('child_process')
212
const { get, set } = require('lodash')
313
const fs = require('fs')
@@ -13,14 +23,6 @@ const revalidator = require('revalidator')
1323
const fixableFmProps = ['type', 'changelog', 'mapTopic', 'hidden', 'layout', 'defaultPlatform', 'showMiniToc', 'allowTitleToDifferFromFilename', 'interactive', 'beta_product']
1424
const fixableYmlProps = ['date']
1525

16-
// [start-readme]
17-
//
18-
// Run this script to fix known frontmatter errors by copying values from english file
19-
// Currently only fixing errors in: 'type', 'changelog'
20-
// Please double check the changes created by this script before committing.
21-
//
22-
// [end-readme]
23-
2426
const loadAndValidateContent = async (path, schema) => {
2527
let fileContents
2628
try {

script/test-render-translation.js

100644100755
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,11 @@
1+
#!/usr/bin/env node
2+
3+
// [start-readme]
4+
//
5+
// Run this script to test-render all the translation files that have been changed (when compared to the `main` branch).
6+
//
7+
// [end-readme]
8+
19
const renderContent = require('../lib/render-content')
210
const loadSiteData = require('../lib/site-data')
311
const { loadPages } = require('../lib/pages')

0 commit comments

Comments
 (0)