зеркало из https://github.com/github/docs.git
Remove possible translation notice for site-policy docs (#45046)
This commit is contained in:
Родитель
47a62f3f38
Коммит
2c4dff55b7
|
@ -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',
|
||||
|
|
Загрузка…
Ссылка в новой задаче