web/translations: handle error contexts

This commit is contained in:
wukko 2024-08-24 16:15:48 +06:00
parent 7041d61d80
commit c0284fac13
No known key found for this signature in database
GPG key ID: 3E30B3F26C7B4AA2
2 changed files with 3 additions and 1 deletions

View file

@ -77,7 +77,7 @@
return createDialog({
...defaultErrorPopup,
bodyText: $t(response.error.code),
bodyText: $t(response.error.code, response?.error?.context),
});
}

View file

@ -25,6 +25,8 @@ const defaultLocale = 'en';
const config: Config<{
value?: string;
formats?: string;
limit?: number;
service?: string;
}> = {
fallbackLocale: defaultLocale,
translations: Object.keys(parsedLocfiles).reduce((obj, lang) => {