EMS-ESP32 icon indicating copy to clipboard operation
EMS-ESP32 copied to clipboard

refactor commands to take dynamic translation descriptions

Open proddy opened this issue 3 years ago • 1 comments

    > Yes i think this works, but i don't like to register only the translated fullname to command. If you later change language the translation of registration stays. It's a bit more work and need some more translated words for system and dallas commands, but it's cleaner to to have Command::add with the complete fullname-list and translate in Command::show() etc..

yes I agree, the translations should be dynamic like the rest of the code. It was a design principle I started with when writing the translation code so just forgot this. I'll see if I can implement it tomorrow

Originally posted by @proddy in https://github.com/emsesp/EMS-ESP32/issues/672#issuecomment-1272581511

proddy avatar Oct 09 '22 17:10 proddy

added code. now testing. then will do a PR

proddy avatar Oct 09 '22 20:10 proddy