Remove possible translation notice for site-policy docs (#45046)

This commit is contained in:
Peter Bengtsson 2023-10-26 09:18:55 -04:00 коммит произвёл GitHub
Родитель 47a62f3f38
Коммит 2c4dff55b7
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: 4AEE18F83AFDEB23
4 изменённых файлов: 0 добавлений и 22 удалений

Просмотреть файл

@ -64,9 +64,6 @@ export type EnterpriseDeprecation = {
type DataReusables = {
enterprise_deprecation?: EnterpriseDeprecation
policies?: {
translation: string
}
}
type DataT = {
@ -150,11 +147,6 @@ export const getMainContext = async (req: any, res: any): Promise<MainContextT>
const reusables: DataReusables = {}
if (req.context.currentLanguage !== 'en' && req.path.split('/').includes('site-policy')) {
reusables.policies = {
translation: req.context.getDottedData('reusables.policies.translation'),
}
}
// To know whether we need this key, we need to match this
// with the business logic in `DeprecationBanner.tsx` which is as follows:
if (req.context.currentVersion.includes(req.context.enterpriseServerReleases.oldestSupported)) {

Просмотреть файл

@ -55,16 +55,6 @@ export const HeaderNotifications = () => {
},
})
}
} else {
if (relativePath?.includes('/site-policy')) {
const policies = data.reusables.policies
if (policies) {
translationNotices.push({
type: NotificationType.TRANSLATION,
content: policies.translation,
})
}
}
}
const releaseNotices: Array<Notif> = []
if (currentVersion === 'github-ae@latest') {

Просмотреть файл

@ -1,3 +0,0 @@
This document is translated from English. In the event of any conflict, uncertainty, or apparent inconsistency between this version and the English version(s) of this document, the English version is the controlling version.
If you have suggestions to improve our translation, please <a href="https://github.com/github/site-policy/issues">open an issue in our site-policy repository</a>.

Просмотреть файл

@ -23,7 +23,6 @@ import { mkdirp } from 'mkdirp'
// functionality yet live in data.
const MANDATORY_FILES = [
'data/ui.yml',
'data/reusables/policies/translation.md',
'data/reusables/enterprise_deprecation/deprecation_details.md',
'data/reusables/enterprise_deprecation/version_was_deprecated.md',
'data/reusables/enterprise_deprecation/version_will_be_deprecated.md',