Message414529
>Tk does not provide localized [Ok] and [Cancel] buttons.
This is not true. You can call ::msgcat::mc to localize core strings such as "OK" and "Cancel".
The full tk.call becomes
tk.call("namespace", "eval", "::tk", "::msgcat::mc", s)
to translate a string s, such as "OK".
I have made a custom modified version of simpledialog.py that makes use of this and indeed localizes the OK/Cancel buttons as they would be localized for tk messageboxes (which use Tcl/Tk Core localization). I submitted this now as a GitHub PR. |
|
Date |
User |
Action |
Args |
2022-03-04 14:30:18 | sampo.hippelainen | set | recipients:
+ sampo.hippelainen, terry.reedy, python-dev, serhiy.storchaka, jcrmatos |
2022-03-04 14:30:18 | sampo.hippelainen | set | messageid: <1646404218.68.0.780743490303.issue31613@roundup.psfhosted.org> |
2022-03-04 14:30:18 | sampo.hippelainen | link | issue31613 messages |
2022-03-04 14:30:18 | sampo.hippelainen | create | |
|