switchblade
switchblade copied to clipboard
Use relative translate on commands
Now we use t('commands:command_name.a.b.c')
, and ends up we repeats too much commands:command_name
.
Basically, the idea is:
if the path not starts with namespace (commands:
for example) this t
starts getting translation from root, else auto adds commands:command_name
on start.
Not really sure about how we would do that, as the t
function is managed by i18next
Oh wait I think i18next has a thing for that
https://www.i18next.com/overview/api#getfixedt
This might be of some help, but I'm not sure it would allow us to prefix the command name, but only the commands namespace.