i18n options are not considered
Hi,
While I try to refactor my code I want to implement the i18n plugin the way it is intended.
When I call the
resolveKey()
method i18n wont consider my passed options.
Example
The respective content from the json file
Every resolveKey()
without options works perfectly fine but not with options.
Any ideas?22 Replies
Guess I'll have to setup the plugin in my test bot after all to properly test this...
I'm looking forward to it <:Peepo_Happy:832181382595870730>
It seems to return an error if the default value is not added.
uh that's weird I thought I checked for that
@Favna Before/after default value complete
it's this undefined that's causing the problem, it should be deleted
@Favna look at the value next to undefined this is not what should be used 😅
switching from
defaultValueOrOptions
to optionsOrUndefined
should solve all problemsI think you mean the other way around right? Can you make a PR?
and deleting that undefined causes type issues pretty sure
Either way if you can make a PR, much appreciated.
If I make a PR for this I can solve a problem on the subcommands in passing?
Not sure what you mean but make it a separate PR for changelog scoping please
Ok no problem 👌
So the third parameter is for the defaultKey and the options I want to pass is the fourth paramter did I get this right?
GitHub
fix(plugin-i18next): :bug: fix options passed if not have default v...
The value passed to theresolveKey function was incorrect, resulting in errors every time it was called.
This PR corrects this problem.
Another strange behaviour:
returns the correct string
</help:946826618553401416>
If I call this within resolveKey
The return value is </help:946826618553401416>
.
Am I doing something wrong?I don't have this problem on my side...
I tested around.
Outputs the correct string.
The string from resolveKey with the
chatInputApplicationCommandMention
seems to html escape the string.
Any ideas why this occurs?I also use this function but I have no display problem.... 🧐
Got the issue! Got some custom config options for i18next I tried while figuring the issue with the options out
These messed it up. Removed it and it is working rn
Hey, when would you update the version? 🧐
ill do it now
there ya go @swiizyy @showcast
Thank you very much
Perfect, will checkout rn