diff --git a/e2e/helpers/language.js b/e2e/helpers/language.js index f416997722..371cd335ac 100644 --- a/e2e/helpers/language.js +++ b/e2e/helpers/language.js @@ -1,3 +1,5 @@ +import merge from 'lodash/merge'; + import * as english from '../../app/locales/en.json'; import * as haitian from '../../app/locales/ht.json'; @@ -6,7 +8,10 @@ const languageStrings = { 'ht-HT': haitian, }; -export const languages = Object.keys(languageStrings).map(locale => [ - locale, - languageStrings[locale], -]); +export const languages = Object.entries(languageStrings).map( + ([locale, strings]) => [ + locale, + // fall back to english if not found in the locale strings + merge({}, english, strings), + ], +); diff --git a/package.json b/package.json index 176b71ee38..c497307610 100644 --- a/package.json +++ b/package.json @@ -57,6 +57,7 @@ "emotion-theming": "^10.0.27", "i18next": "^19.3.3", "js-yaml": "^3.13.1", + "lodash": "^4.17.15", "patch-package": "^6.2.2", "pluralize": "^8.0.0", "postinstall-postinstall": "^2.0.0",