* Remove tests which assert feature_oidc_native_flow=false behaviour, that setting is long gone
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
* Upgrade fetch-mock-jest to @fetch-mock/jest
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
* Update yarn.lock
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
* Make knip happy
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
* Disable broken tests
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
* Fix shared-components tests
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
* Snapshots
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
---------
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
* Split translations between EW and shared components
Uses update module API with global TranslationKey type that can be
overridden.
WIP.
* Removed the wrong script (for now)
* Add the type files
* Add shared components i18n file
* More i18n strings
* Add i18n check for shared conmponents
* Needs a different name
* rerun i18n for merge from develop, fix test
* Move translated strings to shared components file
NB. there are lots of removed strings for a few languages where we
seem to have hit a localazy bug or something where the key/value
for plurals got switched, making the translations invalid. They've
been missing for a while so I'm removing them rather than trying to
restore them,
* Add shared components files to localazy
* Merge element web & shared component translations
for the built app
* Use right translations for shared component tests
and fix missign en_EN strings
* Pull shared components translations too
* Fix/disable warnings
* We can now remove the build:res call
...right? (right?)
* Remove webpack import for languages index
..and just load it using a relative path which we do for the individual
language files and also did anyway for the index because even in non-test
it was an object, not a string, so we always usesd the 'test' code path.
* Make the storybook language selector work
...without referring to the parent app's files
* Revert unnecessary yarn lock change
* Typo
Co-authored-by: Michael Telatynski <7t3chguy@gmail.com>
* Add comment on why we use merge
* Fix localazy download config
to actually put the translations in the right place
* Better typescript syntax
Co-authored-by: Michael Telatynski <7t3chguy@gmail.com>
* Watch both translations files
---------
Co-authored-by: Michael Telatynski <7t3chguy@gmail.com>
* Introduce i18nContext
* Adds a context that holds the module i1n API
* Switches shared components to use that instead of importing it directly
* Adds the context to MatrixChat and BaseDalog so it should be available most places in EW
This is a relatively small PR but does change the way the shared components do i18n so
just doing this one by itself (it stands by itself anyway).
This will allow shared components to use i18n when used in modules.
* Add the file
* Fix import lint
* Name the translate function _t
Then it should continue to get picked up by the script
This seems a bit flaky and ew but I'm not sure I want to get into
changing this in this PR.
* Put humanize back to calling something called _t too
* Missed one
* Add i18n context wrapper to stories
* Unused import
* Fix imports
* wrap richitem
* Wrap other richitem & richlist
* One day I will get my head around this syntax
* Fix import spacing
* Add wrapper to test
* unused import
* Hack around dependency cycle
* Make a moduleapi instance for tests
* Add i18n wrapper to jest-matrix-react
* Simple test for i18napi
* Import type
* Move i18n context wrapper to storybook template
* Unused imports & fix pill story
* Move i18n to its own provider
* Add i18ncontext wrapper to jest tests
* imports
* Bump module api to 1.7.0
* tsdoc
* Add commercial licence and update config files
* Update license in headers
* Revert "Update license in headers"
This reverts commit 7ed7949485e88889a9ffc8075a9df1f8e936777e.
* Update only spdx id
* Remove LicenseRef- from package.json
LicenseRef- no longer allowed in npm v3 package.json
This fixes the warning in the logs and failing build check.
* Use Intl for names of languages
* Tweak Intl language style from "American English" -> "US English"
* Update tests
* Fix tests
* Consolidate languageHandler-test files
* Improve coverage
* Consistent casing for languages in dropdown
* Update LanguageDropdown.tsx
* Delint & update snapshot
* Fix tests
* Improve coverage
`of` will fallback to the given code with fallback=code (default)