You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Jun 30, 2022. It is now read-only.
Localization seems like it doesn't work properly. I'm trying to use Lita as an Italian bot but...
I've found at least two problems:
when running on slack I cannot set a locale different from en. I've tried LANG and config.robot.locale and neither work. I keep getting translation missing errors looking for en locale strings (i18n is instead working fine in the shell adapter, set with the config option);
locale strings are useless for route help strings. I'm sure this is related to the fact that routes, being a class-level dsl, are evaluated before a proper locale string is set so they always try to use en locale strings.
I'm not sure I'm doing something wrong but this is driving me crazy and it looks like it might be an actual bug. If somebody could please confirm this I could start working on PR to fix this.
Thanks!
The text was updated successfully, but these errors were encountered:
has this ever been fixed? 5 years from the last comment and I am getting DEBUG: translation missing: C.UTF-8.lita.handler.dispatch all over my logs and sending the help message to Lita provides a large dump of such errors.
Part of the issue should be fixed by using "default locale" instead of "locale" which you can do as of v4.8: https://github.com/litaio/lita/releases/tag/v4.8.0. The problem of handler help text not translating is indeed because they are a class-level construct, so the translation is getting run when the file is loaded, which is before the Lita configuration is loaded. This will be addressed in Lita 5 by setting the locale (and the default locale) based on the environment variables LC_ALL, LC_MESSAGES, or LANG very early in the program's execution. Setting the locale via Lita configuration will be deprecated in favor of these environment variables.
Localization seems like it doesn't work properly. I'm trying to use Lita as an Italian bot but...
I've found at least two problems:
en
. I've triedLANG
andconfig.robot.locale
and neither work. I keep gettingtranslation missing
errors looking foren
locale strings (i18n is instead working fine in the shell adapter, set with the config option);en
locale strings.I'm not sure I'm doing something wrong but this is driving me crazy and it looks like it might be an actual bug. If somebody could please confirm this I could start working on PR to fix this.
Thanks!
The text was updated successfully, but these errors were encountered: