Closed guillain closed 7 years ago
Nice to see the coming improvement ;) Thanks!
Guillain, I was thinking today about some shortcut here. Maybe we could add customized strings in a configuration file, instead of depending of fully-fledged internationalization? At least this would allow you to respond quickly to the pressing demand of your client. Let me know your thoughts
Ok, here you go with 042a6feb639b7e25ef90d9fd540f746bfb05244c as a potential solution for this issue. Now you can define customized strings in settings given to shellbot, either from python code (with a dictionary) or from YAML. The top-level keyword to use is customized
. The value should be a dictionary where original strings are keys, and customized strings are values.
For example to translate some strings in French:
customized:
"help": "aide"
"next": "suivant"
Thanks for your next feedback
As per tests done today with Guillain: while the configuration of customized strings is loaded in memory, it is not taken into account by the engine. This has to be fixed and tested.
with daf64fbab4085d1591bf9a1aecd06b4fc615d132 all built-in commands can be translated via configuration; use localized
keyword like this:
'localized':
'help': 'aide'
'help <command>': 'aide <commande>'
'Show commands and usage': 'Liste les commandes et leur usage'
'Available commands:': 'Commandes disponibles :'
"Sorry, I do not know how to handle '{}'": "Désolé, je ne sais pas traiter '{}'"
'usage: {}': 'utilisation : {}'
u'Thank you for the information shared!': "Merci pour le partage d'informations !"
What do you think?
Yep, Last update works perfectly, thanks master ;)
great news, thanks for the (positive) feed-back! let move to other issues on the backlog :-)
Hi, Capability to set langage file to overload the EN default langage can be very interesting ;) Thanks!