boxyhq/saas-starter-kit

API Errors are not localized

nmago opened this issue · 6 comments

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?

Can I get assigned to this.

Thanks @Musyonchez, assigned the issue to you.

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.

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

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

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