-
Notifications
You must be signed in to change notification settings - Fork 14
fix(translator): Apply translation to kwargs passed to state.change callbacks #21
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
Conversation
0287063 to
8395086
Compare
| assert b_translator.translate_key("bar") == "b_bar" | ||
| assert b_translator.reverse_translate_key("b_foo") == "foo" | ||
| assert b_translator.reverse_translate_key("b_bar") == "bar" | ||
|
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can you test a translator that has prefix+custom-translation?
trame_server/state.py
Outdated
| # Execute state listeners | ||
| self._state_listeners.add_all(_keys) | ||
|
|
||
| pushed_state = self.translator.reverse_translate_dict( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
translated_state = ...
859f7d6 to
4dc096c
Compare
4dc096c to
ccd987b
Compare
|
I added the translator when registering the callbacks. If the callback is registered by a child server, the main server needs to know how to translate the keys. |
|
is that ok to merge or are you planning to add more tests/or-else? |
|
OK to merge |
No description provided.