diff --git a/content/authentication/keeping-your-account-and-data-secure/reviewing-your-security-log.md b/content/authentication/keeping-your-account-and-data-secure/reviewing-your-security-log.md index 06f35ce27374..83ac731e79d8 100644 --- a/content/authentication/keeping-your-account-and-data-secure/reviewing-your-security-log.md +++ b/content/authentication/keeping-your-account-and-data-secure/reviewing-your-security-log.md @@ -239,8 +239,8 @@ An overview of some of the most common actions that are recorded as events in th | Action | Description |--------------------|--------------------- | `add_email` | Triggered when you {% ifversion not ghae %}[add a new email address](/articles/changing-your-primary-email-address){% else %}add a new email address{% endif %}.{% ifversion fpt or ghec %} -| `codespaces_trusted_repo_access_granted` | Triggered when you [allow the codespaces you create for a repository to access other repositories owned by your user account](/github/developing-online-with-codespaces/managing-access-and-security-for-codespaces. -| `codespaces_trusted_repo_access_revoked` | Triggered when you [disallow the codespaces you create for a repository to access other repositories owned by your user account](/github/developing-online-with-codespaces/managing-access-and-security-for-codespaces. {% endif %} +| `codespaces_trusted_repo_access_granted` | Triggered when you [allow the codespaces you create for a repository to access other repositories owned by your user account](/github/developing-online-with-codespaces/managing-access-and-security-for-codespaces). +| `codespaces_trusted_repo_access_revoked` | Triggered when you [disallow the codespaces you create for a repository to access other repositories owned by your user account](/github/developing-online-with-codespaces/managing-access-and-security-for-codespaces). {% endif %} | `create` | Triggered when you create a new user account.{% ifversion not ghae %} | `change_password` | Triggered when you change your password. | `forgot_password` | Triggered when you ask for [a password reset](/articles/how-can-i-reset-my-password).{% endif %} diff --git a/lib/site-data.js b/lib/site-data.js index b5a2a5bbbb54..bacc8139f9a6 100755 --- a/lib/site-data.js +++ b/lib/site-data.js @@ -22,14 +22,17 @@ export default function loadSiteData() { en: loadSiteDataFromDir(languages.en.dir), } - // load and add other language data to siteData where keys match english keys, - // filling holes with english site data const englishKeys = Object.keys(flat(siteData.en)) for (const language of Object.values(languages)) { if (language.code === 'en') continue const data = loadSiteDataFromDir(language.dir) + const keys = Object.keys(flat(data)) + // First set the fallback, which might get used if not overridden for (const key of englishKeys) { - set(siteData, `${language.code}.${key}`, get(data, key) || get(siteData.en, key)) + set(siteData, `${language.code}.${key}`, get(siteData.en, key)) + } + for (const key of keys) { + set(siteData, `${language.code}.${key}`, get(data, key)) } } diff --git a/tests/content/site-data.js b/tests/content/site-data.js index fa728fe6c48b..46f6f2fe2fa0 100644 --- a/tests/content/site-data.js +++ b/tests/content/site-data.js @@ -1,6 +1,6 @@ import { fileURLToPath } from 'url' import path from 'path' -import { get, isPlainObject, has } from 'lodash-es' +import { get, isPlainObject } from 'lodash-es' import flat from 'flat' import walkSync from 'walk-sync' import { ParseError } from 'liquidjs' @@ -88,17 +88,4 @@ describe('siteData module (English)', () => { )}` expect(yamlReusables.length, message).toBe(0) }) - - test('all non-English data has matching English data', async () => { - for (const languageCode of Object.keys(data)) { - if (languageCode === 'en') continue - - const nonEnglishKeys = Object.keys(flat(data[languageCode])) - for (const key of nonEnglishKeys) { - if (!has(data.en, key)) { - throw new Error(`matching data not found for ${languageCode}.${key}`) - } - } - } - }) })