mirror of
https://github.com/zoriya/v10.git
synced 2026-08-16 02:45:09 +00:00
fix(i18n): error text updates (#1822)
Co-authored-by: Sam Potts <sam.potts@mux.com>
This commit is contained in:
co-authored by
Sam Potts
parent
c1348eaac8
commit
82b9e43bb5
@@ -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');
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user