Skip to content

Conversation

@alf0ns3
Copy link

@alf0ns3 alf0ns3 commented Jan 7, 2026

Resolve #800 , related to systemli/ticker-frontend#695

@alf0ns3 alf0ns3 requested a review from 0x46616c6b as a code owner January 7, 2026 21:54
@alf0ns3
Copy link
Author

alf0ns3 commented Jan 7, 2026

Hi @0x46616c6b , I went to translate the admin panel after the user interface 😃

All the unit tests pass except 2, but I really don't understand why they don't:

 FAIL  src/components/user/UserForm.test.tsx > UserForm > should render the component
AssertionError: expected "vi.fn()" to be called 1 times, but got 0 times
 ❯ src/components/user/UserForm.test.tsx:53:22
     51|     await userEvent.click(screen.getByRole('button', { name: 'Submit' }))
     52| 
     53|     expect(callback).toBeCalledTimes(1)
       |                      ^
     54|     expect(setSubmitting).toBeCalledTimes(2)
     55|     expect(fetchMock).toBeCalledTimes(2)

⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯[1/2]⎯

 FAIL  src/components/user/UserForm.test.tsx > UserForm > should render the component for existing user
AssertionError: expected "vi.fn()" to be called 1 times, but got 0 times
 ❯ src/components/user/UserForm.test.tsx:103:22
    101|     await userEvent.click(screen.getByRole('button', { name: 'Submit' }))
    102| 
    103|     expect(callback).toBeCalledTimes(1)
       |                      ^
    104|     expect(setSubmitting).toBeCalledTimes(2)
    105|     expect(fetchMock).toBeCalledTimes(2)

Do you have an idea?

Instead of that, most of the strings are currently localized (maybe I forgot 1 or 2).

Let me know if the nested JSON object is good for you, I let you do the de work 😉

@alf0ns3
Copy link
Author

alf0ns3 commented Jan 7, 2026

Across all my changes, I made a small behavioral change:

https://github.com/systemli/ticker-admin/pull/804/files#diff-42f4b889789ee3668910edee2489a6e7f95e9690f032c7ac9708c0592d592c94L107

I changed the min password length from 8 to 10 there to be consistent with the newPassword min length ( https://github.com/systemli/ticker-admin/pull/804/files#diff-d2b09d32a2dfa584556d0826d490b84f08dc69d94fcd8d7b433438b11415fcdaR76

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Feature: add localization in fr/de

1 participant