i18n-ally icon indicating copy to clipboard operation
i18n-ally copied to clipboard

[Framework Request] sapphire-i18next support

Open Mzato0001 opened this issue 2 years ago • 0 comments

What framework do you want to have? Please provide links of its i18n solution/package. sapphire-i18next It is a plugin for Sapphire Framework - Discord bot framework built on top of discord.js for advanced and amazing bots.

Please provide some overall screenshots about how the i18n usage would be like resolveKey method:

resolveKey

sendLocalized method:

sendLocalized

replyLocalized method:

replyLocalized

editLocalized method:

editLocalized

Please provide a minimal starter project

Additional context Since the plugin uses i18next, the only difference are those methods. So I think we can just use a new Regex. This is the Regex I figured out 😂 idk whether it can be shortened or not:

/[^\w\d](?:(?:resolveKey)|(?:(?:send)|(?:reply)|(?:edit))Localized)\(\s*?.*?\s*?,\s*?(?:{?\s*?(?:.*?,)?\s*?(?:keys:)?\s*?\[?['"`]({key})['"`]\]?\s*?(?:,[\s\S]*?)?}?)\)/

Mzato0001 avatar Apr 21 '22 11:04 Mzato0001