QuiiBz / next-international

Type-safe internationalization (i18n) for Next.js
https://next-international.vercel.app
MIT License
1.28k stars 59 forks source link

Can't set an empty string as translation value for a key #409

Open gustaveWPM opened 4 months ago

gustaveWPM commented 4 months ago

Related to: https://github.com/QuiiBz/next-international/issues/311

Let's assume that I have a blog author which has a hard-coded name (something like Gustave). For a lot of languages, it will do the trick.

image

But for some languages, it won't be enough. So, I would like to have a conditional translation.

(Here, it is alt)

image

Then, setting an empty string as translation value for a key can be a use-case.

image


Another use case could be:

I have many blog authors which can have conditionally a bio. Then, bio: '' would be a valid use case.


https://github.com/Tirraa/dashboard_rtm/blob/main/src/components/ui/blog/AuthorHoverCard.tsx#L16 https://github.com/Tirraa/dashboard_rtm/blob/main/src/components/ui/blog/BlogPostPreviewAuthors.tsx/#L55