Refactor translation logic (#12797)
* refactor translation logic
* add changeset
* add changeset
* fix i18n updates
* format
* refactor i18n and remove redundant functions
* add changeset
* clean up
* format
* tweak
* change test to expect translated keys
* remove locale persistence (out of scope)
* tweak settings panel to persist current locale
* more clean up and update tests
* simplify marker logic
* add formatter unit tests
* format
* more clean up
* format
* clean up
* move translate_i18n_marker
* format
* test fix
* tweak
* test fix
---------
Co-authored-by: gradio-pr-bot <gradio-pr-bot@users.noreply.github.com>