You've already forked matrix-react-sdk
mirror of
https://github.com/matrix-org/matrix-react-sdk.git
synced 2025-07-28 15:22:05 +03:00
Add function to display i18n keys in UI
Avoids having to load translations in riot-web tests
This commit is contained in:
@ -37,6 +37,13 @@ export function _t(...args) {
|
|||||||
return counterpart.translate(...args);
|
return counterpart.translate(...args);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Allow overriding the text displayed when no translation exists
|
||||||
|
// Currently only use din unit tests to avoid having to load
|
||||||
|
// the translations in riot-web
|
||||||
|
export function setMissingEntryGenerator(f) {
|
||||||
|
counterpart.setMissingEntryGenerator(f);
|
||||||
|
}
|
||||||
|
|
||||||
export function setLanguage(preferredLangs) {
|
export function setLanguage(preferredLangs) {
|
||||||
if (!Array.isArray(preferredLangs)) {
|
if (!Array.isArray(preferredLangs)) {
|
||||||
preferredLangs = [preferredLangs];
|
preferredLangs = [preferredLangs];
|
||||||
|
Reference in New Issue
Block a user