diff --git a/config/default.js b/config/default.js index 673980859a8..be7442489df 100644 --- a/config/default.js +++ b/config/default.js @@ -180,14 +180,8 @@ module.exports = { // Supported languages. langs: [ - 'af', 'ar', - 'ast', - 'az', 'bg', - 'bn', - 'bs', - 'ca', 'cak', 'cs', 'da', @@ -201,14 +195,10 @@ module.exports = { 'es-CL', 'es-ES', 'es-MX', - 'et', - 'eu', - 'fa', 'fi', 'fr', 'fur', 'fy-NL', - 'ga-IE', 'he', 'hr', 'hsb', @@ -221,12 +211,7 @@ module.exports = { 'ka', 'kab', 'ko', - 'lt', - 'lv', - 'mk', - 'mn', 'ms', - 'mt', 'nb-NO', 'nl', 'nn-NO', @@ -236,7 +221,6 @@ module.exports = { 'pt-PT', 'ro', 'ru', - 'si', 'sk', 'sl', 'sq', @@ -245,7 +229,6 @@ module.exports = { 'th', 'tr', 'uk', - 'ur', 'vi', 'zh-CN', 'zh-TW', diff --git a/tests/unit/amo/components/TestAddonTitle.js b/tests/unit/amo/components/TestAddonTitle.js index 562e1bf01df..846fd4e7896 100644 --- a/tests/unit/amo/components/TestAddonTitle.js +++ b/tests/unit/amo/components/TestAddonTitle.js @@ -127,7 +127,7 @@ describe(__filename, () => { it('handles RTL mode', () => { // `fa` is a RTL language. - dispatchClientMetadata({ lang: 'fa', store }); + dispatchClientMetadata({ lang: 'ar', store }); const author1 = { ...fakeAddon.authors[0], @@ -149,9 +149,9 @@ describe(__filename, () => { expect(screen.getAllByRole('link')).toHaveLength(2); const link1 = screen.getByRole('link', { name: author1.name }); - expect(link1).toHaveAttribute('href', `/fa/android/user/${author1.id}/`); + expect(link1).toHaveAttribute('href', `/ar/android/user/${author1.id}/`); const link2 = screen.getByRole('link', { name: author2.name }); - expect(link2).toHaveAttribute('href', `/fa/android/user/${author2.id}/`); + expect(link2).toHaveAttribute('href', `/ar/android/user/${author2.id}/`); expect(screen.getByClassName('AddonTitle-author')).toHaveTextContent( `${author1.name} ,${author2.name} by`, diff --git a/tests/unit/test_localesConfig.js b/tests/unit/test_localesConfig.js index ae6a9bfc403..16ca4c9ea97 100644 --- a/tests/unit/test_localesConfig.js +++ b/tests/unit/test_localesConfig.js @@ -7,6 +7,7 @@ import config from 'config'; import { globSync } from 'glob'; import { langToLocale, localeToLang } from 'amo/i18n/utils'; +import { unfilteredLanguages } from 'amo/languages'; const langs = config.get('langs'); const basePath = config.get('basePath'); @@ -18,6 +19,7 @@ describe(__filename, () => { it.each(langs)('should have a corresponding %s dir in locale', (lang) => { fs.lstatSync(path.join(basePath, 'locale', langToLocale(lang))); }); + const allKnownLanguages = Object.keys(unfilteredLanguages); for (const localeDir of globSync('locale/*')) { const locale = path.basename(localeDir); @@ -26,8 +28,8 @@ describe(__filename, () => { continue; } // eslint-disable no-loop-func - it(`should have a "${lang}" entry for locale dir in config.langs`, () => - expect(langs).toContain(lang)); + it(`should have a "${lang}" entry in unfilteredLanguages because locale dir exists`, () => + expect(allKnownLanguages).toContain(lang)); } describe('Check Locale JS files', () => {