mirror of
https://github.com/vector-im/element-web.git
synced 2024-11-16 21:24:59 +08:00
Add function to display i18n keys in UI
Avoids having to load translations in riot-web tests
This commit is contained in:
parent
e3e848d09e
commit
0f8e560247
@ -37,6 +37,13 @@ export function _t(...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) {
|
||||
if (!Array.isArray(preferredLangs)) {
|
||||
preferredLangs = [preferredLangs];
|
||||
|
Loading…
Reference in New Issue
Block a user