-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
localeNegotiator with custom context #2
Conversation
Hello! Thank you for your contribution.
I don't believe this is the case, actually. If you would type the argument of the bot.use(useFluent({
fluent,
localeNegotiator: async (context: CustomContext) => {
const user = await context.getUser();
return (
user.locale ||
context.from.language_code ||
defaultLocale
);
}
})); However, having the ability to specify
I'm planning to add ESLint in the future with customized set of rules. I don't really like the opinionated linting tools.
I wasn't aware of such workflow. It's a good fix. I think I will switch from using By the way, I would suggest you to use |
This does not work for me:
|
By the way I will merge this PQ once we finish migrating this repository. I hope later today. |
I didnt notice the new version as the name changed ( |
@EdJoPaTo thanks again for your contribution and sorry that it took so long to merge :) I've published the updated version. |
Using the localeNegotiator doesnt work with a custom context currently.
This is needed to access things like ctx.session (like the examples in the README are suggesting).
There does not seem to be a code formatting specified, it differs inside the files and no npm script for it. Maybe use
deno fmt
in the future?I test changes with
npm pack
and install the created package in another project. PrepublishOnly does not work for npm pack. prepack does also work for publishing a package.