saas-starter-kit icon indicating copy to clipboard operation
saas-starter-kit copied to clipboard

API Errors are not localized

Open nmago opened this issue 2 years ago • 7 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?

nmago avatar Apr 22 '24 20:04 nmago

Can I get assigned to this.

Musyonchez avatar Apr 30 '24 15:04 Musyonchez

Thanks @Musyonchez, assigned the issue to you.

deepakprabhakara avatar Apr 30 '24 22:04 deepakprabhakara

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.

prakharBDev avatar Jun 26 '24 09:06 prakharBDev

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

hkrhemendra avatar Jul 02 '24 15:07 hkrhemendra

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

deepakprabhakara avatar Jul 02 '24 19:07 deepakprabhakara

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

siddharth122002 avatar Oct 02 '24 16:10 siddharth122002