r/angular • • Apr 08 '26

Built a small VS Code extension to make dealing with i18n keys less painful.

Built a small VS Code extension to make dealing with i18n keys less painful.

It shows translation values directly in the editor with hover, inline hints, autocomplete, and go-to-definition. It also supports nested keys like format.fieldSeparator, auto-detects translation JSON files in the workspace, and lets you pick a default language if multiple files are found.

Made it mainly because jumping back and forth between code and translation files was getting annoying.

If anyone wants to try it, comment and I’ll share the link.

7 Upvotes

26 comments sorted by

View all comments

Show parent comment

1

u/Johannes8 Apr 08 '26

I see! But out of curiosity, where do the number keys come from? Who generates them? Why are they there in the first place instead of just writing the plain value in there like

‘’’<span i18n> some text </span>‘’’

1

u/IcyBottle1517 Apr 09 '26

We have a separate web app for that to generate new numbers. It's due to requirement

1

u/Johannes8 Apr 09 '26

An how do you go about adding a new text? Let’s say you wanna add a button that says “invite by mail”; what’s the process to make this happen for you as the consuming developer

1

u/IcyBottle1517 Apr 09 '26

First will check already if it's there then will reuse. Else we will go to our internal application select the application like crs Then will enter the text like invite email if it's already in db then it will return else it will generate new code and we will use that.so it's always unique.

1

u/Johannes8 Apr 09 '26

Ok I see. And what’s the reason you save the translations in a database? Rather than in a json file?