fix(client): update navbar for Chinese Simplified and Traditional (#42007)

* fix: navbar bug

Should resolve the current bug on staging with the nav bar.

* fix: update display names

Update the display names for the two Chinese options.

* fix(tools): remove extraneous test

Docs do not indicate that language code needs to be 2 characters.
This commit is contained in:
Nicholas Carrigan (he/him)
2021-05-05 13:14:25 -07:00
committed by GitHub
parent 4ed75cb79f
commit fd11361fc8
2 changed files with 3 additions and 8 deletions

View File

@ -1,7 +1,6 @@
/* global expect */
import {
availableLangs,
i18nextCodes,
langDisplayNames,
langCodes
} from '../../config/i18n/all-langs';
@ -45,10 +44,6 @@ describe('Locale tests:', () => {
});
});
test(`has a two character entry in the i18nextCodes variable`, () => {
expect(i18nextCodes[lang].length).toBe(2);
});
test(`has an entry in the langDisplayNames variable`, () => {
expect(langDisplayNames[lang].length).toBeGreaterThan(0);
});

View File

@ -16,15 +16,15 @@ const i18nextCodes = {
english: 'en',
espanol: 'es',
chinese: 'zh',
'chinese-traditional': 'zh'
'chinese-traditional': 'zh-Hant'
};
// These are for the language selector dropdown menu in the footer
const langDisplayNames = {
english: 'English',
espanol: 'Español',
chinese: '中文',
'chinese-traditional': '古文'
chinese: '中文(简体字)',
'chinese-traditional': '中文(繁體字)'
};
/* These are for formatting dates and numbers. Used with JS .toLocaleString().