fix(i18n): error text updates (#1822)

Co-authored-by: Sam Potts <sam.potts@mux.com>
This commit is contained in:
Steve Heffernan
2026-07-13 08:19:18 +10:00
committed by GitHub
co-authored by Sam Potts
parent c1348eaac8
commit 82b9e43bb5
60 changed files with 400 additions and 342 deletions
@@ -141,7 +141,7 @@ export class ErrorDialogElement extends MediaElement {
if (description) {
this.#lastDescription = description;
}
const copy = description ?? this.#lastDescription ?? 'An error occurred. Please try again.';
const copy = description ?? this.#lastDescription ?? 'An unexpected error occurred.';
desc.textContent = resolveTranslation(t, copy);
}
@@ -71,7 +71,7 @@ describe('ErrorDialogElement', () => {
registerI18n('es', {
'Something went wrong.': 'Algo salió mal.',
OK: 'Aceptar',
'An error occurred. Please try again.': 'Ocurrió un error. Inténtalo de nuevo.',
'An unexpected error occurred.': 'Ocurrió un error inesperado.',
});
ensureDefined(MediaI18nProviderElement.tagName, MediaI18nProviderElement);
ensureDefined(AlertDialogTitleElement.tagName, AlertDialogTitleElement);
@@ -92,7 +92,7 @@ describe('ErrorDialogElement', () => {
await el.updateComplete;
expect(title.textContent).toBe('Algo salió mal.');
expect(desc.textContent).toBe('Ocurrió un error. Inténtalo de nuevo.');
expect(desc.textContent).toBe('Ocurrió un error inesperado.');
expect(close.textContent).toBe('Aceptar');
});
@@ -100,7 +100,7 @@ describe('ErrorDialogElement', () => {
registerI18n('es', {
'Something went wrong.': 'Algo salió mal.',
OK: 'Aceptar',
'An error occurred. Please try again.': 'Ocurrió un error. Inténtalo de nuevo.',
'An unexpected error occurred.': 'Ocurrió un error inesperado.',
});
ensureDefined(MediaI18nProviderElement.tagName, MediaI18nProviderElement);
ensureDefined(AlertDialogTitleElement.tagName, AlertDialogTitleElement);
@@ -122,7 +122,7 @@ describe('ErrorDialogElement', () => {
await el.updateComplete;
expect(title.textContent).toBe('Custom title');
expect(desc.textContent).toBe('Ocurrió un error. Inténtalo de nuevo.');
expect(desc.textContent).toBe('Ocurrió un error inesperado.');
expect(close.textContent).toBe('Aceptar');
});