Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

API Errors not localized #1285

Open
nmago opened this issue Apr 22, 2024 · 6 comments
Open

API Errors not localized #1285

nmago opened this issue Apr 22, 2024 · 6 comments
Assignees
Labels
good first issue Good for newcomers

Comments

@nmago
Copy link

nmago commented Apr 22, 2024

Hello, guys!

Thank you for putting in such effort into the template codebase; the thing seems amazing.

I have a localization-related question. Upon my initial examination of the codebase, I noticed that API errors aren't localized and are always returned in plain English.

For example, in the file pages/auth/forgot-password.tsx:

if (!response.ok) {
  toast.error(json.error.message);
  return;
}

toast.success(t('password-reset-link-sent'));

While the success message is being translated, the API error is being passed as is.

Is this intentional or left for the future? Maybe I'm missing something?

@ukrocks007 ukrocks007 added the good first issue Good for newcomers label Apr 25, 2024
@Musyonchez
Copy link
Contributor

Can I get assigned to this.

@deepakprabhakara
Copy link
Member

Thanks @Musyonchez, assigned the issue to you.

@SharmaPrakhar25
Copy link

Greetings @deepakprabhakara, Can I pick this up ? I can see that @Musyonchez has an open PR with pending work and is not working on it anymore.

@hkrhemendra
Copy link

Hi @deepakprabhakara , I looking for my first open source contribution.
Can I pick this issue?

@deepakprabhakara
Copy link
Member

Apologies for the delay in getting to this, @SharmaPrakhar25 please pick this up. Many thanks.

@siddharth122002
Copy link

Hi @deepakprabhakara , in this issue we only need to call t function for errors, right?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

7 participants