Skip to content

Commit e020709

Browse files
authored
Merge pull request #5719 from github/repo-sync
repo sync
2 parents cc0025c + a40a010 commit e020709

2 files changed

Lines changed: 12 additions & 5 deletions

File tree

lib/frontmatter.js

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,16 +12,20 @@ const schema = {
1212
properties: {
1313
title: {
1414
type: 'string',
15-
required: true
15+
required: true,
16+
translatable: true
1617
},
1718
shortTitle: {
18-
type: 'string'
19+
type: 'string',
20+
translatable: true
1921
},
2022
intro: {
21-
type: 'string'
23+
type: 'string',
24+
translatable: true
2225
},
2326
product: {
24-
type: 'string'
27+
type: 'string',
28+
translatable: true
2529
},
2630
permissions: {
2731
type: 'string'

script/fix-translation-errors.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,9 @@ const yaml = require('js-yaml')
2020
const ghesReleaseNotesSchema = require('../lib/release-notes-schema')
2121
const revalidator = require('revalidator')
2222

23-
const fixableFmProps = ['type', 'changelog', 'mapTopic', 'hidden', 'layout', 'defaultPlatform', 'showMiniToc', 'allowTitleToDifferFromFilename', 'interactive', 'beta_product']
23+
const fixableFmProps = Object.keys(fm.schema.properties)
24+
.filter(property => !fm.schema.properties[property].translatable)
25+
.sort()
2426
const fixableYmlProps = ['date']
2527

2628
const loadAndValidateContent = async (path, schema) => {
@@ -50,6 +52,7 @@ const cmd = 'git diff --name-only origin/main | egrep "^translations/.*/(content
5052
const changedFilesRelPaths = execSync(cmd).toString().split('\n')
5153

5254
changedFilesRelPaths.forEach(async (relPath) => {
55+
// Skip READMEs
5356
if (!relPath || relPath.endsWith('README.md')) return
5457

5558
const localisedAbsPath = path.join(__dirname, '..', relPath)

0 commit comments

Comments
 (0)