switchblade icon indicating copy to clipboard operation
switchblade copied to clipboard

Use relative translate on commands

Open fersilva16 opened this issue 4 years ago • 3 comments

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.

fersilva16 avatar Mar 24 '20 02:03 fersilva16

Not really sure about how we would do that, as the t function is managed by i18next

pedrofracassi avatar Apr 06 '20 16:04 pedrofracassi

Oh wait I think i18next has a thing for that

pedrofracassi avatar May 16 '20 23:05 pedrofracassi

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.

pedrofracassi avatar May 17 '20 00:05 pedrofracassi